alexweininger / joke-api

Azure serverless joke api

Home Page:https://joke-api.azurewebsites.net/api/joke/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/

returns

{
  "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

https://joke-api.azurewebsites.net/api/joke/?joketype=programming 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:

{
  "id": <one higher than the previous joke>,
  "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.

https://joke-api.azurewebsites.net/api/hello/?name=Alex

returns

Hello Alex

Built With

Installing

coming soon

Acknowledgments

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Azure serverless joke api

https://joke-api.azurewebsites.net/api/joke/

License:MIT License


Languages

Language:JavaScript 87.9%Language:HTML 12.1%