wonderfl API Methods
These are the methods supported.
GET /user/<username>
-
Description: get user information
-
HTTP method: GET
-
Parameters:
-
api_key: Required. The API Key.
-
api_key: Required. The API Key.
-
Request example:
GET http://api.wonderfl.net/user/mash?api_key=<api_key> HTTP/1.1 -
Response example:
HTTP/1.1 200 ok Connection: close Content-Length: ...snip... Content-Type: application/json; charset=utf-8 Date: ...snip... { "user": { "icon":"http://wonderfl.net/images/icon/7/73/73b5/73b56ff18985ef4501c948d2e008594c4ebd2d90m", "external_url":"http://maaash.jp/", "name":"mash", "description":"...snip..." }, "stat":"ok" }
GET /user/<username>/codes
-
Description: get recent 20 codes posted by <username>
- HTTP method: GET
-
Parameters:
-
api_key: Required. The API Key.
-
api_key: Required. The API Key.
-
Request example:
GET http://api.wonderfl.net/user/mash/codes?api_key=<api_key> HTTP/1.1 -
Response json example:
{ "codes": [ { "thumbnail":"http://wonderfl.net/images/capture/f/fb/fb97/fb973865de86ca120daf586670a4d7ad5f353ebe.jpg", "parent":null, "compile_ok":"1", "id":"d6a0d0150fe63aaa6ae71fe827a0e0f201bd6041", "created_date":1254214859, "title":"flash on 2009-9-29", "license":"other", "swf":"http://swf.wonderfl.net/swf/usercode/d/d6/d6a0/d6a0d0150fe63aaa6ae71fe827a0e0f201bd6041.swf" }, { "thumbnail":"http://wonderfl.net/images/capture/0/0c/0c87/0c873d9dd5d1695ad9892cedd9ccbfc83a490494.jpg", "parent":null, "compile_ok":"1", "id":"ef31a1c226dd2acf60c14af9f99a6adefc87e26d", "created_date":1254130273, "title":"flash on 2009-9-28", "license":"MIT", "swf":"http://swf.wonderfl.net/swf/usercode/e/ef/ef31/ef31a1c226dd2acf60c14af9f99a6adefc87e26d.swf" }, ...snip... ], "stat":"ok" }
GET /code/<codeid>
-
Description: get code information
- HTTP method: GET
-
Parameters:
-
api_key: Required. The API Key.
-
api_key: Required. The API Key.
-
Request example:
GET http://api.wonderfl.net/code/ef31a1c226dd2acf60c14af9f99a6adefc87e26d?api_key=<api_key> HTTP/1.1 -
Response json example:
{ "code": { "thumbnail":"http://wonderfl.net/images/capture/0/0c/0c87/0c873d9dd5d1695ad9892cedd9ccbfc83a490494.jpg", "as3":"...snip...", "parent":null, "modified_date":1254214438, "compile_ok":"1", "created_date":1254130273, "forked_count":"0", "license":"MIT", "swf":"http://swf.wonderfl.net/swf/usercode/e/ef/ef31/ef31a1c226dd2acf60c14af9f99a6adefc87e26d.swf", "diff":"0", "user": { "icon":"http://wonderfl.net/images/icon/7/73/73b5/73b56ff18985ef4501c948d2e008594c4ebd2d90m", "name":"mash" }, "title":"flash on 2009-9-28", "id":"ef31a1c226dd2acf60c14af9f99a6adefc87e26d", "favorite_count":"0" }, "stat":"ok" }
GET /code/<codeid>/forks
-
Description: get recent 50 codes forked from <codeid>
- HTTP method: GET
-
Parameters:
-
api_key: Required. The API Key.
-
api_key: Required. The API Key.
-
Request example:
GET http://api.wonderfl.net/code/a0b5e4a3ee41798759e1bbacd65f06a1fe3be991/forks?api_key=<api_key> HTTP/1.1 -
Response json example:
{ "forks": [ { "thumbnail":"http://wonderfl.net/img/common/noswf_100.gif", "parent":"a0b5e4a3ee41798759e1bbacd65f06a1fe3be991", "compile_ok":"0", "user": { "icon":"http://wonderfl.net/img/common/img_user_anonymous.gif", "name":"hacker_l95hn0cz" }, "created_date":1252930621, "id":"14ff1748980d4def239a847aba65ccd4ed8eae25", "title":"forked from: wonderfl KeyVisual V.4.ja", "license":"all", "swf":"http://swf.wonderfl.net/swf/usercode/1/14/14ff/14ff1748980d4def239a847aba65ccd4ed8eae25.swf", "diff":"1", }, { ...snip... }, ], "stat":"ok" }
GET /score/<appid>
-
Description: get score ranking for your <appid>, submit score by using the POST API
- HTTP method: GET
-
Parameters:
-
api_key: Required. The API Key.
-
appid : Required in the request endpoint. String, case insensitive. The id for your game or application or whatever you want the score ranking for.
-
descend: Optional. 1 or 0, defines the order of the score ranking. Defaults to 1.
-
limit : Optional. 1 to 99, defines the number of entries in the score ranking. Defaults to 20.
-
api_key: Required. The API Key.
-
Request example:
GET http://api.wonderfl.net/score/a0b5e4a3ee41798759e1bbacd65f06a1fe3be991?api_key=<api_key> HTTP/1.1 -
Response json example:
{ "scores": [ { "name":"mash4", "score":"82" }, { "name":"mash3", "score":"59" }, { "name":"mash2", "score":"46" }, { ...snip... } ], "stat":"ok" }
POST /score/<appid>
-
Description: post score for your <appid> to create an entry in your score ranking, which you can fetch by GET API
- HTTP method: POST
-
Parameters:
-
api_key: Required. The API Key.
-
name : Required. String consists of [a-z0-9_] case insensitive, length to be min:3, max:30. The name of the player who got the score.
-
score : Required. Integer value. from -2147483648 to 2147483647. The score.
-
api_key: Required. The API Key.
-
Request example:
POST http://api.wonderfl.net/score/xxxxxxxxxxxxxxxxx HTTP/1.1 Host: api.wonderfl.net Content-Type: application/x-www-form-urlencoded Content-Length: 69 api_key=<api_key>&name=mash&score=9999 -
Response json example:
{"stat":"ok"}