Client library for Jokes One API
npm install --save @datafire/jokes_one
let jokes_one = require('@datafire/jokes_one').create({
"X-JokesOne-Api-Secret": ""
});
.then(data => {
console.log(data);
});
Jokes One API offers a complete feature rich REST API access to its jokes platform. This is the documentation for the world famous jokes API. If you are a subscriber and you are trying this from a console add 'X-JokesOne-Api-Secret' header and add your api key as the header value. You can test and play with the API right here on this web page. For using the private end points and subscribing to the API please visit https://jokes.one/api/joke/.
Gets Joke of the Day
.
Optional category
param determines
the category of returned joke of the day
jokes_one.jod.get({}, context)
- input
object
- category
string
: JOD Category
- category
- output JokeOfTheDayResponse
Gets a list of Joke of the Day
Categories.
jokes_one.jod.categories.get(null, context)
This action has no parameters
Output schema unknown
Delete a joke. The user needs to be the owner of the joke to be able to delete it.
jokes_one.joke.delete({
"id": ""
}, context)
- input
object
- id required
string
: Joke ID
- id required
Output schema unknown
Gets a Joke
with a given id
.
jokes_one.joke.get({}, context)
- input
object
- id
string
: Joke ID
- id
- output JokeResponse
Update a joke
jokes_one.joke.patch({
"id": ""
}, context)
- input
object
- id required
string
: Joke ID - title
string
: title - text
string
: text - author
string
: Joke Author - tags
string
: Comma Separated tags
- id required
Output schema unknown
Add a new joke to your private collection.
jokes_one.joke.put({
"title": "",
"text": ""
}, context)
- input
object
- title required
string
: Joke Title - text required
string
: Joke Text - author
string
: Joke Author - tags
string
: Comma Separated tags
- title required
Output schema unknown
Gets a list of Joke
Categories, based on a query term.
jokes_one.joke.categories.search.get({
"query": ""
}, context)
- input
object
- query required
string
: Search Query - start
integer
: Response is paged. This parameter controls where response starts the listing at
- query required
Output schema unknown
Get the list of jokes in your private collection.
jokes_one.joke.list.get({}, context)
- input
object
- start
integer
: Response is paged. This parameter controls where response starts the listing at
- start
Output schema unknown
Gets a Random Joke
. When you are in a hurry this is what you call to get a random famous joke.
jokes_one.joke.random.get(null, context)
This action has no parameters
- output JokeResponse
Search for a Joke
in Jokes One platform. Optional category
, author
, minlength
, maxlength
params determines the filters applied while searching for the joke.
jokes_one.joke.search.get({}, context)
- input
object
- category
string
: Joke Category - query
string
: keyword to search for in the joke - minlength
integer
: Joke minimum Length - maxlength
integer
: Joke maximum Length - author
string
: Joke Author - private
boolean
: Should search private collection? Default searches public collection.
- category
- output JokeResponse
Add a tag to a given Joke.
jokes_one.joke.tags.add.post({
"id": "",
"tags": ""
}, context)
- input
object
- id required
string
: Joke ID - tags required
string
: Comma Separated tags
- id required
Output schema unknown
Remove a tag from a given joke.
jokes_one.joke.tags.remove.post({
"id": "",
"tags": ""
}, context)
- input
object
- id required
string
: Joke ID - tags required
string
: Comma Separated tags
- id required
Output schema unknown
- Joke
- author
string
: Author name of joke. - joke required
string
: The Joke. - tags
array
: Array of tags/categories.- items
string
- items
- title required
string
: Title of the Joke. - id
string
: Unique identifier representing a specific joke in jokes.one. - image
string
: Image URL that can be used for background to display this joke. - length
integer
: Length of the joke string.
- author
- JokeOfTheDay
- author
string
: Author name of joke. - joke required
string
: The Joke. - tags
array
: Array of tags/categories.- items
string
- items
- title required
string
: Title of the Joke. - id
string
: Unique identifier representing a specific joke in jokes.one. - image
string
: Image URL that can be used for background to display this joke. - length
integer
: Length of the joke string. - date required
string
: Date this joke of the day belongs to
- author
- JokeOfTheDayResponse
object
- contents
object
- jokes
array
: List of jokes- items JokeOfTheDay
- jokes
- success
string
: Metadata about this successful call
- contents
- JokeResponse
object
- contents
object
- jokes
array
: List of jokes- items Joke
- jokes
- success
string
: Metadata about this successful call
- contents
- NewJoke
object
- author
string
: Author name of joke. - joke required
string
: The Joke. - tags
array
: Array of tags/categories.- items
string
- items
- title required
string
: Title of the Joke.
- author