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 withusername
andemail
of registered user.
- method:
-
/notes
- method:
GET
(list notes) andPOST
(create notes) - Use
HTTP Basic Authentication
with username and password. - required fields:
GET
- N/APOST
- N/A, but usually havetitle
andcontent
.
- response:
GET
- A list of dictionaries, which hasmodified_time
,title
, anduuid
of a note.POST
- A dictionary which hasmodified_time
,title
,content
, anduuid
of 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 Authentication
with username and password. - required fields:
PUT
- N/A, but usually havetitle
andcontent
.- Others - N/A
- response:
GET
,PUT
, andPATCH
- A dictionary which hasmodified_time
,title
,content
, anduuid
of 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.