This is an Palindrome API, where you can send it an string, And it returns the longest palindrome if exist
- Log Up
- Log In
- Get the longest palindrome given one string
- Linux os
- Docker
- Docker Compose
- Linux os
- Python 3.7
- Clone the repository in your machine, It doesn't matter the path
- git clone https://github.com/jalondono/palindrome-API
- cd API_grupoD
- Once there, you need to execute the docker command, to build the image and the run it
- docker-compose build
- docker-compose up
- Clone the repository in your machine, It doesn't matter the path
- git clone https://github.com/jalondono/palindrome-API
- cd API_grupoD
- Install the requirements file using this command
- pip install -r requirements.txt
- Checkout to test branch using this command:
- git checkout test
- Once done this, just run it using the next command
- python manage.py test --settings=grupo_d.settings.test_sqlite
For documentation. It is a simple endpoint where you can see the documentation of the API through SWAGGER OpenAPI, Where you can explore the models, payloads and responses
GET: http://0.0.0.0:8000/
For User register.
POST: http://0.0.0.0:8000/register/
In order make use of palindrome Endpoint, you need to be authenticated, so first you must to create one user, using the register endpoint as follow. The user will be saved in a sqlite db
For Get Token.
POST: http://0.0.0.0:8000/token/
At the time of make request to palindrome endpoint, you will need pass in the headers a valid token, You can get your token making use of this endpoint as follow
For Refresh Token.
POST: http://0.0.0.0:8000/token/refresh/
By default the token will have a duration of 6 hours, once passed this time you have to refresh it, using this endpoint as follow
For Palindrome.
POST: http://0.0.0.0:8000/palindrome/
Well... The palindrome endpoint needs two things, A valid token on headers and the string from which you will get the palindrome.
- Headers
After put the token on the headers like in the image above. You just need insert the string and that's all
- Juan Alberto Londoño H. - jalondono