Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/namitkumarsingh97/jokes-api-building

Node.js RESTful API built with Express.js offering limited diverse joke categories. Provides seamless integration for accessing and retrieving jokes programmatically. A comprehensive solution for humor enthusiasts seeking a wide range of comedic content.
https://github.com/namitkumarsingh97/jokes-api-building

Last synced: 2 days ago
JSON representation

Node.js RESTful API built with Express.js offering limited diverse joke categories. Provides seamless integration for accessing and retrieving jokes programmatically. A comprehensive solution for humor enthusiasts seeking a wide range of comedic content.

Awesome Lists containing this project

README

        

# JokesAPI

- A public API for humor enthusiasts seeking a wide range of comedic content.

```
baseURL = https://jokes-api-building.onrender.com
```

## GET - Random Joke

- Get a random joke from the Joke API
> https://jokes-api-building.onrender.com/random

## GET - Specific Joke

- Responds with a single joke with the requested joke id.
> https://jokes-api-building.onrender.com/jokes/:id
- Provide the joke id as a path parameter.

## GET - Filtered Joke By Type

- Filters all the jokes by their joke type.
> https://jokes-api-building.onrender.com/filter
- Provide a query parameter for `jokeType` and if the type exists, then you should get back all the jokes that match that type.

## POST - New Joke

- Create a new joke to add into the collection of jokes.
> https://jokes-api-building.onrender.com/jokes
- Need to provide body parameters for `jokeText` and `jokeType`.
- Joke ID will be autogenerated.

## PUT - Replace Joke

- Completely replace a joke based on the path parameter id specified.
> https://jokes-api-building.onrender.com/jokes/:id
- Provide the replacement values for the `jokeText` and `jokeType`.

### PATH VARIABLES

- id

## PATCH - Edit Joke

- Edit a particular property of joke for the id that is specified in the path parameter.
> https://jokes-api-building.onrender.com/jokes/:id
- Provide optional values for either the `jokeText` or the `jokeType`.

### PATH VARIABLES

id

## DELETE - Single Joke

- Delete a joke from the collection of jokes based on the path parameter provided for the joke `id`.
> https://jokes-api-building.onrender.com/jokes/:id
- Will return an error if no jokes match the provided `id`.

### PATH VARIABLES

id

## DELETE - All Jokes

- Delete all jokes from the collection.
> https://jokes-api-building.onrender.com/all

### Authentication:

Requires the admin key to perform this action.