🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/15dkatz/official_joke_api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/15dkatz/official_joke_api

v0.0.0-20240713000423-98bf95d5bc76
Source
Go
Version published
Created
Source

Official Joke API

Endpoints:

Grab a random joke

https://official-joke-api.appspot.com/random_joke

https://official-joke-api.appspot.com/jokes/random

Get joke types

https://official-joke-api.appspot.com/types

Grab ten random jokes

https://official-joke-api.appspot.com/random_ten

https://official-joke-api.appspot.com/jokes/ten

Grab any number of random jokes

Usage: https://official-joke-api.appspot.com/jokes/random/<any-number>

For example:

Grab jokes by type

The endpoints are jokes/:type/random or jokes/:type/ten. For example:

https://official-joke-api.appspot.com/jokes/programming/random

https://official-joke-api.appspot.com/jokes/programming/ten

Grab joke by id

Use endpoint /jokes/:id

How these jokes were collected

The majority of these jokes were contributed by joke-loving coders around the world!

Make a contribution!

Submit a Pull Request, with your joke added to the jokes/index.json file. Make sure the joke is in this format:

{
  "type": "programming",
  "setup": "What's the best thing about a Boolean?",
  "punchline": "Even if you're wrong, you're only off by a bit."
}

Run Locally

  • Clone the repo
  • npm i && npm run dev
  • Visit localhost:3005/jokes/random or localhost:3005/jokes/ten on your browser

FAQs

Package last updated on 13 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts