summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-05-29 18:32:48 +0000
committeryvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd>2009-05-29 18:32:48 +0000
commit13cad81f3af1e75d35d616250170543abbf4ebae (patch)
treebbddaecfabb6e9bf87b97e9efbe48d2dc40b2bd1
parentedbd895516124f948081e41276af16b88b5faf9d (diff)
downloadomegle-13cad81f3af1e75d35d616250170543abbf4ebae.tar.gz
omegle-13cad81f3af1e75d35d616250170543abbf4ebae.zip
update doc
git-svn-id: http://xapek.org/svn/common/omegle@1046 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
-rw-r--r--Documentation.txt44
1 files changed, 30 insertions, 14 deletions
diff --git a/Documentation.txt b/Documentation.txt
index 23772c3..0dcf566 100644
--- a/Documentation.txt
+++ b/Documentation.txt
@@ -1,26 +1,33 @@
====== API Documentation
-
==== Connection
URL: http://omegle.com/
-== Header (used in all API calls):
+HTTP-Header:
Host: omegle.com
Content-type: application/x-www-form-urlencoded; charset=utf-8
Accept: application/json
+All API-Calls return JSON-Data. The Returncode for success is "win", the
+errorcode is "fail".
+
==== Commands:
-== Start a conversation
+ O --> /count
+ \|/ --> /start() <- id
+ / \ --> /send(id,msg) <- "win"
+ --> /disconect(id) <- "win"
+ --> /events(id) <- "[[msg1],...]
+
+== /start - Start a conversation
URL: /start
+METHOD: POST
PARAM: {}
-RETURNS: {'id':'ABCDE'}
+RETURNS: "ABCDE"
ABCDE is a random string to identify the connection
-== Poll for events
-Note: The omegle sorver is blocking the connection if no event
- occured.
-
+== /events - Poll for events
URL: /events
+METHOD: POST
PARAM: {'id':'ABCDE'}
RETURNS: [[TYPE,data...],...]
@@ -38,21 +45,30 @@ Return Messagetypes:
["connected"] - ready to send messages
["strangerDisconnected"] - Stranger pressed disconnect
-== Send Message
+Note: The omegle sorver is blocking the connection if no event
+ occured.
+
+== /send - Send Message
URL: /send
PARAM: {'id':'ABCDE', 'msg':'ABCDE'}
-RETURNS: win
+RETURNS: "win"
+ "fail"
-== Disconnect/Quit Chat
+== /disconnect - Disconnect/Quit Chat
URL: /disconnect
+METHOD: POST
PARAM: {'id':'ABCDE'}
-RETURNS: win
+RETURNS: "win"
+ "fail"
-== Get user count
+== /count - Get user count
URL: /count
+METHOD: GET
PARAM: {}
-RETURNS: '1234'
+RETURNS: 1234
1234 is the number of users online
+
+