This is a simple API for a small game server handling the game of Go. For the rules used as a reference when building this application,
方便设计API的文档规范. For the rules used as a reference when building this application,
see [The Rules of Go](https://en.wikipedia.org/wiki/Rules_of_go)
see [The Rules of Go](https://en.wikipedia.org/wiki/Rules_of_go)
# Group upms
# Group upms
A match is the unit of active gameplay within Go. Each match is assigned a unique GUID upon creation, and all references to the match
这是个例子用UMPS用户模块来说明通用接口规范如何定义
via this API are thereafter keyed by the match ID.
## upms user
## upms user
The matches collection represents the matches currently ongoing being handled by the server at the time. It does not cover historical access to old game records.
用户模块
### user page [GET /admin/user/page]
### user page [GET /admin/user/page{?current,size,other}]
用户分页.
用户分页
+ Parameters
+ current (number, optional) - 当前页
+ Default: `1`
+ size (number, optional) - 每页几条
+ Default: `20`
+ other (number, optional) - 这里是搜索参数, 如 `username` 用户名搜索.
+ Default: `张超`
+ Response 200 (application/json)
+ Response 200 (application/json)
...
@@ -27,13 +35,22 @@ The matches collection represents the matches currently ongoing being handled by
...
@@ -27,13 +35,22 @@ The matches collection represents the matches currently ongoing being handled by
用户新增.
用户新增.
+ Request (application/json)
{
"username" : "zhangchao",
"playerWhite" : "bob",
"playerBlack" : "alfred"
}
+ Response 200 (application/json)
+ Response 200 (application/json)
{"code":0,"msg":"success","data":true}
{"code":0,"msg":"success","data":true}
### delete user [POST /admin/user/delete/{id}]
### delete user [POST /admin/user/delete/{id}]
Liberties are positions adjacent to a player chain. You might use this resource if your game client implements a hint or cheat functionality that highlights potential positions onto which a player can place a stone.
用户删除
+ Parameters
+ Parameters
...
@@ -44,15 +61,19 @@ Liberties are positions adjacent to a player chain. You might use this resource
...
@@ -44,15 +61,19 @@ Liberties are positions adjacent to a player chain. You might use this resource
{"code":0,"msg":"success","data":true}
{"code":0,"msg":"success","data":true}
### update user [POST /admin/user/update/{id}]
### update user [POST /admin/user/update]
A chain is a list of adjacent stones. See Go rules for a definition of adjacent. Note that a single stone can be considered a chain.
用户更新
You might want to use this resource if your game client implements handy functionality that might highlight any