From f63afa6c1033d8d9c6c567d87a05c29312a99058 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 15 Sep 2013 13:45:00 +0200 Subject: [PATCH] [MISC] Update development notes. --- NOTES | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/NOTES b/NOTES index f390728..16a3e7e 100644 --- a/NOTES +++ b/NOTES @@ -1,4 +1,5 @@ Development notes +------------------ user document: { @@ -13,26 +14,30 @@ profile document: { "_id": "%COUCHDOCID%", "type": "profile", - "foo": "bar" + "data": { + //the object that is handled + } } ---- +API +---- -API: +GET retrieve data +PUT put a whole dataset (overwrite) +POST update a dataset (update given parts only) +DELETE delete/destroy something -GET /user get user data -PUT /user create user -POST /user update user -DELETE /user delete user +GET /user {} {success, user: {%USER_DOCUMENT%}} +PUT /user {username, password, email} {success} +POST /user {username, password, email} {success} +DELETE /user {username, password} {success} +GET /profile {} {success, profile: {%PROFILE_DOCUMENT}} +PUT /profile {profile} {success} +POST /profile {profile} {success} +DELETE /profile {} {success} -GET /profile retrieve stored profile -PUT /profile set whole profile -POST /profile update given parts of profile -DELETE /profile prune profile data - - -PUT /session create session with given credentials -GET /session get session data -DELETE /session destroy session (logout) \ No newline at end of file +GET /session {} {success, login} +PUT /session {username, password} {success} +DELETE /session {} {success} \ No newline at end of file