sandoval97 / thedwz

API to generate a list of random chuck norris jokes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

thedwz sample application

Setup

The first thing to do is to clone the repository:

$ git clone https://github.com/Sandoval97/thedwz.git
$ cd thedwz

Run the follow command of docker compose to create APIs container:

$ docker-compose up --build

Once build has finished and downloading the dependencies the dev server will be started the command used is:

$ python manage.py runserver 0.0.0.0:8000

So navigate to http://127.0.0.1:8000/api/v1/. To see available endpoints

Joke Endpoint

Returns the list of 15 jokes from chucknorris API:

    /api/v1/chucknorris/random-jokes/

    * output
    json
        {
            "length": 0,
            "jokes": []
        }

Tests

To run the tests, cd into the directory where manage.py is:

$ ./manage.py test

About

API to generate a list of random chuck norris jokes


Languages

Language:Python 98.6%Language:Dockerfile 1.4%