https://github.com/pitzzahh/jokes-api
API that generates random jokes
https://github.com/pitzzahh/jokes-api
api java jokes-api spring spring-api
Last synced: 8 months ago
JSON representation
API that generates random jokes
- Host: GitHub
- URL: https://github.com/pitzzahh/jokes-api
- Owner: pitzzahh
- License: mit
- Created: 2022-11-19T04:55:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T03:01:10.000Z (over 2 years ago)
- Last Synced: 2025-02-28T18:42:52.465Z (8 months ago)
- Topics: api, java, jokes-api, spring, spring-api
- Language: Java
- Homepage: https://jokes.araopj.tech
- Size: 194 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jokes API
API that generates random jokes based on some categories or just random
___












___
## API Reference
#### Get a random joke and returns a JSON response from the API
##### Temporary link
- https://jokes-api-prod-production.up.railway.app
```html
GET https://jokes.araopj.tech/v1/random
```
#### Example response
```json
{
"joke": "What do you call a fake noodle? An \"impasta\".",
"category": "DAD_JOKE",
"language": "ENGLISH"
}
```
```json
{
"joke": "Ano ang sabi ng isang kahoy sa ibang kahoy? Pakapit!",
"category": "ONE_LINER",
"language": "FILIPINO"
}
```
#### Get random joke based on category and language
```html
GET https://jokes.araopj.tech/v1/random?category=${category}&language=${language}
```
| Parameter | Type | Description |
|:-----------|:---------|:----------------------------------------|
| `category` | `String` | **Required**. category of joke to fetch |
| `language` | `String` | **Required**. language of joke to fetch |
##### Sample Request
```html
GET https://jokes.araopj.tech/v1/random?category=ANY&lang=FILIPINO
```
#### Get random joke based on category
```html
GET https://jokes.araopj.tech/v1/random?category=${category}
```
| Parameter | Type | Description |
|:-----------|:---------|:----------------------------------------|
| `category` | `String` | **Required**. category of joke to fetch |
| Categories
available |
|:--------------------------|
| `ANY` |
| `DAD_JOKE` |
| `PUN` |
| `KNOCK_KNOCK` |
| `ONE_LINER` |
#### Sample Request
```html
GET https://jokes.araopj.tech/v1/random?category=DAD_JOKE
```
___
#### Get random joke based on language
```html
GET https://jokes.araopj.tech/v1/random?language=${language}
```
| Parameter | Type | Description |
|:-----------|:---------|:----------------------------------------|
| `language` | `String` | **Required**. language of joke to fetch |
| Languages
available |
|:-------------------------|
| `ENGLISH` |
| `FILIPINO` |
#### Sample Request
```html
GET https://jokes.araopj.tech/v1/random?lang=FILIPINO
```
___
## Contributing
Contributions are always welcome!
#### Have a joke in mind? Submit now!
```html
POST https://api.araopj.tech/api/v1/jokes/submit
```
##### Sample submission
```json
{
"joke": "What do you call a cow with no legs? Ground beef.",
"category": "DAD_JOKE",
"language": "ENGLISH"
}
```
___
See `contributing.md` for ways to get started.
Please adhere to this project's `code of conduct`.
___
## Features
- [x] Random joke
- [x] Many joke categories
- [x] Many joke languages
- [x] Random joke based on category
- [x] Random joke based on language
- [x] Random joke based on category and language
- [x] API Documentation
- [ ] API Rate Limiting
- [ ] API Authentication
- [ ] API Key
- [ ] Microservice (? maybe)
___
## Support
For support, email pitzzahh@araopj.tech
___
## License
[MIT](https://choosealicense.com/licenses/mit/)
### 🤍 Special Thanks to [railway](https://railway.app/) for providing free hosting for this project