github.com/jz0ojiang/go-maimai-player-counter
API 文档
Key | Value | Type |
---|---|---|
url | localhost:8080 | string |
Endpoint:
Method: GET
Type:
URL: {{url}}/getProvinceList
More example Requests/Responses:
Body: None
{
"code": 0,
"data": [
{
"code": 11,
"name": "北京市",
"full_code": "110000000000"
}
...
],
"message": "success"
}
Status Code: 200
Endpoint:
Method: GET
Type:
URL: {{url}}/getCityList/:provinceCode
URL variables:
Key | Value | Description |
---|---|---|
provinceCode | 11 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
provinceCode | 110000000000 |
Body: None
{
"code": 0,
"data": [
{
"code": 1101,
"name": "市辖区",
"province_code": 11,
"full_code": "110100000000"
}
],
"message": "success"
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
provinceCode | 11 |
Body: None
{
"code": 0,
"data": [
{
"code": 1101,
"name": "市辖区",
"province_code": 11,
"full_code": "110100000000"
}
],
"message": "success"
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
provinceCode | 0 |
Body: None
{
"code": -1,
"data": [],
"message": "no city found"
}
Status Code: 404
Endpoint:
Method: GET
Type:
URL: {{url}}/getCity/:cityCode
URL variables:
Key | Value | Description |
---|---|---|
cityCode | 1401 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
cityCode | 1401 |
Body: None
{
"code": 0,
"data": {
"code": 1401,
"name": "太原市",
"province_code": 14,
"full_code": "140100000000"
},
"message": "success"
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
cityCode | 0 |
Body: None
{
"code": -1,
"data": {},
"message": "no city found"
}
Status Code: 404
getArcade/:arcadeID 的机厅 ID 与华立公布的机厅列表的机厅 ID 一致
如果你想获取华立更新的机厅,直接进行一次请求即可,将自动添加至数据库中
Endpoint:
Method: GET
Type:
URL: {{url}}/getArcade/:arcadeID
URL variables:
Key | Value | Description |
---|---|---|
arcadeID | 0 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
arcadeID | 1001 |
Body: None
{
"code": 0,
"data": {
"arcade_id": 1001,
"arcade_name": "环游嘉年华天河店",
"machine_count": 4,
"address": "广东省广州市天河区天河路208号天河城6楼",
"province": {
"code": 44,
"name": "广东省",
"full_code": "440000000000"
},
"city": {
"code": 4401,
"name": "广州市",
"province_code": 44,
"full_code": "440100000000"
}
}
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
arcadeID | 0 |
Body: None
{
"code": -1,
"message": "arcade not found"
}
Status Code: 500
Endpoint:
Method: GET
Type:
URL: {{url}}/getArcadeList
More example Requests/Responses:
Body: None
{
"code": 0,
"data": [
{
"arcade_id": 1001,
"arcade_name": "环游嘉年华天河店",
"machine_count": 4,
"address": "广东省广州市天河区天河路208号天河城6楼",
"province": {
"code": 44,
"name": "广东省",
"full_code": "440000000000"
},
"city": {
"code": 4401,
"name": "广州市",
"province_code": 44,
"full_code": "440100000000"
}
},
{
"arcade_id": 1002,
"arcade_name": "环游嘉年华番禺易发店",
"machine_count": 3,
"address": "广东省广州市番禺区市桥街易发商业街新大新百货5楼",
"province": {
"code": 44,
"name": "广东省",
"full_code": "440000000000"
},
"city": {
"code": 4401,
"name": "广州市",
"province_code": 44,
"full_code": "440100000000"
}
},
...(1300+)
]
}
Status Code: 200
Endpoint:
Method: GET
Type:
URL: {{url}}/getArcadeList/city/:cityCode
URL variables:
Key | Value | Description |
---|---|---|
cityCode | 1101 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
cityCode | 1101 |
Body: None
{
"code": 0,
"data": [
{
"arcade_id": 1011,
"arcade_name": "北京乐酷电玩",
"machine_count": 2,
"address": "北京市海淀区远大路一号世纪金源购物中心5楼",
"province": {
"code": 11,
"name": "北京市",
"full_code": "110000000000"
},
"city": {
"code": 1101,
"name": "市辖区",
"province_code": 11,
"full_code": "110100000000"
}
},
{
"arcade_id": 1018,
"arcade_name": "风云再起北京西单店",
"machine_count": 2,
"address": "北京市西城区堂子胡同9号新一代商城六层",
"province": {
"code": 11,
"name": "北京市",
"full_code": "110000000000"
},
"city": {
"code": 1101,
"name": "市辖区",
"province_code": 11,
"full_code": "110100000000"
}
},
...
]
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
cityCode | 11011 |
Body: None
{
"code": -1,
"data": [],
"message": "no arcade found"
}
Status Code: 404
Endpoint:
Method: GET
Type:
URL: {{url}}/getArcadeList/province/:provinceCode
URL variables:
Key | Value | Description |
---|---|---|
provinceCode | 0 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
provinceCode | 11 |
Body: None
{
"code": 0,
"data": [
{
"arcade_id": 1011,
"arcade_name": "北京乐酷电玩",
"machine_count": 2,
"address": "北京市海淀区远大路一号世纪金源购物中心5楼",
"province": {
"code": 11,
"name": "北京市",
"full_code": "110000000000"
},
"city": {
"code": 1101,
"name": "市辖区",
"province_code": 11,
"full_code": "110100000000"
}
},
{
"arcade_id": 1018,
"arcade_name": "风云再起北京西单店",
"machine_count": 2,
"address": "北京市西城区堂子胡同9号新一代商城六层",
"province": {
"code": 11,
"name": "北京市",
"full_code": "110000000000"
},
"city": {
"code": 1101,
"name": "市辖区",
"province_code": 11,
"full_code": "110100000000"
}
},
...
]
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
provinceCode | 0 |
Body: None
{
"code": -1,
"data": [],
"message": "no arcade found"
}
Status Code: 404
Endpoint:
Method: GET
Type:
URL: {{url}}/getCount/:arcadeID
URL variables:
Key | Value | Description |
---|---|---|
arcadeID | 1001 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
arcadeID | 1002 |
Body: None
{
"code": 0,
"data": [
{
"arcade_id": 1002,
"count": 0,
"update_timestamp": 1703606400000,
"type": 0
}
],
"message": "success"
}
Status Code: 200
Query:
Key | Value | Description |
---|---|---|
arcadeID | 0 |
Body: None
{
"code": -1,
"message": "arcade not found"
}
Status Code: 500
【主要给网页工具使用,没有失败示例】
Endpoint:
Method: GET
Type:
URL: {{url}}/getCountByCity/:arcadeID
URL variables:
Key | Value | Description |
---|---|---|
arcadeID | 1101 |
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
arcadeID | 1101 |
Body: None
{
"code": 0,
"data": {
"1011": 0,
"1018": 0,
"1022": 0,
"1110": 0,
"1169": 0,
"1258": 0,
"1279": 0,
"1289": 0,
"1366": 0,
"1403": 0,
"1440": 0,
"1468": 0,
"1476": 0,
"1485": 0,
"1504": 0,
"1525": 0,
"1533": 0,
"1601": 0,
"1615": 0,
"1691": 0,
"1740": 0,
"1808": 0,
"1813": 0,
"1852": 0,
"1861": 0,
"1920": 0,
"1984": 0,
"2007": 0,
"2036": 0,
"2051": 0,
"2069": 0,
"2072": 0,
"2076": 0,
"2218": 0,
"2228": 0,
"2258": 0,
"2266": 0,
"2326": 0,
"2337": 0,
"2345": 0,
"2381": 0,
"2407": 0,
"2439": 0,
"2482": 0,
"2506": 0,
"2521": 0,
"2569": 0,
"2592": 0,
"2622": 0
},
"message": "success"
}
Status Code: 200
Endpoint:
Method: POST
Type: RAW
URL: {{url}}/logCount
Body:
{
"arcade_id": 1001,
"count": 0,
"type": 2,
"token": "test"
}
More example Requests/Responses:
Body:
{
"arcade_id": 1001,
"count": 1,
"type": 2,
"token": "test"
}
{
"code": 0
}
Status Code: 200
Body:
{
"arcade_id": 1001,
"count": 1,
"type": 2,
"token": "test2"
}
{
"code": -1,
"message": "invalid token"
}
Status Code: 400
Body:
{
"arcade_id": 1001,
"count": 1,
"type": 0,
"token": "test"
}
{
"code": -1,
"message": "I'm a teapot"
}
Status Code: 418
Body:
{
"arcade_id": 1001,
"count": -1,
"type": 2,
"token": "test"
}
{
"code": -1,
"message": "invalid count"
}
Status Code: 400
这里的 token 需要使用 TOTP 生成动态口令
【即将弃用,机厅数据前往全国音游地图修改】
Endpoint:
Method: POST
Type: RAW
URL: {{url}}/createCustomArcade
Body:
{
"arcade_name": "机厅名称",
"address": "机厅地址",
"machine_count": 1, // 机台数量
"province_code": 11, // 省份 ID
"city_code": 1101, // 城市ID
"token": "123456" // TOTP 动态密码
}
More example Requests/Responses:
Body:
{
"arcade_name": "机厅名称",
"address": "机厅地址",
"machine_count": 1, // 机台数量
"province_code": 11, // 省份 ID
"city_code": 1101, // 城市ID
"token": "123456" // TOTP 动态密码
}
{
"code": -1,
"message": "invalid token"
}
Status Code: 400
【即将弃用】
Endpoint:
Method: POST
Type: RAW
URL: {{url}}/deleteArcade
Body:
{
"arcade_id": 1101, // 机厅 ID
"token": "123456" // TOTP 动态密码
}
Endpoint:
Method: POST
Type: RAW
URL: {{url}}/updateArcade
Body:
{
"token": "123456" // TOTP 动态密码
}
Endpoint:
Method: POST
Type: RAW
URL: {{url}}/generateToken
Body:
{
"token": "123456", // TOTP 动态密码
"remark": "备注"
}
Generated by docgen