API Endpoint (Choose one, they are the same. sodas.tw comes with CloudFlare,
so it would be faster):
This is a JSON REST API, so data would be transferred in application/json content type.
-
/signup- method:
POST - required fields:
POST-username,password, andemail
- resonse:
POST- A dictionary withusernameandemailof registered user.
- method:
-
/notes- method:
GET(list notes) andPOST(create notes) - Use
HTTP Basic Authenticationwith username and password. - required fields:
GET- N/APOST- N/A, but usually havetitleandcontent.
- response:
GET- A list of dictionaries, which hasmodified_time,title, anduuidof a note.POST- A dictionary which hasmodified_time,title,content, anduuidof the created note.
- method:
-
/notes/<UUID of notes>- method:
GET(retrieve a note),PUT(update/replace a note),PATCH(partial-update a note), andDELETE(destroy a note) - Use
HTTP Basic Authenticationwith username and password. - required fields:
PUT- N/A, but usually havetitleandcontent.- Others - N/A
- response:
GET,PUT, andPATCH- A dictionary which hasmodified_time,title,content, anduuidof the created note.DELETE- N/A
- method:
This is a server based on django 1.11 and Python 3.6,
and uses pytest for testing. Also uses pip-tools
for dependnecy management, see Makefile for detail.