Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 10 days 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 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T03:01:10.000Z (over 1 year ago)
- Last Synced: 2024-10-11T12:45:20.025Z (26 days 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
___
![GitHub Issues](https://img.shields.io/github/issues/pitzzahh/jokes-API)
![Forks](https://img.shields.io/github/forks/pitzzahh/jokes-API)
![Stars](https://img.shields.io/github/stars/pitzzahh/jokes-API)
![License](https://img.shields.io/github/license/pitzzahh/jokes-API)
![Forks](https://img.shields.io/github/forks/pitzzahh/jokes-API)
![Stars](https://img.shields.io/github/stars/pitzzahh/jokes-API)
![Contributors](https://img.shields.io/github/contributors/pitzzahh/jokes-API)
![Last Commit](https://img.shields.io/github/last-commit/pitzzahh/jokes-API)
![Code size](https://img.shields.io/github/languages/code-size/pitzzahh/jokes-API)
![Top language](https://img.shields.io/github/languages/top/pitzzahh/jokes-API)
![Languages count](https://img.shields.io/github/languages/count/pitzzahh/jokes-API)
![Repo size](https://img.shields.io/github/repo-size/pitzzahh/jokes-API)
___
## 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)
___
## SupportFor support, email [email protected]
___
## License
[MIT](https://choosealicense.com/licenses/mit/)### 🤍 Special Thanks to [railway](https://railway.app/) for providing free hosting for this project