X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=doc%2Fprotocole3.txt;h=8c383c781228e8c86506d92254270ccb8c6a48ee;hb=3ea00589df90388456e8587b1bebdeab0f7e99fa;hp=f0b0b3847d83e066326693fcd1176aeb17c82ba5;hpb=13bf850da2316cde3ad2ff8d5c26fb32928bf7b4;p=euphorik.git diff --git a/doc/protocole3.txt b/doc/protocole3.txt index f0b0b38..8c383c7 100644 --- a/doc/protocole3.txt +++ b/doc/protocole3.txt @@ -128,7 +128,7 @@ ou -=== Wait event === +=== Wait event (page = chat) === Si "last_message_id" est absent alors le client ne possède pas de message. Si "main_page" est absent alors est vaut 1. "cookie" n'est pas obligatoire. @@ -140,7 +140,8 @@ c -> s "cookie" : "LKJDLAKSJBFLKASN", "message_count" : 10, "last_message_id" : 163, - "main_page" : 1 + "main_page" : 1, + "troll_id" : 45, "conversations" : [ { "racine" : 123, @@ -161,7 +162,8 @@ Le format de la date n'est pas formel. "last_page" : true | false, "messages" : [ { - "id" : 54, + "id" : 54, + "user_id" : 344, "date" : "Hier 17:26:54", "system" : true | false, "owner" : true | false, @@ -184,26 +186,96 @@ ou { "reply" : "message_updated", "message_id" : 123, - "contenu" : "Salut +++ poulpe" + "content" : "Salut +++ poulpe" + } +ou + { + "reply" : "new_troll", + "troll_id" : 123, + "content" : "Linux sera desktop ready en 2008 ?" } ou + + +=== Wait event (page = admin) === +c -> s + { + "action" : "wait_event", + "page" : "admin", + "last_troll" : 5 + } + +s -> c + { + "reply" : "troll_modified", + "troll_id" : 3, + "content" : "plop" + } +ou +s -> c + { + "reply" : "troll_added", + "trolls" : + [ + { + "troll_id" : 5, + "content" : "plop", + "author" : "" + "author_id" : 2 + } + ] + } +ou +s -> c + { + "reply" : "troll_deleted", + "troll_id" : 2 + } -=== Envoie d'un troll === -TODO +=== Envoie d'un troll === c -> s { "action" : "put_troll", "cookie" : "LKJDLAKSJBFLKASN", "content" : "Un bon troll velu !" - } -=== Modification d'un troll === -TODO -=== Suppression d'un troll === -TODO -=== Noter un troll === -TODO + } + +s -> c + +ou + + + +=== Modification d'un troll === +c -> s + { + "action" : "mod_troll", + "cookie" : "LKJDLAKSJBFLKASN", + "troll_id" : 3, + "content" : "Un bon troll velu 2 !" + } + +s -> c + +ou + + + +=== Suppression d'un troll === +c -> s + { + "action" : "del_troll", + "cookie" : "LKJDLAKSJBFLKASN", + "troll_id" : 3 + } + +s -> c + +ou + + === Envoie message === Le client envoie un message, le message peut répondre à un certain nombre d'autres messages. @@ -224,14 +296,29 @@ ou -=== Bannissement === +=== Slapage === +c -> s + { + "action" : "slap", + "cookie" : "LKJDLAKSJBFLKASN", + "user_id" : 67, + "reason" : "blablabla" + } + +s -> c + +ou + + +=== Bannissement === c -> s { "action" : "ban", "cookie" : "LKJDLAKSJBFLKASN", "duration" : 15, // en minute - "user_id" : 67 + "user_id" : 67, + "reason" : "blablabla" } s -> c