API 参考
每个端点都接受 JSON,并需要 X-API-Key 请求头进行身份验证。
基础 URL 和请求头
- 基础 URL
https://horizon.pm/api/v1/app- X-API-Key
- 你的项目 API Key。每个请求都要发送。
端点
112 / 112
| 方法 | 路径 | 功能 | 复制 URL |
|---|---|---|---|
| GET | /marketplace/limits | 交易市场 | |
| GET | /marketplace/rules | 交易市场 | |
| GET | /marketplace | 交易市场 | |
| GET | /marketplace/listings | 交易市场 | |
| GET | /marketplace/listings/{listingId} | 交易市场 | |
| POST | /marketplace/listings | 交易市场 | |
| POST | /marketplace/listings/{listingId}/buy | 交易市场 | |
| POST | /marketplace/listings/{listingId}/cancel | 交易市场 | |
| GET | /marketplace/operations/{operationId} | 交易市场 | |
| POST | /marketplace/listings/{listingId}/retry-return | 交易市场 | |
| GET | /chat/limits | 聊天管理 | |
| POST | /chat/channels/open | 聊天管理 | |
| POST | /chat/channels/{channelId}/sync | 聊天管理 | |
| POST | /chat/channels/{channelId}/messages | 聊天管理 | |
| GET | /chat/operations/{operationId} | 聊天管理 | |
| POST | /chat/channels/{channelId}/messages/{messageId}/report | 聊天管理 | |
| GET | /matches | 对局 | |
| GET | /matches/limits | 对局 | |
| GET | /matches/open | 对局 | |
| GET | /matches/{matchId} | 对局 | |
| POST | /matches | 对局 | |
| POST | /matches/{matchId}/join | 对局 | |
| POST | /matches/{matchId}/decline | 对局 | |
| POST | /matches/{matchId}/start | 对局 | |
| POST | /matches/{matchId}/turn | 对局 | |
| POST | /matches/{matchId}/timeout | 对局 | |
| POST | /matches/{matchId}/leave | 对局 | |
| POST | /matches/{matchId}/cancel | 对局 | |
| POST | /matches/{matchId}/result | 对局 | |
| POST | /matches/{matchId}/ranked-run | 对局 | |
| GET | /shared-objects/collections | 共享对象 | |
| GET | /shared-objects/{collection}/usage | 共享对象 | |
| GET | /shared-objects/{collection}/objects/{objectId} | 共享对象 | |
| POST | /shared-objects/{collection}/query | 共享对象 | |
| POST | /shared-objects/{collection}/objects | 共享对象 | |
| PUT | /shared-objects/{collection}/objects/{objectId} | 共享对象 | |
| DELETE | /shared-objects/{collection}/objects/{objectId} | 共享对象 | |
| GET | /items | 物品 | |
| GET | /items/catalog | 物品 | |
| POST | /items/adjust | 物品 | |
| POST | /items/equip | 物品 | |
| POST | /items/discard | 物品 | |
| GET | /groups | 群组 | |
| GET | /groups/{groupId} | 群组 | |
| GET | /groups/{groupId}/members | 群组 | |
| GET | /groups/{groupId}/pending | 群组 | |
| POST | /groups | 群组 | |
| PUT | /groups/{groupId} | 群组 | |
| POST | /groups/{groupId}/join | 群组 | |
| POST | /groups/{groupId}/request | 群组 | |
| POST | /groups/{groupId}/invite | 群组 | |
| POST | /groups/{groupId}/accept-invite | 群组 | |
| POST | /groups/{groupId}/decline-invite | 群组 | |
| POST | /groups/{groupId}/cancel-invite | 群组 | |
| POST | /groups/{groupId}/accept-request | 群组 | |
| POST | /groups/{groupId}/decline-request | 群组 | |
| POST | /groups/{groupId}/cancel-request | 群组 | |
| POST | /groups/{groupId}/leave | 群组 | |
| POST | /groups/{groupId}/remove | 群组 | |
| POST | /groups/{groupId}/role | 群组 | |
| POST | /groups/{groupId}/transfer | 群组 | |
| POST | /groups/{groupId}/delete | 群组 | |
| POST | /user-management/signup | 身份认证 | |
| POST | /user-management/signin | 身份认证 | |
| POST | /user-management/check-auth | 用户 | |
| POST | /user-management/change-name | 用户 | |
| GET | /friends | 好友 | |
| GET | /friends/find | 好友 | |
| POST | /friends/request | 好友 | |
| POST | /friends/accept | 好友 | |
| POST | /friends/decline | 好友 | |
| POST | /friends/cancel | 好友 | |
| POST | /friends/remove | 好友 | |
| POST | /friends/block | 好友 | |
| POST | /friends/unblock | 好友 | |
| GET | /achievements | 成就 | |
| POST | /achievements/unlock | 成就 | |
| POST | /achievements/rewards/deliver | 成就 | |
| GET | /inbox | 玩家收件箱 | |
| POST | /inbox/read | 玩家收件箱 | |
| POST | /inbox/claim | 玩家收件箱 | |
| POST | /inbox/remove | 玩家收件箱 | |
| GET | /statistics | 玩家统计 | |
| GET | /statistics/definitions | 玩家统计 | |
| POST | /statistics | 玩家统计 | |
| GET | /player-values | 玩家数值 | |
| GET | /player-values/offers | 玩家数值 | |
| POST | /player-values/purchase | 玩家数值 | |
| POST | /player-values/adjust | 玩家数值 | |
| GET | /player-profile | 玩家资料 | |
| PUT | /player-profile | 玩家资料 | |
| POST | /leaderboard/submit | 排行榜 | |
| GET | /leaderboards/{boardKey}/top | 排行榜 | |
| GET | /leaderboards/{boardKey}/rank | 排行榜 | |
| GET | /leaderboards/{boardKey}/around | 排行榜 | |
| POST | /validated-actions/runs | 已验证操作 | |
| POST | /validated-actions/submit | 已验证操作 | |
| POST | /cloud-save/save | 云端存档 | |
| POST | /cloud-save/load | 云端存档 | |
| GET | /remote-config/{configKey} | 远程配置 | |
| GET | /remote-config/all | 远程配置 | |
| GET | /localization/{key} | 本地化 | |
| GET | /localization/all | 本地化 | |
| GET | /news | 新闻 | |
| POST | /gift-codes/validate | 礼品码 | |
| POST | /gift-codes/redeem | 礼品码 | |
| POST | /email-sending/send | 邮件发送 | |
| GET | /email-sending/{emailId} | 邮件发送 | |
| POST | /crash-reports/session | 崩溃报告 | |
| POST | /crash-reports/create | 崩溃报告 | |
| POST | /user-feedback/submit | 用户反馈 | |
| POST | /user-logs/create | 用户日志 |
示例请求
Bash
1curl -X POST https://horizon.pm/api/v1/app/user-management/signup \
2 -H "Content-Type: application/json" \
3 -H "X-API-Key: horizon_YOUR_API_KEY_HERE" \
4 -d '{"type":"ANONYMOUS","username":"TestPlayer","includeRefreshToken":true}'