Rules Current Competition Submit a solution Submission table - Main Submission table - Ext Competition results Hall of Fame Past Competitions About
比赛规则 本期比赛关卡 提交答案 提交列表 - 1 提交列表 - 2 比赛结果 荣誉殿堂 往期比赛 比赛简介 比赛诗选
歪推箱子 推箱子加加 睿斗推箱子 推箱快手 SokoPlayer SokoPlayer HTML5 USokoban [Linux] SokoFind LURD2XSB 推箱子工具 [Utilities] 推箱子变种 [Variants]
关卡平台 sokoban.org 字母表 [alphabet] 十二生肖 [zodiac] 2012精选 [bestof2012] 2013精选 [bestof2013] 关卡答案
MF8论坛推箱子版 百度贴吧推箱子 QQ群:92017135
XSB2MF8 [中文] XSB2MF8 [English] XSB2MF8 [sokojava] 关卡旋转工具 LURD2XSB工具 LURD转换工具 推箱子GIF动画制作教程 [skyivben] XSB2image [skyivben] image2XSB
推箱子常见问答 [FAQ] 推箱子格式 [XSB & Lurd] 推箱子基本概念:空位 推箱子新手之路 推箱子GIF动画制作教程 逆推教程 推箱子文档下载 推箱子相关博客文章
HTML5地理小测验 HTML5图论小工具 HateTris
SokoPlayer HTML5 SokoPlayer JavaApplet USokoban [Linux] sokoban.py Sokoban.WS Tools SokoFind SokoLines HTML5
推箱子常见问答 [FAQ] 关于推箱子 [XSB & Lurd] 推箱子文档下载 关于比赛 关于本站 墙纸下载 [Wallpaper] 友情链接 [Links] 我的博客 [Blog] Credits

REST API for MF8 Sokoban Competition

All APIs response in JSON format. All strings are encoded in UTF-8.

中文API说明点击下载

Retrieve Competition Data

URI: http://sokoban.ws/api/competition/
Method: GET
Parameter: id = number

Parameter is not necessary. If no parameter provided, then the response will be the latest competition. If 'id' is specified, then it must be >= 20 and <= the 'id' of the latest competition.

Each level contains a 'title' and an 'alt_title'. The 'title' (and 'author') may contain UTF-8 encoded Chinese characters. In such cases, 'alt_title' provides an English translation for the title. Otherwise, the 'alt_title' can be an empty string or NULL.

The 'level' itself is in one-line XSB format, and the rows are seperated by '|'. FLOORs are reprensented by either '_' or '-'.

The 'extra' level is NULL for 'id' < 43.

Following are a few examples.

Example 1

request: GET http://sokoban.ws/api/competition/
response:

{
	"id":49,
	"begin":"2013-07-26 07:00:00",
	"end":"2013-08-16 07:00:00",
	"main":null,
	"extra":null
}

Example 2

request: GET http://sokoban.ws/api/competition/?id=48
response:

{
	"id":"48",
	"begin":"2013-06-27 08:30:00",
	"end":"2013-07-19 08:30:00",
	"main":{
			"author":"Marcus Palstra+GRIGoRusa+York Shen+gyjgw+anian+20603",
			"title":"\u58f0\u4e1c\u51fb\u897f (MF8 48th Sokoban Competition, Main)",
			"alt_title":"; Make a feint to the east but attack in the west",
			"level":"_####______________|_#-.###############|_#.-$---$---.$----#|_#--##@-$---#.###-#|_#$-####$####---#-#|_#--###.*-.--.#*--#|_#$-##-.#-*-#---###|_#--##-$$*-##-#$#__|_#$-##--#-*-*-$-###|_#----#.#.-*--*-$-#|_#$-#.--#.#####-#-#|_#-$##-##.----#.--#|##$--....*#-#-.-*-#|#---$-$-----###*-##|#-$#######--#_#--#_|#--#_____####_####_|####_______________"
		},
	"extra":{
			"author":"\u98ce\u8fc7\u4e86\u65e0\u75d5(SokoWind) + anian + stopheart + gyjgw",
			"title":"\u524d\u65b9\u65bd\u5de5 [\u968f\u5fc3\u5173\u5361\u7b2c41\u5173 \u6c6a\u661f\u4ebae] (MF8 48th Competition, Extra)",
			"alt_title":"; Road work ahead [SuiXin #41 - Dog version e]",
			"level":"__________________########___|_________________#--------#__|###___________####-######-#__|#____________#------#---#-#__|#######_____#--####--*--#--#_|#------######-#-.-**##-###-#_|#-####------#-*---*-#--*.-$-#|#-#--##-###-#--###*---#-----#|#--$-#-*###-#-*--#--**######_|###--#----#-$*--**-#--.-#____|__#.-#--#-##*--*-*.#--$-##___|__#*-####-##--#*--$-*#-#_____|__#-#-----*@*-#-*-*--##______|__#-----#####---*#--#________|__#######___#--**--##________|_____________#----#__________|______________####___________"
		}
}

Example 3

request: GET http://sokoban.ws/api/competition/?id=18
response:

{
	"error":"invalid id"
}

Retrieve Submission Data

URI: http://sokoban.ws/api/competition/submission/
Method: GET
Parameter: t=main or t=extra

If no parameter is provided, then it is the same as t=main.

This API always response with the submission list to the latest competition levels.

The country field of submission is using the country code Top Level Domain (ccTLD), such as "DE" = Germany, "FR" = France, "BG" = Bulgary, "CN" = China, etc. "00" means the country/region is not specified.

{
	"id":49,
	"label":"extra",
	"submission":[
		{
			"time":"2013-07-26 09:04:17",
			"name":"\u4e00\u76ee\u4e86\u7136",
			"country":"CN",
			"move":224,
			"push":51
		},
		{
			"time":"2013-07-26 09:43:49",
			"name":"shengli03",
			"country":"CN",
			"move":306,
			"push":59
		},
		{
			"time":"2013-07-26 09:46:37",
			"name":"shengli03",
			"country":"CN",
			"move":224,
			"push":51
		}
	]
}

Created: July 26, 2013.