The APIs allow users to create an account and save notes online.
- Python 3.7
- pipenv
Setup guide: Link
-
Clone repo:
$ git clone https://github.com/omedale/django-note.git -
Change directory to
django-note$ cd django-note -
Setup environment
$ pipenv shell -
Install application dependencies:
$ pip install -r requirements.txt -
Database Setup
$ python manage.py makemigrations notes $ python manage.py migrate -
Create admin user
$ python manage.py createsuperuser -
start the server:
$ python manage.py runserver -
Run test
$ python manage.py test
visit: http://127.0.0.1:8000/admin on your browser and login with the admin user you created above
POST/api/users/
- Sign up
- Params
username: String
email: String
password: String
POST/api/users/login/
- Login
- Params
email: String
password: String
POST/api/notes/
- Create Note
- Header
Authorization: Bearer <token>
- Params
title: String
body: String
GET/api/notes/:id
- Get Note
- Header
Authorization: Bearer <token>
PUT/api/notes/:id
- Update Note
- Header
Authorization: Bearer <token>
DELETE/api/notes/:id
- Delete Note
- Header
Authorization: Bearer <token>