A new REST API to consume the content of official_joke_api, with new content, new categories and HTML page to show what you can do !
Start Here: https://nova-joke-api.netlify.app/.netlify/functions/index/api/random
Or access the homepage at https://nova-joke-api.netlify.app/.netlify/functions/index/api/ to learn more about how to use the content.
Base url: https://nova-joke-api.netlify.app/.netlify/functions/index/
You can access the standard endpoints of Original Joke api. They are:
- / - root.
- /ping - returns the word pong.
- /random_joke - returns one random joke.
- /random_ten - returns an array of 10 random jokes.
- /jokes/random - returns one random joke.
- /jokes/ten - returns an array of 10 random jokes.
- /jokes/[type]/random - returns one random joke of that type.
- /jokes/[type]/ten - returns ten random jokes of that type.
You can use new endpoints With three new resources:
- /api - root (HTML file). - NEW
- /api/random - returns one random joke.
- /api/ten - returns an array of 10 random jokes.
- /api/[category name]/random - returns one random joke of that type.
- /api/[category name]/ten - returns ten random jokes of that type.
- /api/joke/[joke number] - returns one joke by your id number. - NEW
- /status - Show how many jokes and categories you have dynamically. - NEW
If the original source is not working, you can use this repo for free to consume the same data. Ah... Original repo: https://github.com/15Dkatz/official_joke_api
You can clone or download this repo and install the dependencies with your command line tool, then just start the netlify-lambda server or nodemom dev dependency:
# Install dependencies
npm i
# Run at localhost:9000
npm start
# run at localhost:3005
npm run dev