Client library for Fun Generators API
npm install --save @datafire/fungenerators_trivia
let fungenerators_trivia = require('@datafire/fungenerators_trivia').create({
"X-Fungenerators-Api-Secret": ""
});
.then(data => {
console.log(data);
});
Below is the documentation for the API calls. You can try them out right here.
Create a random Trivia entry.
fungenerators_trivia.trivia.delete({
"id": ""
}, context)
- input
object
- id required
string
: Trivia ID
- id required
Output schema unknown
Get a Trivia entry for a given id. Retrieves a trivia question and answer based on the id.
fungenerators_trivia.trivia.get({}, context)
- input
object
- id
string
: ID of the trivia to fetch
- id
Output schema unknown
Create a random Trivia entry.
fungenerators_trivia.trivia.put({
"question": "",
"category": "",
"answer": ""
}, context)
- input
object
- question required
string
: Trivia Question - category required
string
: Category of the trivia - answer required
string
: Answer(s) to the trivia question
- question required
Output schema unknown
Get a random Trivia.
fungenerators_trivia.trivia.categories.get({}, context)
- input
object
- start
integer
: start
- start
Output schema unknown
Get a random trivia for a given category(optional)
fungenerators_trivia.trivia.random.get({}, context)
- input
object
- category
string
: Category to get the trivia from
- category
Output schema unknown
Search for random trivia which has the text in the query, for a given category(optional).
fungenerators_trivia.trivia.search.get({}, context)
- input
object
- query
string
: Text to search for in the trivia - category
string
: Category to get the trivia from
- query
Output schema unknown
This integration has no definitions