My solution of "Phonebook APIs" from hackajob.co
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
hackajob_phone_book_api
tests
.gitignore
Dockerfile
README.md
docker-compose.yml
install.py
requirements.txt
requirements_dev.txt
setup.py
tasks.py

README.md

Phonebook APIs

Test from hackajob.co.

Requirements

Running it locally - development

$ docker-compose up --build api

Running tests

$ docker-compose up --build test

API

Create one

This method allows you to create phone book entry

curl -i -X POST 0.0.0.0:8080/entries --user user:pass -d '{"addresses":[{"id":1,"value":"Room67\n14TottenhamCourtRoad\nLondon\nEngland\\W1T1JY"}],"emails":[{"id":1,"value":"john.doe@example.com"}],"first_name":"John","id":1,"last_name":"Doe","phones":[{"id":1,"value":"12345678"},{"id":2,"value":"87654321"}]}'

Get one

This method allows you to select one phone book entry

curl -i 0.0.0.0:8080/entries/2 --user user:pass

Delete one

This method allows you to delete one phone book entry

curl -i -X DELETE 0.0.0.0:8080/entries/2 --user user:pass