https://github.com/ashkan-khd/punchline-api
https://github.com/ashkan-khd/punchline-api
asyncio docker docker-compose flask flask-restful microservices mongodb nameko postgresql pytest python python-interface rabbitmq redis requests uwsgi
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ashkan-khd/punchline-api
- Owner: ashkan-khd
- License: mit
- Created: 2024-11-27T14:52:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-09T23:24:09.000Z (over 1 year ago)
- Last Synced: 2025-10-20T06:33:25.430Z (6 months ago)
- Topics: asyncio, docker, docker-compose, flask, flask-restful, microservices, mongodb, nameko, postgresql, pytest, python, python-interface, rabbitmq, redis, requests, uwsgi
- Language: Python
- Homepage:
- Size: 140 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# General
This application implements a minimalistic flask API application that would let the user search, create, delete and
update jokes from [Chuck Norris jokes](https://api.chucknorris.io/), that works through for example Postman.
To simplify the description, we will call [Chuck Norris jokes](https://api.chucknorris.io/) as remote and application
implemented in this repository as local.
## The APIs

The API mainly consists of these 5 endpoints:
### `GET /jokes/?query={query}`
Free text search endpoint. You should take local and remote search results into consideration.
### `POST /api/jokes/`
Endpoint to create joke locally.
### `GET /api/jokes/{id}`
Endpoint to retrieve a joke by unique id. You should take local and remote results into consideration.
### `PUT /api/jokes/{id}`
Endpoint to update a joke by unique id. If the joke does not exist, return 404 not found. But if it does, store a
updated version locally. Any subsequent reads should only see this updated version.
### `DELETE /api/jokes/{id}`
Endpoint to delete a joke by unique id. If the joke does not exist, return 404 not found. But if it does, mark the joke
locally as deleted. Any subsequent reads should *NOT* see this joke.