projects
/
euphorik.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MOD Passage au JSON (tout cassé pour l'instant)
[euphorik.git]
/
doc
/
protocole3.txt
diff --git
a/doc/protocole3.txt
b/doc/protocole3.txt
index
212794b
..
c3c2e6a
100644
(file)
--- 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.
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 :
+<error>
+ {
+ "reply" : "error",
+ "error_message" : "blabla"
+ }
+
+Message ok générique :
+<ok>
+ {
+ "reply" : "ok"
+ }
+
C.1. Login
----------
C.1. Login
----------
@@
-55,7
+68,7
@@
ou
s -> c
\r
{
\r
"reply" : "login",
\r
s -> c
\r
{
\r
"reply" : "login",
\r
- "status" : "registration_ok" | "authentification_ok"
| "error"
,
\r
+ "status" : "registration_ok" | "authentification_ok",
\r
"cookie" : "LKJDLAKSJBFLKASN",
\r
"id" : 193,
\r
"pseudo" : "Paul",
\r
"cookie" : "LKJDLAKSJBFLKASN",
\r
"id" : 193,
\r
"pseudo" : "Paul",
\r
@@
-68,8
+81,7
@@
s -> c
"root" : 123,
\r
"page" : 1
\r
}
\r
"root" : 123,
\r
"page" : 1
\r
}
\r
- ],
\r
- "error_message" : "blabla"
\r
+ ]
\r
}
\r
}
\r
@@
-84,7
+96,6
@@
c -> s
C.3. Profile
------------
C.3. Profile
------------
-Modification du profile, seul "cookie" est obligatoire.
c -> s
\r
{
\r
c -> s
\r
{
\r
@@
-95,7
+106,7
@@
c -> s
"pseudo" : "Paul",
\r
"email" : "paul@pierre.com",
\r
"css" : "css/3/euphorik.css",
\r
"pseudo" : "Paul",
\r
"email" : "paul@pierre.com",
\r
"css" : "css/3/euphorik.css",
\r
- "main
P
age" : 1,
\r
+ "main
_p
age" : 1,
\r
"conversations" : [
\r
{
\r
"root" : 123,
\r
"conversations" : [
\r
{
\r
"root" : 123,
\r
@@
-104,11
+115,10
@@
c -> s
]
\r
}
\r
]
\r
}
\r
-s -> c
\r
- {
\r
- "reply" : "ok" | "error",
\r
- "error_message" : "blabla"
\r
- }
+s -> c
+ <ok>
+ou
+ <error>
C.4. Wait event
C.4. Wait event
@@
-122,7
+132,7
@@
c -> s
"cookie" : "LKJDLAKSJBFLKASN",
\r
"message_count" : 10,
\r
"last_message_id" : 163,
"cookie" : "LKJDLAKSJBFLKASN",
\r
"message_count" : 10,
\r
"last_message_id" : 163,
- "main
P
age" : 1,
+ "main
_p
age" : 1,
"conversations" : [
{
"root" : 123,
"conversations" : [
{
"root" : 123,