├── Home.jpg ├── Info.jpg ├── Config.jpg ├── Login.png ├── Server.png ├── History.png ├── gt4-android-sec.zip ├── README.md ├── idServerAPIDoc.md ├── quotaAPIDoc.md ├── ticketsAPIDoc.md └── arknightsAPIDoc.md /Home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/Home.jpg -------------------------------------------------------------------------------- /Info.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/Info.jpg -------------------------------------------------------------------------------- /Config.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/Config.jpg -------------------------------------------------------------------------------- /Login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/Login.png -------------------------------------------------------------------------------- /Server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/Server.png -------------------------------------------------------------------------------- /History.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/History.png -------------------------------------------------------------------------------- /gt4-android-sec.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/closure-studio/ReadMe/HEAD/gt4-android-sec.zip -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Closure-studio 可露希尔工作室 2 | ## _明日方舟arknights云端托管控制中心_ 3 | 4 | ## 官方地址 5 | 稳定版 | [https://arknights.host] 6 | 7 | 开发版 | [https://dev.arknights.host] 8 | 9 | 安卓APP应用 | [https://github.com/closure-studio/Closure-PRTS] 10 | 11 | ## 第三方应用 12 | 13 | 鸣谢何言先生与Joe先生为可露希尔工作室开发安卓应用 14 | 15 | 何言先生 | [https://github.com/heyanLE/Closure] 16 | 17 | Joe | [https://github.com/joe-vettek/ClosureHelper] 18 | 19 | ## 警告 20 | 若因账号密码错误无法登录请立刻加群联系管理员 21 | 22 | ## Features 23 | 24 | - 云端托管,无需平板,手机等载体 25 | - 多帐号支持 26 | - 支持官服与B服 27 | - 支持基建换班,理智清理,任务领取等日常任务 28 | 29 | ## 相关截图 30 | 31 | ![Login 图标](https://github.com/closure-studio/ReadMe/blob/main/Login.png "Login") 32 | ![Home 图标](https://github.com/closure-studio/ReadMe/blob/main/Home.jpg "Home") 33 | ![History 图标](https://github.com/closure-studio/ReadMe/blob/main/History.png "History") 34 | ![Info 图标](https://github.com/closure-studio/ReadMe/blob/main/Info.jpg "Info") 35 | ![Config 图标](https://github.com/closure-studio/ReadMe/blob/main/Config.jpg "Config") 36 | ![Server 图标](https://github.com/closure-studio/ReadMe/blob/main/Server.png "Server") 37 | ## 其他 38 | - 可露希尔工作室正在高速迭代开发中,欢迎各位加入与开发 [QQ群 1345795 450555868] [Discord](https://discord.gg/TCMh92aNjC) 39 | - 需要技术支持,使用困难,请加群咨询客服 [QQ群 1345795 450555868] 40 | - 友情链接: [AegirTech](https://github.com/AegirTech) 41 | -------------------------------------------------------------------------------- /idServerAPIDoc.md: -------------------------------------------------------------------------------- 1 | # idServer 2 | 3 | 这次更新剥离了Auth 认证与授权。现在Auth 认证与授权由idServer完成。用户login后,会获得一个token,这个token可以用来访问ticket server 或 arknights server。请将这个token挂在header的Authorization字段下,以便访问ticket server 或 arknights server。 4 | 5 | ```json 6 | header: 7 | { 8 | "Authorization": , 9 | } 10 | ``` 11 | 12 | ## login 登录 13 | 14 | path: 15 | 16 | method: POST 17 | 18 | ```json 19 | header: 20 | { 21 | "Content-Type": "application/json" 22 | } 23 | 24 | body: 25 | { 26 | "email": "", 27 | "password": "", 28 | } 29 | 30 | response: 31 | { 32 | "code": 1, 33 | "data": { 34 | "token": "xxxxx" 35 | }, 36 | "message": "登录成功" 37 | } 38 | ``` 39 | 40 | ```javascript 41 | 不想写文档了,自己看代码吧 42 | 43 | const axios = require('axios'); 44 | let data = JSON.stringify({ 45 | "email": "xxxx@qq.com", 46 | "password": "xxxx" 47 | }); 48 | 49 | let config = { 50 | method: 'post', 51 | maxBodyLength: Infinity, 52 | url: 'https://passport.arknights.host/api/v1/login', 53 | headers: { 54 | 'Content-Type': 'application/json' 55 | }, 56 | data : data 57 | }; 58 | 59 | axios.request(config) 60 | .then((response) => { 61 | console.log(JSON.stringify(response.data)); 62 | }) 63 | .catch((error) => { 64 | console.log(error); 65 | }); 66 | 67 | ``` 68 | 69 | ## register 注册 70 | 71 | path: 72 | 73 | method: POST 74 | 75 | ```json 76 | 77 | 78 | header: 79 | { 80 | "Content-Type": "application/json" 81 | } 82 | 83 | body: 84 | { 85 | "Email": "", 86 | "Password": "" 87 | "noise":"", 88 | "sign":"" 89 | } 90 | 91 | response: 92 | { 93 | "code": 1, 94 | "data": { 95 | "token": "xxxxx" 96 | }, 97 | "message": "注册成功" 98 | } 99 | ``` 100 | 101 | ```javascript 102 | 不想写文档了,自己看代码吧 103 | 104 | // 获取noise和sign 105 | // 导入JavaScript文件 106 | const script = document.createElement('script'); 107 | script.src = '/assets/skadi.js'; 108 | script.async = true; 109 | document.body.appendChild(script); 110 | 111 | // 请注意,该noise会随着时间而改变。 112 | const noise = window.idaks.join(""); 113 | const result = await signUp(email, password, window.skadi(email + "&" + password + "&" + noise), noise); // 正确写法 114 | // const result = await signUp(email, password, window.skadi(email + "&" + password + "&" + window.idaks.join("")), window.idaks.join("")); 错误写法 115 | const axios = require('axios'); 116 | let data = JSON.stringify({ 117 | "email": "xxxx@qq.com", 118 | "password": "xxxx" 119 | "noise": "<>", 120 | "sign": "<>" 121 | }); 122 | 123 | let config = { 124 | method: 'post', 125 | maxBodyLength: Infinity, 126 | url: 'https://passport.arknights.host/api/v1/register', 127 | headers: { 128 | 'Content-Type': 'application/json' 129 | }, 130 | data : data 131 | }; 132 | 133 | axios.request(config) 134 | .then((response) => { 135 | console.log(JSON.stringify(response.data)); 136 | }) 137 | .catch((error) => { 138 | console.log(error); 139 | }); 140 | 141 | ``` 142 | -------------------------------------------------------------------------------- /quotaAPIDoc.md: -------------------------------------------------------------------------------- 1 | # arkQuota 2 | 3 | arkQuota 将负责管理游戏的创建,删除与修改密码 4 | 5 | 通过查询 https://registry.closure.setonink.com/api/users/me 获取该账号的资源(slot,也就是槽位) 6 | 7 | 每个槽位都具有自己的UUID,游戏的创建,删除与修改密码将通过这个UUID进行操作 8 | 9 | 一般情况下,一个用户将会有3个槽位,也就是说能创建三个游戏。 10 | 11 | 第一个槽位是 12 | "ruleFlags": [ 13 | "slot_account_format_is_phone", 14 | "slot_account_sms_verified" 15 | ], 16 | 17 | 只有完成了第一个游戏账号的短信验证才允许添加第二个第三个游戏。 18 | 19 | 请注意,这些API接口使用了geetest或者Google recaptcha 人机验证。 20 | 21 | geetest Id: 3d50c20b712aaf5c4390a663f1912941 关于geetest的文档,请访问 22 | 23 | https://docs.geetest.com/BehaviorVerification/deploy/client/android 24 | 25 | 26 | 获取当前用户的槽位 27 | ``` 28 | import axios from 'axios'; 29 | 30 | const options = { 31 | method: 'GET', 32 | url: 'https://registry.closure.setonink.com/api/users/me', 33 | headers: { 34 | Authorization: 'Bearer xxxxx', 35 | Accept: 'application/json' 36 | } 37 | }; 38 | 39 | try { 40 | const { data } = await axios.request(options); 41 | console.log(data); 42 | } catch (error) { 43 | console.error(error); 44 | } 45 | ``` 46 | 47 | 创建游戏 48 | ``` 49 | import axios from 'axios'; 50 | 51 | const options = { 52 | method: 'POST', 53 | url: 'https://registry.closure.setonink.com/api/slots/gameAccount', 54 | params: {uuid: '18be284a-dccc-43bd-a55a-072d92940913'},// 这里是指slot的UUID 55 | headers: { 56 | Authorization: 'Bearer xxxxx', 57 | 'Content-Type': 'application/json', 58 | Accept: 'application/json', 59 | 'x-platform': 'website' // 注意 可以填写website或者app, 60 | 'token':, 61 | }, 62 | data: {account: '139xxxxxx', platform: '1', password: 'xxxxx'} // platform == 1 表示官服, platform == 2 表示 B服 63 | }; 64 | 65 | try { 66 | const { data } = await axios.request(options); 67 | console.log(data); 68 | } catch (error) { 69 | console.error(error); 70 | } 71 | ``` 72 | 73 | 74 | 删除游戏 75 | ``` 76 | import axios from 'axios'; 77 | 78 | const options = { 79 | method: 'POST', 80 | url: 'https://registry.closure.setonink.com/api/slots/gameAccount', 81 | params: {uuid: '18be284a-dccc-43bd-a55a-072d92940913'},// 这里是指slot的UUID 82 | headers: { 83 | Authorization: 'Bearer xxxxx', 84 | 'Content-Type': 'application/json', 85 | 'Accept': 'application/json', 86 | 'x-platform': 'website' // 注意 可以填写website或者app, 87 | 'token':, 88 | }, 89 | data: {account: null} // account 设置为null表示删除 90 | }; 91 | 92 | try { 93 | const { data } = await axios.request(options); 94 | console.log(data); 95 | } catch (error) { 96 | console.error(error); 97 | } 98 | ``` 99 | 100 | 修改游戏密码 101 | ``` 102 | import axios from 'axios'; 103 | 104 | const options = { 105 | method: 'POST', 106 | url: 'https://registry.closure.setonink.com/api/slots/gameAccount', 107 | params: {uuid: '18be284a-dccc-43bd-a55a-072d92940913'},// 这里是指slot的UUID 108 | headers: { 109 | Authorization: 'Bearer xxxxx', 110 | 'Content-Type': 'application/json', 111 | 'Accept': 'application/json', 112 | 'x-platform': 'website' // 注意 可以填写website或者app, 113 | 'token':, 114 | }, 115 | data: {account: "139xxxxxx",password: 'xxxxx新的密码'} 116 | }; 117 | 118 | try { 119 | const { data } = await axios.request(options); 120 | console.log(data); 121 | } catch (error) { 122 | console.error(error); 123 | } 124 | ``` 125 | -------------------------------------------------------------------------------- /ticketsAPIDoc.md: -------------------------------------------------------------------------------- 1 | # arkTickets 2 | 3 | 让协助者或管理员更方便查看游戏的各种信息如日志记录等 4 | 5 | ## API接口 6 | 7 | ## 发布\创建新的ticket 8 | 9 | path: 10 | 11 | method: POST 12 | 13 | ```json 14 | header: 15 | { 16 | "Authorization": , 17 | "Content-Type": "application/json" 18 | } 19 | 20 | body: 21 | { 22 | "tags": [""], 23 | "attachments": [""], 24 | "isPinned": "", 25 | "author": { 26 | "nickname": "", 27 | "avatar": { 28 | "type": "", 29 | "id": "" 30 | } 31 | }, 32 | "content": { 33 | "title": "", 34 | "content": "" 35 | }, 36 | "isAnonymous": "", 37 | "gameAccount": "" 38 | } 39 | 40 | body Example: 41 | { 42 | "tags": ["bug"], 43 | "attachments": ["https://image-link1.com", "https://image-link2.com"], 44 | "isPinned": false, 45 | "author": { 46 | "nickname": "欧皇大佬", 47 | "avatar": { 48 | "type": "DEFAULT", 49 | "id": "avatar_def_01" 50 | } 51 | }, 52 | "content": { 53 | "title": "根本完全无法使用", 54 | "content": "请查看附件" 55 | }, 56 | "isAnonymous": false, 57 | "gameAccount": "G13xxxxx" 58 | } 59 | 60 | ``` 61 | 62 | ## 回复某个ticket 63 | 64 | path: 65 | 66 | method: POST 67 | 68 | :id为ticket的id 69 | 70 | ```json 71 | 72 | header: 73 | { 74 | "Authorization": , 75 | "Content-Type": "application/json" 76 | } 77 | 78 | body: 79 | { 80 | "tags": [""], 81 | "attachments": [""], 82 | "isPinned": "", 83 | "author": { 84 | "nickname": "", 85 | "avatar": { 86 | "type": "", 87 | "id": "" 88 | } 89 | }, 90 | "content": { 91 | "title": "", 92 | "content": "" 93 | }, 94 | "isAnonymous": "", 95 | "gameAccount": "" 96 | } 97 | 98 | ``` 99 | 100 | ## 对某个ticket点赞 101 | 102 | path: 103 | 104 | method: POST 105 | 106 | :id为ticket的id 107 | 108 | ```json 109 | 110 | header: 111 | { 112 | "Authorization": , 113 | } 114 | 115 | body: 116 | { 117 | 118 | } 119 | 120 | ``` 121 | 122 | ## 上传附件 (图片) 123 | 124 | path: 125 | 126 | method: POST 127 | 128 | :id为ticket的id 129 | 130 | ```json 131 | 132 | header: 133 | { 134 | "Authorization": , 135 | } 136 | 137 | body: 138 | { 139 | "file": "<上传的图片文件>" 140 | } 141 | ``` 142 | 143 | ```javascript 144 | 145 | nodeJs axios example: 146 | 147 | const axios = require('axios'); 148 | const FormData = require('form-data'); 149 | const fs = require('fs'); 150 | 151 | // 创建一个新的FormData实例 152 | let data = new FormData(); 153 | 154 | // 将文件附加到FormData对象 155 | data.append('file', fs.createReadStream('path/to/your/image.jpg')); 156 | 157 | // 配置Axios请求 158 | let config = { 159 | method: 'post', 160 | maxBodyLength: Infinity, 161 | url: 'https://ticket.arknights.host/tickets/attachments', 162 | headers: { 163 | ...data.getHeaders(), 164 | "Authorization": "" 165 | }, 166 | data : data 167 | }; 168 | 169 | // 发送请求并处理响应或错误 170 | axios.request(config) 171 | .then((response) => { 172 | console.log(JSON.stringify(response.data)); 173 | }) 174 | .catch((error) => { 175 | console.log(error); 176 | }); 177 | 178 | ``` 179 | 180 | ## 获取tickets列表 不包括replys 181 | 182 | path: 183 | 184 | method: GET 185 | 186 | ```json 187 | 188 | Query Parameters: 189 | - type: 获取tickets的类型,可选值为 "latest" 和 "updated",默认为 "latest" 190 | - offest: 分页的起始索引,默认为0 191 | - limit: 每页显示的tickets数量,默认为10 192 | 193 | header: 194 | { 195 | "Authorization": "" 196 | } 197 | 198 | response: 199 | [ 200 | { 201 | "createdAt": "2023-10-18T08:58:52.002877+08:00", 202 | "updatedAt": "2023-10-18T08:58:52.002878+08:00", 203 | "id": "957800f8-207f-47c5-ae97-0801b01669f5", 204 | "replyTo": null, 205 | "status": 0, // 0: open, 1: closed 206 | "tags": ["bug"], 207 | "attachments": [ 208 | "https://image-link1.com/1.jpg", 209 | "https://image-link2.com/2.jpg" 210 | ], 211 | "isHidden": false, 212 | "isPinned": false, 213 | "authorUUID": "", // only display for admin 214 | "author": { 215 | "uuid": "", // only display for admin 216 | "title": "", 217 | "nickname": "", 218 | "avatar": { 219 | "type": "", 220 | "id": "" 221 | } 222 | }, 223 | "content": { 224 | "id": "", 225 | "title": "", 226 | "content": "" 227 | }, 228 | "votes": 0, 229 | "isAnonymous": false, 230 | "gameAccount": "" // only display for admin 231 | } 232 | ] 233 | 234 | 235 | ``` 236 | 237 | 238 | ## 获取tickets列表 不包括replys和content 239 | 240 | path: 241 | 242 | method: GET 243 | 244 | ```json 245 | 246 | Query Parameters: 247 | - type: 获取tickets的类型,可选值为 "latest" 和 "updated",默认为 "latest" 248 | - offest: 分页的起始索引,默认为0 249 | - limit: 每页显示的tickets数量,默认为10 250 | 251 | header: 252 | { 253 | "Authorization": "" 254 | } 255 | 256 | response: 257 | [ 258 | { 259 | "createdAt": "2023-10-18T08:58:52.002877+08:00", 260 | "updatedAt": "2023-10-18T08:58:52.002878+08:00", 261 | "id": "957800f8-207f-47c5-ae97-0801b01669f5", 262 | "replyTo": null, 263 | "status": 0, // 0: open, 1: closed 264 | "tags": ["bug"], 265 | "attachments": [ 266 | "https://image-link1.com/1.jpg", 267 | "https://image-link2.com/2.jpg" 268 | ], 269 | "isHidden": false, 270 | "isPinned": false, 271 | "authorUUID": "", // only display for admin 272 | "author": { 273 | "uuid": "", // only display for admin 274 | "title": "", 275 | "nickname": "", 276 | "avatar": { 277 | "type": "", 278 | "id": "" 279 | } 280 | }, 281 | "content": { 282 | "id": "", 283 | "title": "", 284 | "content": "" 285 | }, 286 | "votes": 0, 287 | "isAnonymous": false, 288 | "gameAccount": "" // only display for admin 289 | } 290 | ] 291 | 292 | 293 | ``` 294 | 295 | ## 获取ticket 不包括replys 296 | 297 | path: 298 | 299 | method: GET 300 | 301 | :id 为ticket的id 302 | 303 | ```json 304 | 305 | 306 | header: 307 | { 308 | "Authorization": "" 309 | } 310 | 311 | response: 312 | { 313 | "createdAt": "2023-10-18T08:58:52.002877+08:00", 314 | "updatedAt": "2023-10-18T08:58:52.002878+08:00", 315 | "id": "957800f8-207f-47c5-ae97-0801b01669f5", 316 | "replyTo": null, 317 | "status": 0, 318 | "tags": ["bug"], 319 | "attachments": [ 320 | "https://image-link1.com", 321 | "https://image-link2.com" 322 | ], 323 | "isHidden": false, 324 | "isPinned": false, 325 | "authorUUID": "", // only display for admin 326 | "author": { 327 | "uuid": "", // only display for admin 328 | "title": "", 329 | "nickname": "欧皇大佬", 330 | "avatar": { 331 | "type": "DEFAULT", 332 | "id": "avatar_def_01" 333 | } 334 | }, 335 | "content": { 336 | "id": "957800f8-207f-47c5-ae97-0801b01669f5", 337 | "title": "根本完全无法使用", 338 | "content": "请查看附件" 339 | }, 340 | "votes": 1, 341 | "isAnonymous": false, 342 | "gameAccount": "" // only display for admin 343 | } 344 | 345 | ``` 346 | 347 | ## 获取ticket的回复 348 | 349 | path: 350 | 351 | method: GET 352 | 353 | :id 为ticket的id 354 | 355 | ```json 356 | 357 | 358 | header: 359 | { 360 | "Authorization": "" 361 | } 362 | 363 | response: 364 | [ 365 | { 366 | "createdAt": "2023-10-18T09:12:32.360671+08:00", 367 | "updatedAt": "2023-10-18T09:12:32.360671+08:00", 368 | "id": "c104321c-4acb-4d50-a217-72c1bac98b84", 369 | "replyTo": "957800f8-207f-47c5-ae97-0801b01669f5", 370 | "status": 0, 371 | "tags": ["bug"], 372 | "attachments": [ 373 | "https://image-link1.com", 374 | "https://image-link2.com" 375 | ], 376 | "isHidden": false, 377 | "isPinned": false, 378 | "authorUUID": "", // only display for admin 379 | "author": { 380 | "uuid": "", // only display for admin 381 | "title": "", 382 | "nickname": "欧皇大佬", 383 | "avatar": { 384 | "type": "DEFAULT", 385 | "id": "avatar_def_01" 386 | } 387 | }, 388 | "content": { 389 | "id": "c104321c-4acb-4d50-a217-72c1bac98b84", 390 | "title": "根本完全无法使用", 391 | "content": "请查看附件" 392 | }, 393 | "votes": 0, 394 | "isAnonymous": false, 395 | "gameAccount": "" // only display for admin 396 | }, 397 | // ...更多回复数据 398 | ] 399 | 400 | ``` 401 | 402 | 403 | ## 更新\修改 ticket或者reply 404 | 405 | path: 406 | 407 | method: Put 408 | 409 | :id 为ticket的id 410 | 411 | ```json 412 | 413 | header: 414 | { 415 | "Authorization": "" 416 | } 417 | 418 | body: 419 | { 420 | "status": "", 421 | "tags": [""], 422 | "attachments": [""], 423 | "isHidden": "", 424 | "isPinned": "", 425 | "content": { 426 | "id": "", 427 | "title": "", 428 | "content": "" 429 | }, 430 | "isAnonymous": "", 431 | } 432 | 433 | 434 | body example: 435 | { 436 | "status": 1, // 完成,解决 437 | "tags": ["bug", "ui"], 438 | "attachments": [ 439 | "https://image-link1.com", 440 | "https://image-link2.com" 441 | ], 442 | "isHidden": false, 443 | "isPinned": false, // admin 权限 444 | "content": { 445 | "id": "c104321c-4acb-4d50-a217-72c1bac98b84", 446 | "title": "更新标题", 447 | "content": "更新内容" 448 | }, 449 | "isAnonymous": false 450 | } 451 | ``` 452 | -------------------------------------------------------------------------------- /arknightsAPIDoc.md: -------------------------------------------------------------------------------- 1 | # ArkHost V2 API Document 2 | 3 | 这次更新主要内容是分离了auth服务,新增工单服务。 4 | 5 | auth server | [https://github.com/closure-studio/ReadMe/blob/main/idServerAPIDoc.md] 6 | 7 | ticket server | [https://github.com/closure-studio/ReadMe/blob/main/ticketsAPIDoc.md] 8 | 9 | 10 | ## Game 11 | 12 | 这次更新整合了一些API,移除了一些旧API,比如geetest和Ocr接口。 13 | 14 | 请注意,idServer Token 请通过auth server的login api接口获得。 15 | 16 | #### Create Game 创建游戏 17 | 【Path】 18 | 19 | https://api.arknights.host/Game 【post】 20 | 21 | 【Header】 22 | 23 | { 24 | Authorization:{idServer Token} 25 | X-Platform:{website} 26 | recaptchaToken:{recaptcha Token} 27 | } 28 | 【Body】 29 | 30 | {"Account": "1892xxxxx" , "Platform": 1, "Password": "xxxxxx"} 31 | 32 | 【Response】 33 | 34 | { 35 | "code": "int", // 1 表示成功,0表示失败, 36 | "data": "nil", 37 | "message": "string" 38 | } 39 | #### Game Login 游戏登陆 40 | 如果是官请带上G开头,如果是B,请带上B开头 41 | 42 | 在GetGames API会返回该已格式化的账号 43 | 44 | 【Path】 45 | 46 | https://api.arknights.host/Game/Login 【post】 47 | 48 | 【Header】 49 | 50 | { 51 | Authorization:{idServer Token} 52 | X-Platform:{website} 53 | recaptchaToken:{recaptcha Token} 54 | } 55 | 56 | 【Body】 57 | 58 | `{"Account": "G1892xxxxx"}` 59 | 60 | 【Response】 61 | 62 | { 63 | "code": "int", // 1 表示成功,0表示失败, 64 | "data": "nil", 65 | "message": "string" 66 | } 67 | 68 | #### Get Games 获取所有游戏 69 | 请注意,与之前的API不同,geetest的极验信息和游戏设置(保留理智,是否自动作战)整合在一起 70 | 71 | 【Path】 72 | 73 | https://api.arknights.host/Game 【get】 74 | 75 | 【Header】 76 | 77 | `{Authorization:{idServer Token}}` 78 | 79 | 【Body】 80 | 81 | `nil` 82 | 83 | 【Response】 84 | 85 | { 86 | "code": "int", // 1 表示成功,0表示失败, 87 | "data": "[]web.WebGame", 88 | "message": "string" 89 | } 90 | 91 | type WebGame struct{ 92 | Status *Status `json:"status"` 93 | CaptchaInfo *CaptchaInfo `json:"captcha_info"` 94 | GameSetting *config.GameSetting `json:"game_config"` 95 | } 96 | 97 | type Status struct { 98 | //当前用户状态,-1=登陆失败 0=未开启/未初始化/正在初始化但未登录 1=登录中 2=登陆完成/运行中 3=游戏错误 99 | Account string `json:"account"` 100 | Platform int `json:"platform"` 101 | UUID string `json:"uuid"` 102 | Code int `json:"code"` 103 | Text string `json:"text"` 104 | NickName string `json:"nick_name"` 105 | Level int `json:"level"` 106 | Avatar gamestat.Avatar `json:"avatar"` 107 | CreatedAt int64 `json:"created_at"` // 该游戏创建的timestamp 108 | IsVertify bool `json:"is_vertify"` // 如果未进行短信sms验证,则只有24小时的试用期。 109 | 110 | 111 | } 112 | 113 | // CaptchaInfo 验证请求信息 114 | type CaptchaInfo struct { 115 | Challenge string `json:"challenge"` 116 | Gt string `json:"gt"` 117 | Created int64 `json:"created"` 118 | CaptchaType string `json:"captcha_type"` 119 | } 120 | type GameSetting struct { 121 | Account string `json:"account"` 122 | AccelerateSlot string `json:"accelerate_slot"` 123 | AccelerateSlot_CN string `json:"accelerate_slot_cn"` 124 | BattleMaps []string `json:"battle_maps"` 125 | EnableBuildingArrange bool `json:"enable_building_arrange"` 126 | IsAutoBattle bool `json:"is_auto_battle"` 127 | IsStopped bool `json:"is_stopped"` 128 | KeepingAP int `json:"keeping_ap"` 129 | RecruitIgnoreRobot bool `json:"recruit_ignore_robot"` 130 | RecruitReserve int `json:"recruit_reserve"` 131 | MapId string `json:"map_id"` 132 | } 133 | 134 | 135 | 136 | #### Get Game 获取单个游戏 137 | 游戏设置(保留理智,是否自动作战)和作战截图整合在一起 138 | 139 | 如果是官请带上G开头,如果是B,请带上B开头 140 | 141 | 在GetGames API会返回该已格式化的账号 142 | 143 | 【Path】 144 | 145 | https://api.arknights.host/Game/G18XXXX 【post】 146 | 147 | 【Header】 148 | 149 | `{Authorization:{idServer Token}}` 150 | 151 | 【Body】 152 | 153 | `nil` 154 | 155 | 【Response】 156 | 157 | { 158 | "code": "int", // 1 表示成功,0表示失败, 159 | "data": "PlayerWebDataModel", 160 | "message": "string" 161 | } 162 | type PlayerWebDataModel struct { 163 | Status *PlayerWebStatus `json:"status"` 164 | Consumable interface{} `json:"consumable"` 165 | Inventory interface{} `json:"inventory"` // annonymous map 166 | Troop interface{} `json:"troop"` 167 | Config interface{} `json:"config"` 168 | Screenshot interface{} `json:"screenshot"` 169 | LastFreshTs int64 `json:"lastFreshTs"` 170 | } 171 | 172 | #### Delete Game 删除游戏 173 | 如果是官请带上G开头,如果是B,请带上B开头 174 | 175 | 在GetGames API会返回该已格式化的账号 176 | 177 | 【Path】 178 | 179 | https://api.arknights.host/Game 【Delete】 180 | 181 | 【Header】 182 | 183 | { 184 | Authorization:{idServer Token} 185 | } 186 | 187 | 【Body】 188 | 189 | `{"Account": "G1892xxxxx"}` 190 | 191 | 【Response】 192 | 193 | { 194 | "code": "int", // 1 表示成功,0表示失败, 195 | "data": "nil", 196 | "message": "string" 197 | } 198 | 199 | #### Update Game 更新游戏 200 | 201 | 这个接口整合了几种操作,geetest验证码,requireOcr,游戏设置 202 | 203 | 如果Body传入 Account,Config 组合 则会更新Config 204 | 205 | 对于config,可以传入单个字段或者多个字段。 206 | 207 | 如果Body传入 Account,CaptchaInfo 组合 则会更新geetest验证码 208 | 209 | 如果Body传入 Account,RequireOcr 组合 则会要求更新Ocr 210 | 211 | 如果全部传入,则全部更新 212 | 213 | 214 | 215 | 【Path】 216 | 217 | https://api.arknights.host/game/config/:gameAccount 【Post】 218 | 219 | https://api.arknights.host/game/config/G189XXXXXX 220 | 221 | 【Header】 222 | 223 | { 224 | Authorization:{idServer Token} 225 | } 226 | 227 | 【Body】 228 | ``` 229 | 230 | { 231 | Config *GameConfig `json:"config"` // 游戏设置 【option】 232 | CaptchaInfo *CaptchaInfo `json:"captcha_info"` // geetest验证码 【option】 233 | RequireOcr *bool `json:"require_ocr"` //要求Ocr识别 【option】 234 | } 235 | 236 | 237 | type GameConfig struct { 238 | IsAutoBattle *bool `json:"isAutoBattle"` 239 | MapId *string `json:"mapId"` 240 | BattleMaps *[]string`json:"battleMaps"` 241 | KeepingAP *int `json:"keepingAP"` 242 | RecruitReserve *int `json:"recruitReserve"` 243 | RecruitIgnoreRobot *bool `json:"recruitIgnoreRobot"` 244 | IsStopped *bool `json:"isStopped"` 245 | EnableBuildingArrange *bool `json:"enableBuildingArrange"` 246 | AccelerateSlot_CN *string `json:"accelerateSlot_CN"` 247 | } 248 | 249 | type CaptchaInfo struct { 250 | Challenge string `json:"challenge"` 251 | GeetestChallenge string `json:"geetest_challenge"` 252 | GeetestValidate string `json:"geetest_validate"` 253 | GeetestSeccode string `json:"geetest_seccode"` 254 | } 255 | 256 | 257 | ``` 258 | 【Response】 259 | 260 | { 261 | "code": "int", // 1 表示成功,0表示失败, 262 | "data": "nil", 263 | "message": "string" 264 | } 265 | 266 | #### Get Game Log 获取游戏日志log 267 | 如果是官请带上G开头,如果是B,请带上B开头 268 | 269 | 在GetGames API会返回该已格式化的账号 270 | 271 | 每一次查询返回offest+500条信息。 272 | 273 | 建议第一次查询offest=0 274 | 275 | 建议第二次查询offest=500 276 | 277 | 建议第三次查询offest=1000 278 | 279 | 【Path】 280 | 281 | https://api.arknights.host/Game/Log/:account/:offest 【Get】 282 | 283 | https://api.arknights.host/Game/Log/G18xxxx/500 284 | 285 | 【Header】 286 | 287 | { 288 | Authorization:{idServer Token} 289 | } 290 | 291 | 【Body】 292 | 293 | `` 294 | 295 | 【Response】 296 | 297 | { 298 | "code": "int", // 1 表示成功,0表示失败, 299 | "data": "nil", 300 | "message": "string" 301 | } 302 | 303 | type GameLogEntry struct { 304 | ID uint `gorm:"primaryKey" json:"id"` 305 | Ts int64 `gorm:"type:int8;index" json:"ts"` 306 | Name string `gorm:"type:varchar(32);index" json:"name"` 307 | LogLevel uint8 `gorm:"type:smallint" json:"logLevel"` 308 | Content string `gorm:"type:text" json:"content"` 309 | } 310 | 311 | type GameLog struct { 312 | Logs []*GameLogEntry `json:"logs"` 313 | HasMore bool `json:"hasMore"` 314 | } 315 | 316 | 317 | ## System 318 | 319 | 这次更新整合了一些API 320 | 321 | 322 | #### Get System Config 获取系统设置 【公开】 323 | 324 | 【Path】 325 | 326 | https://api.arknights.host/System/Config 【get】 327 | 328 | 【Header】 329 | 330 | 331 | 【Body】 332 | 333 | 334 | 335 | 【Response】 336 | 337 | { 338 | "code": "int", // 1 表示成功,0表示失败, 339 | "data": "nil", 340 | "message": "string" 341 | } 342 | type SystemConfig struct { 343 | IsUnderMaintenance *bool `json:"isUnderMaintenance"` 是否在进行维护 344 | IsDebugMode *bool `json:"isDebugMode"` 是否在debug模式 345 | Announcement *string `json:"announcement"` 公告 346 | AllowGameLogin *bool `json:"allowGameLogin"` 允许游戏登录【未部署】 347 | AllowGameCreate *bool `json:"allowGameCreate"` 允许创建游戏【未部署】 348 | AllowGameUpdate *bool `json:"allowGameUpdate"` 允许更新游戏【未部署】 349 | AllowGameDelete *bool `json:"allowGameDelete"` 允许删除游戏【未部署】 350 | } 351 | 352 | 353 | #### Get System Ap Cost List 获取名人堂 【公开】 354 | 355 | 【Path】 356 | 357 | https://api.arknights.host/System/ApCostList 【get】 358 | 359 | 【Header】 360 | 361 | 362 | 【Body】 363 | 364 | 365 | 366 | 【Response】 367 | 368 | { 369 | "code": "int", // 1 表示成功,0表示失败, 370 | "data": "[]Info", 371 | "message": "string" 372 | } 373 | type Info struct { 374 | NickName string `json:"nickName"` 375 | Avatar Avatar `json:"avatar"` 376 | AdditionalAPCosts int `json:"additionalAPCosts"` 377 | } 378 | type Avatar struct { 379 | Type string `json:"type"` 380 | ID string `json:"id"` 381 | } 382 | 383 | #### Update System Config 更新系统设置 384 | 385 | 可以传单独的字段 386 | 387 | 也可以传全部的字段 388 | 389 | 【Path】 390 | 391 | https://api.arknights.host/System/Config 【post】 392 | 393 | 【Header】 394 | 395 | { 396 | Authorization:{idServer Token} 397 | } 398 | 399 | 【Body】 400 | 401 | { 402 | IsUnderMaintenance *bool `json:"isUnderMaintenance"` 是否在进行维护 403 | IsDebugMode *bool `json:"isDebugMode"` 是否在debug模式 404 | Announcement *string `json:"announcement"` 公告 405 | AllowGameLogin *bool `json:"allowGameLogin"` 允许游戏登录【未部署】 406 | AllowGameCreate *bool `json:"allowGameCreate"` 允许创建游戏【未部署】 407 | AllowGameUpdate *bool `json:"allowGameUpdate"` 允许更新游戏【未部署】 408 | AllowGameDelete *bool `json:"allowGameDelete"` 允许删除游戏【未部署】 409 | } 410 | 411 | 412 | 【Response】 413 | 414 | { 415 | "code": "int", // 1 表示成功,0表示失败, 416 | "data": "nil", 417 | "message": "string" 418 | } 419 | 420 | 421 | #### Update System 更新游戏 422 | 423 | 424 | 【Path】 425 | 426 | https://api.arknights.host/System/GameDataUpdate 【post】 427 | 428 | 【Header】 429 | 430 | { 431 | Authorization:{idServer Token} 432 | } 433 | 434 | 【Body】 435 | 436 | 437 | 【Response】 438 | 439 | { 440 | "code": "int", // 1 表示成功,0表示失败, 441 | "data": "nil", 442 | "message": "string" 443 | } 444 | 445 | 446 | #### Get System status 获取运行情况 447 | 448 | 449 | 【Path】 450 | 451 | https://api.arknights.host/System/Status 【get】 452 | 453 | 【Header】 454 | 455 | { 456 | Authorization:{idServer Token} 457 | } 458 | 459 | 【Body】 460 | 461 | 462 | 【Response】 463 | 464 | { 465 | "code": "int", // 1 表示成功,0表示失败, 466 | "data": "SystemStatus", 467 | "message": "string" 468 | } 469 | type SystemStatus struct { 470 | GlobalCurrentAp float64 `json:"globalCurrentAp"` // 全局理智 471 | } 472 | --------------------------------------------------------------------------------