MyDiary is an online journal where users can pen down their thoughts and feelings.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
The API documentation is at;
Python 3+, python-pip, virtualenv
Clone the repository
git clone https://github.com/kakaemma/MyDairyPro.git
cd MyDiaryPro
I am assuming you are using a windows machine
virtualenv env
cd env/Scripts/activate
pip install requirements.txt
install PostgreSQL
CREATE DATABASE mydiary_pro;
CREATE USER admin PASSWORD 'admin';
GRANT ALL PRIVILEGES ON DATABASE mydiary_pro TO admin;
$ python run.py
Install postman and access the application at:
http://localhost:5000
To run tests, you need nose installed on your computer
$ pip install nose
running the tests
$ nosetests tests
These are the endpoints available in My Diary API
| HTTP Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/signup | Register a user |
| POST | /api/v1/auth/login | Login a user |
| POST | /api/v1/entries | Adds a diary entry |
| GET | /api/v1/entries | Retrieves all diary entries |
| GET | /api/v1/entries/<diary_id> | Retrieves a single diary entry |
| PUT | /api/v1/entries/<diary_id> | Modifies diary entry |