X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=doc%2Fprotocole3.txt;h=fdb68df11f4cb4ae038def96a7e32dd31f03819b;hb=b5878679d51e91e8a86dd042251c91290bf8caf2;hp=212794bfa2d9c1aacd7ab0b2d0ad685a4b7d9812;hpb=35b6b48d4c8fe3a262a4f01f9b97f0b2d7fdbbdf;p=euphorik.git diff --git a/doc/protocole3.txt b/doc/protocole3.txt index 212794b..fdb68df 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, @@ -138,21 +148,24 @@ Le format de la date n'est pas formel. { "reply" : "new_messages", "conversations" : [ - "last_page" : true | false, - "messages" : [ - "id" : 54, - "date" : "Hier 17:26:54", - "system" : true | false, - "owner" : true | false, - "answered" : true | false, - "is_a_reply" : true | false, - "nick" : "Paul", - "login" : "paul_22", - "content" : "Salut", - "answer_to" : [ - { "id" : 123, "pseudo" : "Pierre", "login" : "pierre_45" } + { + "last_page" : true | false, + "messages" : [ + "id" : 54, + "date" : "Hier 17:26:54", + "system" : true | false, + "owner" : true | false, + "answered" : true | false, + "is_a_reply" : true | false, + "nick" : "Paul", + "login" : "paul_22", + "content" : "Salut", + "answer_to" : [ + { "id" : 123, "pseudo" : "Pierre", "login" : "pierre_45" } + ] ] - ] + } + ... ] } ou