Joke API

I used the resource api. This api generates the Chuck NORRIS's jokes. Also I added the postman collection.

Used Technologies

  • Java 17
  • Spring Boot 3.1.0

Resource API

Chuck Norris API URL : https://api.chucknorris.io/

Requests

Get Joke Categories

curl --location 'http://localhost:8080/joke-app/categories'

Response :

{
   "categories": [
       "ANIMAL",
       "CAREER",
       "CELEBRITY",
       "DEV",
       "EXPLICIT",
       "FASHION",
       "FOOD",
       "HISTORY",
       "MONEY",
       "MOVIE",
       "MUSIC",
       "POLITICIAL",
       "RELIGION",
       "SCIENCE",
       "SPORT",
       "TRAVEL"
   ]
}

Get Random Joke

curl --location 'http://localhost:8080/joke-app/random-joke'

Respone :

{
    "joke": "Chuck Norris is like God, sex and kung-fu put in a blender to create undiluted manliness."
}

Get Random Joke By Category

curl --location --request GET 'http://localhost:8080/joke-app/random-joke-by-category' \ --header 'Content-Type: application/json' \ --data '{ "category":"ANIMAL"}'

Response:

{
    "joke": "Chuck Norris' first roundhouse kick ever is now known as The Big Bang."
}