LogoLogo
  • ๐Ÿ‘ฅAbout us
  • ๐Ÿ’พChangelogs
    • ๐ŸŒAPI
    • ๐Ÿ“ฒModule
  • โ›”Rate-Limit
  • โœจStart with the NPM module
  • Module
    • ๐Ÿ“ธImages
      • ๐ŸฌAnimals
    • ๐ŸŽฎGames
      • ๐ŸŽฎGarry's Mod
      • ๐ŸŽฎMinecraft
      • ๐ŸŽฎFiveM
  • Joke
    • ๐ŸคฃJokes
      • ๐ŸŽฒRandom
      • ๐Ÿ“‹Category
      • ๐Ÿ†”ID
  • Images
    • ๐Ÿ™Animals
      • ๐Ÿ•Dog
      • ๐ŸˆCat
      • ๐ŸฆŠFox
      • ๐Ÿฆ’Giraffe
      • ๐Ÿฆ˜Kangaroo
      • ๐ŸฆLion
      • ๐Ÿ’Quokka
      • ๐ŸบWolf
      • ๐ŸฆŽLรฉzard
      • ๐Ÿ†Lรฉopard
      • ๐Ÿ’Singes
      • ๐ŸฆšPaon
      • ๐ŸนHamster
    • ๐Ÿฅ˜SFW
      • ๐ŸŽฒRandom
      • ๐Ÿ“‹Category
      • ๐Ÿ†”ID
    • ๐Ÿ”žNSFW
      • ๐ŸŽฒRandom
      • ๐Ÿ“‹Category
      • ๐Ÿ†”ID
    • ๐Ÿ—๏ธUtils
      • ๐Ÿ“ธQR Code
        • ๐Ÿ”Generator
        • ๐Ÿ“ƒReader
      • ๐Ÿ”Captcha
      • โ„น๏ธIP infos
  • Games
    • ๐ŸŽฎGames
      • ๐ŸŽฎGarry's Mod
      • ๐ŸŽฎMinecraft
      • ๐ŸŽฎFiveM
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Joke
  2. Jokes

Category

Choose which Category of joke you would like to have

Joke by Category

GET https://api.night-api.com/jokes/:type

Path Parameters

Name
Type
Description

type*

string

Type of jokes to get (global, beauf, dev, limit, dark)

Headers

Name
Type
Description

authorization*

String

Your API key

{
    "status": 200,
    "content": {
        "id": 44,
        "type": "global",
        "blague": "Que dit un canard quand il va aux toilettes ?",
        "reponse": "Je vais au petit coin."
    }
}
{
    "status": 400,
    "error": "Bad type provided"
}

Lists of available categories:

  • global

  • dev

  • dark

  • limit

  • beauf

  • blondes

const axios = require("axios");

axios.get('https://api.night-api.com/jokes/global', {
    headers: {
        authorization: "API token"
    }
})
.then(function (response) {
    console.log(response.data);
})

Or with the NPM module

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const blague = await api.jokes.byCategory('dev'); // Return: Promise
PreviousRandomNextID

Last updated 2 years ago

Was this helpful?

๐Ÿคฃ
๐Ÿ“‹