Mobile API: Difference between revisions
imported>Refractor No edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 38: | Line 38: | ||
[S_WORLDLIST]|13434341|clubpenguin_town_en_3|n7pcp1clubpgam12.clubpenguin.com|6448||crowdcontrol|clubpenguin_town_en_3|CPNext_dev_branch|255201684 | [S_WORLDLIST]|13434341|clubpenguin_town_en_3|n7pcp1clubpgam12.clubpenguin.com|6448||crowdcontrol|clubpenguin_town_en_3|CPNext_dev_branch|255201684 | ||
Notice the n7pcp1clubpgam12.clubpenguin.com and 6448 – these are the address and the port of the game server. | Notice the ''n7pcp1clubpgam12.clubpenguin.com'' and ''6448'' – these are the address and the port of the game server. Also the ''Accept-Language'' part is set to the device's OS language, even though CP may not support it. | ||
== Game server == | == Game server == |
Latest revision as of 17:49, 1 June 2015
- This is work in progress, but please contribute if you can.
The Mobile API consists of multiple parts.
Disney API endpoints
Disney API endpoints are used for authentication, getting information about players and buying items. Disney API endpoints are located at https://api.disney.com/clubpenguin/mobile/v2/ and are accessed through HTTPS.
wns
wns is used for finding out the address of server (room) to connect.
GET //api/v0.2/xxx/game/get/world-name-service/start_world_request?name=clubpenguin_town_en_3&product_name=clubpenguin&owner=SWID&token=TOKEN HTTP/1.1 Accept-Encoding: gzip, deflate Connection: close User-Agent: clubpenguin_quests_release/1.6.4 CFNetwork/672.0.2 Darwin/13.0.0 Accept-Language: en_US Accept: */* Cookie: JSESSIONID=SESSION Host: n7vcp1clubpwns.clubpenguin.com:80
HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/plain;charset=UTF-8 Content-Language: en-US Content-Length: 146 Date: Wed, 27 May 2015 00:04:28 GMT Connection: close
[S_WORLDLIST]|13434341|clubpenguin_town_en_3|n7pcp1clubpgam12.clubpenguin.com|6448||crowdcontrol|clubpenguin_town_en_3|CPNext_dev_branch|255201684
Notice the n7pcp1clubpgam12.clubpenguin.com and 6448 – these are the address and the port of the game server. Also the Accept-Language part is set to the device's OS language, even though CP may not support it.
Game server
Game server is responsible for rest of the things that were previously covered by Extension in SFS – that is, most of all, interaction between players. In addition game server provides players with meshes and textures of the rooms.
After opening a socket, client specifies the device type (might be useless as android passes iOS as os) and then authenticates using SWID and a token.
Client sends request in the form /command arg1 arg2 …
, server uses [TAG]|arg1|arg2|…
/user_agent deviceType=iPhone,os=iOS_7.1,displayRes=720x1280,platform=goo /login live SWID TOKEN [S_USERAGENT]|0|deviceType=iPhone,os=iOS_7.1,displayRes=720x1280,platform=goo [S_LOGINDEBUG]|Got /login command from user [S_LOGINDEBUG]|Successfully verified credentials server-side [S_LOGINDEBUG]|Finalizing login, creating final user object [S_LOGIN]|SWID| [S_WORLDTYPE]|0|1|0 [S_WORLD]|13434341|clubpenguin_town_en_3|0:113140001|0|none|0|crowdcontrol|clubpenguin_town_en_3|0|200.5991|0 [W_BASEASSETURL]| [W_DISPLAYSTATE]| [W_ASSETSCOMPLETE]|SWID| /ready [W_INPUT]|use|0:10|2|3|0|use| [W_INPUT]|touch-the-terrain|0:8600033|1|6|0|path_terrain| [W_INPUT]|mouse-the-terrain|0:8600033|1|3|0|path_terrain| [W_PLACE]|0:205790002|2|0 [P_MAPBLOCK]|t|1|1|iVBORw0KGgoAAAANSUhEUgAAAEAAAAAoCAAAAABrpaM1AAAANElEQVRIiWNgGAWjYBSMghEJGEEAhzAc4BDGqoSgykFrALo55BoAN2XUgFEDiM+Jo2BQAwDdDQLtiDfyPgAAAABJRU5ErkJggg== [P_MAPBLOCK]|h|1|1|iVBORw0KGgoAAAANSUhEUgAAAEEAAAApCAAAAABPOxuuAAAAIklEQVRIie3MIQEAAAACIKc73RFWGED6isFgMBgMBoPBcBgfzjTMSGY6zQAAAABJRU5ErkJggg== [P_ZOOMLIMIT]|-1.000000|-1.000000 [P_RENDERFLAGS]|0|48 [P_SIZE]|64|40 [P_VIEW]|5 [P_START]|3|7|0 [P_LOCKVIEW]|0 [P_TILESIZE]|16 [P_ELEVSCALE]|0.031250 [P_RELIEF]|1 [P_LOCKSCROLL]|1|0|0|51842872 [P_HEIGHTMAPSCALE]|0.078125|128 [P_HEIGHTMAPDIVISIONS]|1 [P_CAMERA3D]|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|0|0.000000|0.000000|0.000000|0.000000|0.000000|0.000000|864397819904.000000|0.000000|0|0 [UI_BGCOLOR]|255|255|255 [P_DRAG]|0 [P_CAMLIMITS]|0|0|0|0 [P_LOCKRENDERSIZE]|0|1024|640 [P_LOCKOBJECTS]|0 [UI_BGSPRITE]|-1:-1|0|0.000000|0.000000 [P_TILE]|0||1|1|1|0:2|blocking|0|0|0|0:48340034 [P_TILE]|1||0|1|1|0:10|clear|0|0|0|0:48340035 [P_PATHLAYER]|0|0|1|1|Player Pathing Layer [P_PATHLAYERTILE]|0|0|0 [P_PHYSICS]|0|0|0|0|0|0|0|1 [P_ASSETSCOMPLETE]|0|0 /place_ready [O_HERE]|556|0:2480001|3|7|0|1|90|-0|0||0:1|0|1|0 [O_CLIENTEVENT]|556|setAnimPaths|{"Marshmellow":"<base_asset_url>avatar/transformations/marshmellow/en_US/deploy/animation/all_platforms/all/","Olaf":"<base_asset_url>avatar/transformations/olaf/en_US/deploy/animation/all_platforms/all/","penguin":"<base_asset_url>avatar/penguin/en_US/deploy/animation/all_platforms/all/","puffle":"<base_asset_url>avatar/puffle/en_US/deploy/animation/all_platforms/all/"} [O_CLIENTEVENT]|556|setAvatarLoadingData|{"character":"penguin","lightBrightness":1.05,"lightDirection":{"x":0,"y":-3,"z":2},"positionEncoded":"{\"x\":0,\"y\":-1,\"z\":0}","rotation":{"x":2.0943951023932,"y":3.1415926535898,"z":3.1415926535898},"schemaJson":"<base_asset_url>avatar/jsonData/transformation_schema.json","shadow":"<base_asset_url>avatar/penguin/en_US/deploy/mesh/all_platforms/penguin_shadow.mmf","shadowFriend":"<base_asset_url>avatar/penguin/en_US/deploy/mesh/all_platforms/penguin_shadowGreen.mmf","shadowSelf":"<base_asset_url>avatar/penguin/en_US/deploy/mesh/all_platforms/penguin_shadowBlue.mmf","url":"<base_asset_url>avatar/penguin/en_US/deploy/mesh/all_platforms/penguin.mmf","zoom":"0.7"} [O_HERE]|146|0:2480001|3|7|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|148|0:2480001|54.5|32.5|0|1|74.2488|-0|0|Actor148|0:81040002|0|1|0 [O_YAW]|148|0.274914 [O_HERE]|159|0:2480001|41.5|30.5|0|1|72.7585|-0|0||0:1|0|1|0 [O_YAW]|159|0.30092 [O_HERE]|182|0:2480001|34.5|32.5|0|1|-50.6193|-0|0||0:1|0|1|0 [O_YAW]|182|2.45426 [O_HERE]|193|0:2480001|32|20|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|214|0:2480001|61.5|26.5|0|1|108.435|-0|0|Actor214|0:81040002|0|1|0 [O_YAW]|214|5.96143 [O_HERE]|217|0:2480001|51.6348|26.9076|0|1|103.496|-0|0|Actor217|0:81040002|0|1|0 [O_YAW]|217|6.04764 [O_PATH]|217|57.5|25.5|128|765|1 [O_HERE]|245|0:2480001|28|27|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|250|0:2480001|39.5|32.5|0|1|-51.6059|-0|0|Actor250|0:81040002|0|1|0 [O_YAW]|250|2.47149 [O_HERE]|252|0:2480001|45.5|31.5|0|1|74.0546|-0|0|Actor252|0:81040002|0|1|0 [O_YAW]|252|0.2783 [O_HERE]|351|0:45540001|45.1435|12.0833|0|1|0|0|0|Actor351|0:205790012|0|0|0 [O_HERE]|361|0:45540001|31.9386|18.4418|0|1|0|0|0|Actor361|0:205790014|0|0|0 [O_HERE]|376|0:2480001|61.5|25.5|0|1|108.435|-0|0|Actor376|0:81040002|0|1|0 [O_YAW]|376|5.96143 [O_HERE]|379|0:2480001|44|21|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|383|0:2480001|43.5|24.5|0|1|-15.2551|-0|0||0:1|0|1|0 [O_YAW]|383|1.83705 [O_HERE]|414|0:2480001|45|19|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|415|0:2480001|26|22|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|420|0:45540001|46.4194|22.0193|0|1|0|0|0|Actor420|0:205790015|0|0|0 [O_HERE]|422|0:2480001|60|26|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|425|0:2480001|49.5|20.5|0|1|90|-0|0|Actor425|0:81040002|0|1|0 [O_HERE]|459|0:45540001|53.3492|24.1082|0|1|0|0|0|Actor459|0:205790018|0|1|0 [O_HERE]|468|0:2480001|58|31|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|510|0:2480001|32|20|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|517|0:2480001|33.0738|20.3579|0|1|71.565|-0|0|Actor517|0:81040002|0|1|0 [O_YAW]|517|0.321751 [O_PATH]|517|36.5|21.5|128|379|1 [O_HERE]|519|0:2480001|37.5|28.5|0|1|-48.0128|-0|0||0:1|0|1|0 [O_YAW]|519|2.40877 [O_HERE]|520|0:45540001|56.6264|18.7754|0|1|0|0|0|Actor520|0:205790016|0|0|0 [O_HERE]|528|0:2480001|30.5|23.5|0|1|71.565|-0|0|Actor528|0:81040002|0|1|0 [O_YAW]|528|0.321751 [O_HERE]|541|0:45540001|53.1991|21.3688|0|1|0|0|0|Actor541|0:205790011|0|0|0 [O_HERE]|551|0:2480001|61.5|31.5|0|1|81.8699|-0|0|Actor551|0:81040002|0|1|0 [O_YAW]|551|0.141897 [O_HERE]|559|0:2480001|6.5|32.5|0|1|83.6598|-0|0|Actor559|0:81040002|0|1|0 [O_YAW]|559|0.110655 [O_HERE]|581|0:45540001|20.5558|19.1423|0|1|0|0|0|Actor581|0:205790019|0|1|0 [O_HERE]|593|0:45540001|1.38012|24.692|0|1|0|0|0|Actor593|0:205790021|0|1|0 [O_HERE]|597|0:205790002|-3.59375|0|0|1|0|0|0|Actor597|0:205790009|0|0|0 [O_HERE]|603|0:2480001|50.2172|25.2879|0|1|103.496|-0|0||0:1|0|1|0 [O_YAW]|603|6.04764 [O_PATH]|603|53.5|24.5|128|411|1 [O_HERE]|622|0:2480001|47.5|25.5|0|1|-21.8014|-0|0|Actor622|0:81040002|0|1|0 [O_YAW]|622|1.95131 [O_HERE]|626|0:45540001|32.7767|27.5606|0|1|0|0|0|Actor626|0:205790023|0|0|0 [O_HERE]|629|0:45540001|32.6724|17.5204|0|1|0|0|0|Actor629|0:205790020|0|1|0 [O_HERE]|630|0:45540001|60.7709|26.022|0|1|0|0|0|Actor630|0:205790022|0|1|0 [O_HERE]|642|0:2480001|60|27|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|643|0:45540001|46.0108|18.0958|0|1|0|0|0|Actor643|0:205790017|0|1|0 [O_HERE]|658|0:45540001|19.6677|18.3209|0|1|0|0|0|Actor658|0:205790013|0|0|0 [O_HERE]|660|0:45540001|37.5|27.4571|0|1|0|0|0|Actor660|0:50590003|0|0|0 [O_HERE]|694|0:2480001|15.5|25.5|0|1|99.4623|-0|0||0:1|0|1|0 [O_YAW]|694|6.11804 [O_HERE]|697|0:2480001|32.5|28.5|0|1|71.565|-0|0|Actor697|0:81040002|0|1|0 [O_YAW]|697|0.321751 [O_HERE]|725|0:2480001|2|32|0|1|90|-0|0||0:1|0|1|0 [O_HERE]|737|0:2480001|48.5|22.5|0|1|71.565|-0|0|Actor737|0:81040002|0|1|0 [O_YAW]|737|0.321751 [O_HERE]|739|0:2480001|50.5|31.5|0|1|74.0584|-0|0||0:1|0|1|0 [O_YAW]|739|0.278301 [O_HERE]|859|0:45540001|57.8814|31.9469|0|1|0|0|0|Actor859|0:205790010|0|0|0 [O_HERE]|930|0:2480001|41.5|29.5|0|1|-41.6335|-0|0|Actor930|0:81040002|0|1|0 [O_YAW]|930|2.29744 [O_CLIENTEVENT]|351|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareaclothing.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareaclothing.mmf"} [O_CLIENTEVENT]|351|setScale|1 [O_CLIENTEVENT]|351|playAnimation|{"looping":0,"name":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareaclothing.mma"} [O_CLIENTEVENT]|351|showModel [O_CLIENTEVENT]|351|playAnimation|{"name":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareaclothing.mma","seekTime":0} [O_CLIENTEVENT]|361|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareadance.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareadance.mmf"} [O_CLIENTEVENT]|361|setScale|1 [O_CLIENTEVENT]|361|playAnimation|{"looping":0,"name":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareadance.mma"} [O_CLIENTEVENT]|361|showModel [O_CLIENTEVENT]|361|playAnimation|{"name":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareadance.mma","seekTime":0} [O_CLIENTEVENT]|420|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_railing.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_railing.mmf"} [O_CLIENTEVENT]|420|setScale|1 [O_CLIENTEVENT]|459|loadModel|{"renderEnabled":0,"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggercloudforest.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggercloudforest.mmf"} [O_CLIENTEVENT]|459|setScale|1 [O_CLIENTEVENT]|520|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_thundertrees.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_thundertrees.mmf"} [O_CLIENTEVENT]|520|setScale|1 [O_CLIENTEVENT]|541|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_cannon.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_cannon.mmf"} [O_CLIENTEVENT]|541|setScale|1 [O_CLIENTEVENT]|581|loadModel|{"renderEnabled":0,"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggercoffee.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggercoffee.mmf"} [O_CLIENTEVENT]|581|setScale|1 [O_CLIENTEVENT]|593|loadModel|{"renderEnabled":0,"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerdock.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerdock.mmf"} [O_CLIENTEVENT]|593|setScale|1 [O_CLIENTEVENT]|626|loadModel|{"textureURL":"<base_asset_url>world/parties/<locale_string>/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_lang.mmt","url":"<base_asset_url>world/parties/<locale_string>/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_lang.mmf"} [O_CLIENTEVENT]|626|setScale|1 [O_CLIENTEVENT]|629|loadModel|{"renderEnabled":0,"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerdance.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerdance.mmf"} [O_CLIENTEVENT]|629|setScale|1 [O_CLIENTEVENT]|630|loadModel|{"renderEnabled":0,"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerforts.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerforts.mmf"} [O_CLIENTEVENT]|630|setScale|1 [O_CLIENTEVENT]|643|loadModel|{"renderEnabled":0,"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerclothing.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_trigger_touchtriggerclothing.mmf"} [O_CLIENTEVENT]|643|setScale|1 [O_CLIENTEVENT]|658|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareacoffee.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareacoffee.mmf"} [O_CLIENTEVENT]|658|setScale|1 [O_CLIENTEVENT]|658|playAnimation|{"looping":0,"name":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareacoffee.mma"} [O_CLIENTEVENT]|658|showModel [O_CLIENTEVENT]|658|playAnimation|{"name":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_doorareacoffee.mma","seekTime":0} [O_CLIENTEVENT]|660|loadModel|{"url":"<base_asset_url>avatar/penguin/en_US/deploy/mesh/all_platforms/animation_items/penguin_special_snowball_smooshed.mmf"} [O_CLIENTEVENT]|660|setObjectAngle|{"x":0,"y":0,"z":0} [O_CLIENTEVENT]|660|setScale|0.7 [O_CLIENTEVENT]|859|loadModel|{"textureURL":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_arrow2.mmt","url":"<base_asset_url>world/parties/en_US/deploy/metaplace/<device_string>/buildings/150520_may/150520_may_town/rm_object_arrow2.mmf"} [O_CLIENTEVENT]|859|setScale|1 [P_CAMERA]|32|20|0|0|1 [P_ZOOM]|1.000000 [P_LOCKZOOM]|1 [P_LOCKCAMERA]|1 [O_PLAYER]|556| [UI_SWFREF]|49781|0|name|0|0|1024|768|0|client.swf|clientCommunication [FX_PLAYSOUND]|0:206240008|23921|1|127|-1|0|-1|1 [UI_CLIENTEVENT]|49781|logGenericDMOAnalytics|{"action":"ping","event":"ping"}