MyDiary is an online journal where users can pen down their thoughts and feelings.
The API is hosted live on https://diary-2018.herokuapp.com/
A user can;
- Sign up
- Login
- Create a diary
- Add description to the diary
- View Diaries
- View diary Descriptions
- Edit Diary entries
- Edit Diary descriptions
- Change password
These are the endpoints available in My Diary API
| HTTP Method | Endpoint | Description | Public Access |
|---|---|---|---|
| POST | /api/v1/register | Registers a user | True |
| POST | /api/v1/login | Logs a user in | True |
| POST | /api/v1/reset-password | Resets user password | False |
| POST | /api/v1/diary | Adds a diary entry | False |
| POST | /api/v1/diary/<diary_id>/item | Adds description to a diary entry | False |
| GET | /api/v1/diary | Retrieves all diary entries | False |
| GET | /api/v1/diary/<diary_id> | Retrieves a single diary entry | False |
| GET | /api/v1/diary/<diary_id>/item | Retrieves descriptions about a diary entry | False |
| PUT | /api/v1/diary/<diary_id> | Modifies diary entry | False |
| PUT | /api/v1/diary/<diary_id>/item/<item_id> | Modifies diary description | False |
Python 3+, python-pip, virtualenv
Clone the repository
git clone https://github.com/kakaemma/MyDairy.
cd MyDiary
I am assuming you are using a windows machine
virtualenv env
cd env/Scripts/activate
pip install requirements.txt
$ python run.py
Install postman and access the application at:
http://localhost:5000
The application tests are based on python's unit testing framework unittest. to run the test with nose
nosetests tests
Note: nosetests will only work if you have nose intalled.