Code Monkey home page Code Monkey logo

joke-api's Introduction

The Joke API

CI Code Coverage

A blazing fast jokes REST API made with Oak on Deno Deploy 🦕 🚀

API

GET /

https://joke.deno.dev

Get a random joke ✨

{
  "id": 229,
  "type": "general",
  "setup": "What do you call an alligator in a vest?",
  "punchline": "An in-vest-igator!"
}

GET /:id

https://joke.deno.dev/350

Did you like a joke? Get the same one whenever you want 🦀

{
  "id": 350,
  "type": "general",
  "setup": "Why did the tree go to the dentist?",
  "punchline": "It needed a root canal."
}

GET /type/:type

https://joke.deno.dev/type/programming

Looking for a specific type of jokes? You're lucky 🐌

[
  {
    "id": 15,
    "type": "programming",
    "setup": "What's the best thing about a Boolean?",
    "punchline": "Even if you're wrong, you're only off by a bit."
  },
  {
    "id": 16,
    "type": "programming",
    "setup": "What's the object-oriented way to become wealthy?",
    "punchline": "Inheritance"
  },
  ...
]

All available types are listed on GET /type 🕵️‍♂️

GET /type/:type/:quantity

Looking for a specific amount of a specific type of jokes? We got you covered 🐿

https://joke.deno.dev/type/general/1

[
  {
    "id": 90,
    "type": "general",
    "setup": "Did you hear about the guy who invented Lifesavers?",
    "punchline": "They say he made a mint."
  }
]

GET /all

https://joke.deno.dev/all

Do you really need so many jokes? Leave everything to us ⚡

[
  {
    "id": 1,
    "type": "general",
    "setup": "What did the fish say when it hit the wall?",
    "punchline": "Dam."
  },
  {
    "id": 2,
    "type": "general",
    "setup": "How do you make a tissue dance?",
    "punchline": "You put a little boogie on it."
  },
  {
    "id": 3,
    "type": "general",
    "setup": "What's Forrest Gump's password?",
    "punchline": "1Forrest1"
  }
  ...
]

Analytics

Requests

January 2023, hitting around 400k requests per month.

Contributing

Submit a Pull Request, with your joke added to the server/data.ts file. Make sure your joke is in this format:

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

If you have an idea for a new endpoint, submit an issue or a pull request.

How the Jokes were collected

The first 300 Jokes comes from 15Dkatz/official_joke_api (At the moment of writting this, this project has 428 jokes.), the problem with that project is that its server is down, and it has not been updated for 2 years.

The other jokes were progressively added by contributors.

Licence

Licensed under the MIT License 📄

joke-api's People

Contributors

ultirequiem avatar web-flow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

joke-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.