get('/paintBoard') 返回 paintboard 页面
get('/paintBoard/board') 返回版面,格式与洛谷相同
post('/paintBoard/paint',{
x: x,
y: y,
color: color,
uid: LuoguUid,
token: Token
})
其中 x,y,color 的定义与洛谷相同,uid,token 的定义详见活动页面
地址 ws:
你应该先发送
{
"type": "join_channel",
"channel": "paintboard",
"channel_param": ""
}
服务器将回复
{
"type": "result"
}
如果版面有更新,服务器将发送
{
type: "paintboard_update",
"x": x,
"y": y,
"color": color,
}
定义与上述相同。
原帖链接 https://www.luogu.com.cn/discuss/544102,API 更新见上