Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/alexweininger/joke-api

Azure serverless joke api
https://github.com/alexweininger/joke-api

api azure azure-functions database demo functions-as-a-service javascript microsoft serverless

Last synced: 2 months ago
JSON representation

Azure serverless joke api

Awesome Lists containing this project

README

        

# Joke API

An API for jokes! This API is primarily for getting a random joke from a growing list of jokes hosted here. The API uses Azure functions. Got funny jokes? See how to submit your jokes down below!

## API Endpoints

### Get a random joke

[https://joke-api.azurewebsites.net/api/joke/](https://joke-api.azurewebsites.net/api/joke/)

returns

```javascript
{
"id": 56,
"type": "programming",
"setup": "How do you check if a webpage is HTML5?",
"punchline": "Try it out on Internet Explorer"
}
```

### Get a random joke of a specific type

types of jokes: general, programming, knock-knock (feel free to add jokes outside of these types)

## Contributing a joke

Submit a Pull Request, with your joke added to the jokes/index.json file. Be sure to use this format when adding your joke:

```javascript
{
"id": ,
"type": "your joke's type",
"setup": "your joke's setup line",
"punchline": "your joke's punchline"
}
```

### Saying hello

As a super simple example, this function simple appends returns `Hello + name`.

returns

```text
Hello Alex
```

## Built With

* [Azure functions](https://docs.microsoft.com/en-us/azure/azure-functions/) - Cloud service, highly recommended
* [Node.js](https://nodejs.org/en/docs/) - Serverside scripting (in Azure)

## Installing

coming soon

## Acknowledgments

* Inspired by [this repository](https://github.com/15Dkatz/official_joke_api).
* jokes gathered from all around the web

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/alexweininger/joke-api/blob/master/LICENSE) file for details