X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=doc%2Fprotocole3.txt;h=c3c2e6af86947583ade712f43ab3658d7ccfd136;hp=212794bfa2d9c1aacd7ab0b2d0ad685a4b7d9812;hb=ccb7fdfe9914f47cc38f96e5973851f2c6f0c4b6;hpb=35b6b48d4c8fe3a262a4f01f9b97f0b2d7fdbbdf diff --git a/doc/protocole3.txt b/doc/protocole3.txt index 212794b..c3c2e6a 100644 --- a/doc/protocole3.txt +++ b/doc/protocole3.txt @@ -29,6 +29,19 @@ c : client s : server Les messages client vers serveur sont envoyés par HTTP-POST. +A toutes les requêtes le serveur peut répondre une erreur : + + { + "reply" : "error", + "error_message" : "blabla" + } + +Message ok générique : + + { + "reply" : "ok" + } + C.1. Login ---------- @@ -55,7 +68,7 @@ ou s -> c { "reply" : "login", - "status" : "registration_ok" | "authentification_ok" | "error", + "status" : "registration_ok" | "authentification_ok", "cookie" : "LKJDLAKSJBFLKASN", "id" : 193, "pseudo" : "Paul", @@ -68,8 +81,7 @@ s -> c "root" : 123, "page" : 1 } - ], - "error_message" : "blabla" + ] } @@ -84,7 +96,6 @@ c -> s C.3. Profile ------------ -Modification du profile, seul "cookie" est obligatoire. c -> s { @@ -95,7 +106,7 @@ c -> s "pseudo" : "Paul", "email" : "paul@pierre.com", "css" : "css/3/euphorik.css", - "mainPage" : 1, + "main_page" : 1, "conversations" : [ { "root" : 123, @@ -104,11 +115,10 @@ c -> s ] } -s -> c - { - "reply" : "ok" | "error", - "error_message" : "blabla" - } +s -> c + +ou + C.4. Wait event @@ -122,7 +132,7 @@ c -> s "cookie" : "LKJDLAKSJBFLKASN", "message_count" : 10, "last_message_id" : 163, - "mainPage" : 1, + "main_page" : 1, "conversations" : [ { "root" : 123,