?>
By default server returns response in JSON
Success response: { "result":200, "reason":"", "body":{ "config":{ "app_version":"1", "api_version":"1.0", "eula_version":1, "fb_app_id":"107187176024768", "force_wifi":false, "site_url":"http:\/\/www.battlecam.com\/" }, "session_key":"random_unique_session_key_provided_by_server" } }
Success response: { "result": 200, "reason": "", "body": { "eula_text": "Text" } }
Success response: { "result": 200, "reason": "", "body": true }
Success response: { "result": 200, "reason": "", "body": true }
Fail response: { "result": 400, "reason": "Wrong user registration data", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": { "user_info": { "id": "3895337", "email": "misotteli-9747@yopmail.com", "login": "misotteli-9747@yopmail.com", "fullname": "misotteli-9747 misotteli-9747", "nickname": "misotteli-9747", "is_online": true, "country": "", "city": "", "channel_url": "http://www.battlecam.com/misotteli-9747", "channel_id": "3424256", "points": 0, "dollars": 0, "rank": "94172", "image": "http://static.battlecam.com/image-path.jpg", "is_admin": false } } }
Fail response: { "result": 400, "reason": "Wrong Login/Password combination", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": true }
Fail response: { "result": 403, "reason": "User not Authorized", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": [ { "group_id": 1, "title": "group name", "slug": "group-alias", "weight": 2 } ] }
Success response: { "result": 200, "reason": "", "body": [ { "room_id": 1, "title": "room name", "owner_id": 3093690, "is_private": false, "is_live": true, "owner_nickname": "room-alias", "users_count": 35, "guests_count": 18000, "screenshot": "http://static.battlecam.com/image-path.jpg" } ] }
Success response: { "result": 200, "reason": "", "body": { "room": { "id": 1, "title": "room name", "owner_id": "3093690", "owner_nickname": "room-alias", "delay_chat_messages": 0, "private_on": false, "fight_mode_on": true, "voting_on": true, "line_up_on": true, "chat_on": true, "fight_mode_active": true, "total_audience": 16037, "stream_user_id": "3171806", "url": "http://www.battlecam.com/room-alias", "standby_images": [ "http://www.battlecam.com/image-path.jpg" ] }, "broadcasters": { "primary": { "id": "3171806", "email": "brtbrt@aol.com", "login": "zeroping1", "fullname": "real_justin i own", "nickname": "real_justin", "is_online": true, "country": "AF", "city": "", "channel_url": "http://www.battlecam.com/real_justin", "channel_id": "3199879", "points": "271242", "dollars": "5530", "rank": "29", "image": "http://static.battlecam.com/image-path.jpg", "is_admin": false, "broadcast_time": 38 }, "secondary": { "id": "3585887", "email": "tjmooney33@gmail.com", "login": "tjmooney33@gmail.com", "fullname": "moonusdingus thomas Mooney", "nickname": "moonusdingus", "is_online": true, "country": "US", "city": "San Diego", "channel_url": "http://www.battlecam.com/moonusdingus", "channel_id": "3312557", "points": "4593", "dollars": "1561", "rank": "1793", "image": "http://static.battlecam.com/image-path.jpg", "is_admin": false, "broadcast_time": 38 } }, "stream": { "server_url": "rtmp://server-addr/battlecam/", "stream_primary": "bc_1", "stream_secondary": "bc_1s", "stream_owner": "bc_1o" }, "lineup": [ { "id": "3585887", "email": "tjmooney33@gmail.com", "login": "tjmooney33@gmail.com", "fullname": "moonusdingus thomas Mooney", "nickname": "moonusdingus", "is_online": true, "country": "US", "city": "San Diego", "channel_url": "http://www.battlecam.com/moonusdingus", "channel_id": "3312557", "points": "4593", "dollars": "1561", "rank": "1793", "image": "http://static.battlecam.com/image-path.jpg", "is_admin": false } ] } }
Success response: { "result": 200, "reason": "", "body": { "server_url": "rtmp://server-addr/battlecam/", "stream_primary": "bc_1", "stream_secondary": "bc_1s", "stream_owner": "bc_1o" } }
Fail response: { "result": 410, "reason": "Gone", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": { "yes": "0", "no": "480", "total_cnt": "1", "is_fight_mode": "0" } }
Fail response: { "result": 400, "reason": "error message", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": { "messages": [ { id": "568855694", "pdate": "1406560052", "user_id": "3714152", "user_ip": null, "msg": "Message text", "user_to": null, "geo_country_code": "us", "geo_country_code_image": "http://www.battlecam.com/image-path.png", "whitelabel_title": "Battlecam", "whitelabel_image": "http://static.battlecam.com/image-path.ico", "user_name": "SKUNKYBUDDY", "type": 0, "nickname_colour": "blue", "boss": "", "polit": "", "loser": "<img src="http://static.battlecam.com/image-path.gif" />", "ui_boss": "", "ui_polit": "", "ui_loser": "<span class="ui chat-labels loser">loser</span>", "user_badge_id": "js12_3714152" } ], "commands": [ { "code": "userEnter", "params": { "code": "userEnter", "user_id": "3189283", "avatar": "", "profile_url": "http://www.battlecam.dev/profile/3189283", "is_broadcaster": false, "user_name": "vitalik" }, "id": "418499040" } ], "last_chat_msg_id": 568856099 } }
Fail response: { "result": 410, "reason": "Gone", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": { "success": false, "action": "add", "reason": "Sorry, only group of users managed by room owner is allowed to broadcast", "prevent": true } }
Fail response: { "result": 400, "reason": "room_id must be numerical", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": true }
Fail response: { "result": 400, "reason": "vote_type is required", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": true }
Fail response: { "result": 403, "reason": "Authorization failed", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": true }
Fail response: { "result": 400, "reason": "You're not inside the room", "body": [ ] }
Method: get-archives-by-room-id
Success response: { "result": 200, "reason": "", "body": [ { "id": "4417586", "user_id": "3171806", "user_name": "real_justin", "room_id": "1", "date_time": "2014-07-28 14:27:08", "screenshot": "http://static.battlecam.com/image-path.jpg", "type": "flv", "link_download": "http://cloud.battlecam.com/file-path.flv", "link_stream": "http://cloud.battlecam.com/file-path.flv" } ] }
Method: get-archives-by-user-id
Success response: { "result": 200, "reason": "", "body": [ { "id": "4417586", "user_id": "3171806", "user_name": "real_justin", "room_id": "1", "date_time": "2014-07-28 14:27:08", "screenshot": "http://static.battlecam.com/image-path.jpg", "type": "flv", "link_download": "http://cloud.battlecam.com/file-path.flv", "link_stream": "http://cloud.battlecam.com/file-path.flv" } ] }
Success response: { "result": 200, "reason": "", "body": [ { "streamName": "http://cloud.battlecam.com/file-path.flv" }, { "streamName": "mp4:file-path.mp4", "streamURL": "rtmp://server-addr/streamer/" } ] }
Fail response: { "result": 410, "reason": "Gone", "body": [ ] }
Success response: { "result": 200, "reason": "", "body": { "user_info": { "id": "3093690", "email": "alki@filmon.com", "login": "alki", "fullname": "alkidavid A David", "nickname": "alkidavid", "is_online": true, "country": "US", "city": "", "channel_url": "http://www.battlecam.com/alkidavid", "channel_id": "1", "points": "204351", "dollars": "4083", "rank": "53", "image": "http://static.battlecam.com/image-path.jpg", "is_admin": true } } }
Fail response: { "result": 400, "reason": "User ID should be numerical", "body": [ ] }
Success response: callback({ "result": 200, "reason": "", "body": { "status": 0, "total": 65, "total_found": 65, "error": "", "warning": "", "time": 0, "matches": [ { "id": 31736, "title": "Battlecam.com`s 4th Annual Halloween Costume Contest 2013", "description": "GangstaGangstaMcGilacuty aka Ruen,1Natasha , Musicbattle, AJ, Fattoothless, Cjulia, Sugar, OGHotAsianGirl, Trumphant, 2High4Life, Cattitude, Westside, devilishmilf, TheRealScott77 aka Loukiboy, Erin as Christopher Reeves, OGLadybugs, Chrisgetit as Tony Romo, Pricelessone, Anneurysm as Alex from the movie Clockwork Orange, Tapatio, Croft, Glazed", "timepoint": 1383361830, "published_at": 1383361830, "watches": 56072, "votes": 3, "vote_average": 10, "virt_views": 0, "virt_views_hour": 0, "duration": 0, "count_comments": 0, "owner": { "id": "3173444", "nickname": "BestOfBattleCam", "fullname": "BestOfBattleCam BestOfBattleCam", "profile_url": "http://www.battlecam.dev/profile/3173444", "videos_url": "http://www.battlecam.dev/profile/videos/3173444", "avatar": { "205x308": "http://www.battlecam.dev/image-path.jpg", "150x150": "http://www.battlecam.dev/image-path.jpg", "105x105": "http://www.battlecam.dev/image-path.jpg" } }, "url": "http://www.battlecam.dev/video/31736", "images": { "cover": "http://www.battlecam.dev/image-path.jpg" } } ] } })