discovery-trivia-api
v3.0.2
Published
'discovery-trivia' is a JS Wrapper that makes calls to the internal Discovery Communications Inc 'trivia-game-lambda-api'
Downloads
2
Readme
Discovery Trivia API Wrapper
Javascript Wrapper for handling calls to the internal Discovery trivia game api
Check out the docs to the Trivia Game API at this link.
How do I use this thing?
const Trivia = require("discovery-trivia-api")
const t = new Trivia({
id: "some-user-id",
domain: "your-domain",
substitutionMap: {
first_name: "Discovery",
last_name: "Digital"
// ...
}
})
t.launch().then(function(res) {
console.log(res.statusCode)
// => 200
console.log(res.body)
// => {
// welcome: "welcome message",
// tutorial: "tutorial message",
// sfx: "sfx",
// background: "background",
// ...
// }
})