POST /learntech/{player_identifier}
端点: POST /v1/pdapi/learntech/<player_identifier>
认证: Bearer 令牌
权限: REST.Techs.Learn
用途
Learns one, many, or all technologies for a player.
路径参数
player_identifier: 目标玩家的UserId或PlayerUID。
查询参数
无。
请求体
Technology can be a single TechID, the string "All", or an array of TechID strings. Do not put "All" inside an array.
响应结构
200 response schema
| Field | Type | Description |
|---|---|---|
UnlockedCount |
integer | Number of technologies unlocked by this request. |
Unlocked |
string[] | Technology IDs that were unlocked. |
Skipped |
string[] | Technology IDs skipped because they were already unlocked. |
错误响应
错误响应使用以下格式:
| HTTP | 错误代码 | 发生条件 |
|---|---|---|
401 |
INVALID_TOKEN |
Authorization 头缺失、格式错误,或与配置的 Bearer 令牌不匹配。 |
403 |
MISSING_PERMISSION |
令牌有效,但不包含此端点权限。 |
400 |
INVALID_JSON |
提供了请求体,但无法解析为 JSON。 |
400 |
REQUEST_FAILED |
游戏线程回调抛出异常,或共享玩家/资源解析器失败。 |
500 |
REQUEST_TIMEOUT |
内部游戏线程回调未在 5 秒内完成。 |
400 |
INVALID_REQUEST |
Technology is missing, or it is not a string/array in the expected format. |
400 |
VALIDATION_FAILED |
The Technology array contains a non-string, All, or an invalid technology identifier. |
示例
Learn one technology for a Steam player
Learn several technologies for a PS5 player
Learn every technology by PlayerUID
使用场景
- Unlock a missing recipe for support.
- Unlock all technologies for test accounts.
- Validate technology IDs at paldeck.cc/technology before sending the request.