diff options
-rw-r--r-- | Documentation.txt | 44 |
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 + + |