npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/jokes_one

v3.0.0

Published

DataFire integration for Jokes One API

Downloads

3

Readme

@datafire/jokes_one

Client library for Jokes One API

Installation and Usage

npm install --save @datafire/jokes_one
let jokes_one = require('@datafire/jokes_one').create({
  "X-JokesOne-Api-Secret": ""
});

.then(data => {
  console.log(data);
});

Description

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/.

Actions

jod.get

Gets Joke of the Day. Optional category param determines the category of returned joke of the day

jokes_one.jod.get({}, context)

Input

  • input object
    • category string: JOD Category

Output

jod.categories.get

Gets a list of Joke of the Day Categories.

jokes_one.jod.categories.get(null, context)

Input

This action has no parameters

Output

Output schema unknown

joke.delete

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

  • input object
    • id required string: Joke ID

Output

Output schema unknown

joke.get

Gets a Joke with a given id.

jokes_one.joke.get({}, context)

Input

  • input object
    • id string: Joke ID

Output

joke.patch

Update a joke

jokes_one.joke.patch({
  "id": ""
}, context)

Input

  • input object
    • id required string: Joke ID
    • title string: title
    • text string: text
    • author string: Joke Author
    • tags string: Comma Separated tags

Output

Output schema unknown

joke.put

Add a new joke to your private collection.

jokes_one.joke.put({
  "title": "",
  "text": ""
}, context)

Input

  • input object
    • title required string: Joke Title
    • text required string: Joke Text
    • author string: Joke Author
    • tags string: Comma Separated tags

Output

Output schema unknown

joke.categories.search.get

Gets a list of Joke Categories, based on a query term.

jokes_one.joke.categories.search.get({
  "query": ""
}, context)

Input

  • input object
    • query required string: Search Query
    • start integer: Response is paged. This parameter controls where response starts the listing at

Output

Output schema unknown

joke.list.get

Get the list of jokes in your private collection.

jokes_one.joke.list.get({}, context)

Input

  • input object
    • start integer: Response is paged. This parameter controls where response starts the listing at

Output

Output schema unknown

joke.random.get

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)

Input

This action has no parameters

Output

joke.search.get

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

  • 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.

Output

joke.tags.add.post

Add a tag to a given Joke.

jokes_one.joke.tags.add.post({
  "id": "",
  "tags": ""
}, context)

Input

  • input object
    • id required string: Joke ID
    • tags required string: Comma Separated tags

Output

Output schema unknown

joke.tags.remove.post

Remove a tag from a given joke.

jokes_one.joke.tags.remove.post({
  "id": "",
  "tags": ""
}, context)

Input

  • input object
    • id required string: Joke ID
    • tags required string: Comma Separated tags

Output

Output schema unknown

Definitions

Joke

  • Joke
    • author string: Author name of joke.
    • joke required string: The Joke.
    • tags array: Array of tags/categories.
      • items string
    • 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.

JokeOfTheDay

  • JokeOfTheDay
    • author string: Author name of joke.
    • joke required string: The Joke.
    • tags array: Array of tags/categories.
      • items string
    • 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

JokeOfTheDayResponse

  • JokeOfTheDayResponse object
    • contents object
    • success string: Metadata about this successful call

JokeResponse

  • JokeResponse object
    • contents object
      • jokes array: List of jokes
    • success string: Metadata about this successful call

NewJoke

  • NewJoke object
    • author string: Author name of joke.
    • joke required string: The Joke.
    • tags array: Array of tags/categories.
      • items string
    • title required string: Title of the Joke.