From 13cad81f3af1e75d35d616250170543abbf4ebae Mon Sep 17 00:00:00 2001 From: yvesf Date: Fri, 29 May 2009 18:32:48 +0000 Subject: update doc git-svn-id: http://xapek.org/svn/common/omegle@1046 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- Documentation.txt | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'Documentation.txt') 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 + + -- cgit v1.2.1