I used the resource api. This api generates the Chuck NORRIS's jokes. Also I added the postman collection.
- Java 17
- Spring Boot 3.1.0
Chuck Norris API URL : https://api.chucknorris.io/
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"
]
}
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."
}
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."
}