地点(机厅)
大约 3 分钟
根 URL:
/place/{cityName}/{placeName}
GET 查询地点详情
查询地点详情
子 URI:
根据地点名(或别名)(可模糊查找)获取地点信息,查询参数 queryType
有三种值可选,对应三种查询结果:
common
: 地点全称,更新时间,当前排卡数,是否更新过,地点公告forLogs
: 地点全称,卡数修改日志,地点公告forAliases
: 地点全称,该地点的全部别名
Parameters
参数类型 | 字段名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|---|
Path | cityName | String | 是 | 准确省市全称 |
Path | placeName | String | 是 | 模糊地点名/别名 |
Query | queryType | String | 是 | 查询类型:common 或forLogs 或forAliases |
Responses
queryType=common
字段名 | 数据类型 | 说明 |
---|---|---|
id | Integer | 地点 ID |
name | String | 地点全称 |
updateTime | Datetime | 更新时间 |
cardCount | Integer | 当前排卡数 |
isUpdated | Boolean | 经每天初始化后是否再次更新过 |
announcements | Array | 公告 |
> id | Long | 公告 ID |
> uploaderId | Long | 发布者 QQ 号 |
> uploaderGroupId | Long | 发布者 QQ 群号 |
> content | String | 公告内容 |
> createTime | Datetime | 公告发布时间 |
> expireTime | Datetime | 公告过期时间 |
queryType=forLogs
字段名 | 数据类型 | 说明 |
---|---|---|
id | Integer | 地点 ID |
name | String | 地点全称 |
logs | Array | 卡数修改日志 |
> id | Long | 日志 ID |
> createTime | Datetime | 日志创建时间 |
> uploaderId | Long | 修改者 QQ 号 |
> uploaderGroupId | Long | 修改者 QQ 群号 |
> operateCount | Integer | 修改数量 |
> afterCount | Integer | 修改后卡数 |
announcements | Array | 公告 |
> id | Long | 公告 ID |
> uploaderId | Long | 发布者 QQ 号 |
> uploaderGroupId | Long | 发布者 QQ 群号 |
> content | String | 公告内容 |
> createTime | Datetime | 公告发布时间 |
> expireTime | Datetime | 公告过期时间 |
queryType=forAliases
字段名 | 数据类型 | 说明 |
---|---|---|
id | Integer | 地点 ID |
name | String | 地点全称 |
aliases | Array | 别名 |
> id | Long | 别名 ID |
> name | String | 别名名称 |
Examples
GET: /place/安徽省合肥市/泛时空?queryType=common
200 OK: {
"id": 114,
"name": "泛时空合肥庐阳店",
"updateTime": "2024-01-20T16:12:04.181265",
"cardCount": 4,
"isUpdated": true,
"announcements": [
{
"id": 114514,
"uploaderId": 12345678,
"uploaderGroupId": 87654321,
"content": "1p坏了,只能单刷",
"createTime": "2024-01-16T15:00:26.420054",
"expireTime": "2024-01-23T04:00:00"
}
]
}
GET: /place/安徽省合肥市/泛时空?queryType=forLogs
200 OK: {
"id": 114,
"name": "泛时空合肥庐阳店",
"logs": [
{
"id": 74,
"createTime": "2024-01-20T14:41:57.12079",
"uploaderId": 12345678,
"uploaderGroupId": 87654321,
"operateCount": 8,
"afterCount": 8
},
{
"id": 115,
"createTime": "2024-01-20T16:12:04.181265",
"uploaderId": 456789123,
"uploaderGroupId": 789456321,
"operateCount": -4,
"afterCount": 4
}
],
"announcements": [
{
"id": 114514,
"uploaderId": 12345678,
"uploaderGroupId": 87654321,
"content": "1p坏了,只能单刷",
"createTime": "2024-01-16T15:00:26.420054",
"expireTime": "2024-01-23T04:00:00"
}
]
}
GET: /place/安徽省合肥市/泛时空?queryType=forAliases
200 OK: {
"id": 114,
"name": "泛时空合肥庐阳店",
"aliases": [
{
"id": 92,
"name": "宜家"
},
{
"id": 317,
"name": "泛"
}
]
}
PUT 更新地点卡数
更新地点卡数
子 URI:
根据地点名(或别名)(可模糊查找)以及更新表达式更新卡数并登记在日志中。
Parameters
参数类型 | 字段名 | 数据类型 | 是否必须 | 说明 |
---|---|---|---|---|
Path | cityName | String | 是 | 准确省市全称 |
Path | placeName | String | 是 | 模糊地点名/别名 |
Body | uploaderId | Integer | 是 | 更新者 QQ 号 |
Body | uploaderGroupId | Integer | 是 | 更新者 QQ 群号 |
Body | updateExpression | String | 是 | 更新表达式,如:=8 ,-6 ,+0 。仅支持= 、- 、+ 三种运算符。 |
Responses
字段名 | 数据类型 | 说明 |
---|---|---|
id | Integer | 地点 ID |
name | String | 地点全称 |
updateTime | Datetime | 更新时间 |
cardCount | Integer | 当前排卡数 |
isUpdated | Boolean | 经每天初始化后是否再次更新过 |
announcements | Array | 公告 |
> id | Long | 公告 ID |
> uploaderId | Long | 发布者 QQ 号 |
> uploaderGroupId | Long | 发布者 QQ 群号 |
> content | String | 公告内容 |
> createTime | Datetime | 公告发布时间 |
> expireTime | Datetime | 公告过期时间 |
Examples
PUT: /place/安徽省合肥市/泛时空
200 OK: {
"id": 114,
"name": "泛时空合肥庐阳店",
"updateTime": "2024-01-20T16:12:04.181265",
"cardCount": 4,
"isUpdated": true,
"announcements": [
{
"id": 114514,
"uploaderId": 12345678,
"uploaderGroupId": 87654321,
"content": "1p坏了,只能单刷",
"createTime": "2024-01-16T15:00:26.420054",
"expireTime": "2024-01-23T04:00:00"
}
]
}