diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-05-27 19:24:29 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2009-05-27 19:24:29 +0000 |
commit | 9a313ef854e588420ec52611ea014684aab5f0da (patch) | |
tree | 9c3a1cb8252e12b5eb8c891ad681cd47ab4c2418 | |
parent | fea6027bb1d12ce947366dd012cd839a12c319d2 (diff) | |
download | omegle-9a313ef854e588420ec52611ea014684aab5f0da.tar.gz omegle-9a313ef854e588420ec52611ea014684aab5f0da.zip |
blah
git-svn-id: http://xapek.org/svn/common/omegle@1010 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
-rw-r--r-- | Documentation.txt | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Documentation.txt b/Documentation.txt new file mode 100644 index 0000000..b2aa48b --- /dev/null +++ b/Documentation.txt @@ -0,0 +1,56 @@ +====== API Documentation + +==== Connection +URL: http://omegle.com/ + +== Header (used in all API calls): + Host: omegle.com + Content-type: application/x-www-form-urlencoded; charset=utf-8 + Accept: application/json + +==== Commands: +== Start a conversation +URL: /start +PARAM: {} + +RETURNS: {'id':'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. + +URL: /events +PARAM: {'id':'ABCDE'} + +RETURNS: [[TYPE,data...],...] + EXAMPLE 1: [["typing"], ["gotMessage", "im 22 m finland"]] + EXAMPLE 2: [["gotMessage", "ok"]] + EXAMPLE 3: [["typing"]] + EXAMPLE 4: [["typing"], ["gotMessage", "hi"], ["typing"], ["gotMessage", "asl"]] + EXAMPLE 5: [["waiting"], ["connected"]] + +Return Messagetypes: + ["typing"] - Stranger is typing + ["gotMessage", "ABCDE"] - Stranger send "ABCDE" + ["waiting"] - ??? + ["connected"] - ready to send messages + +== Send Message +URL: /send +PARAM: {'id':'ABCDE', 'msg':'ABCDE'} + +RETURNS: win + +== Disconnect/Quit Chat +URL: /disconnect +PARAM: {'id':'ABCDE'} + +RETURNS: win + +== Get user count +URL: /count +PARAM: {} + +RETURNS: '1234' + 1234 is the number of users online |