Chuck Norris Jokes server
GET /joke
Get Chuck Norris joke
Headers
| Name | Required | Type | Description |
|---|---|---|---|
Authorization |
required | string | Your account authorization. |
| Response |
{
"id": "F6v0fEXeREek9FnF6_9k4A",
"categories": ["some category"],
"createdAt": "2020-01-05 13:42:25.352697",
"joke": "Chuck Norris' first car was Optimus Prime."
}
First you will need to run the service locally. In order to run a requst run one you can use the following request request
curl --location --request GET 'http://localhost:8000/joke' \
--header 'Authorization: 1111-2222-3333'The project is under the joke-service folder.
First create virtualenv and activate it
pip install -r /path/to/requirements.txt
To run the service tests
pytest
To run the service you can use this command
uvicorn main:app