【发布时间】:2016-01-31 04:26:00
【问题描述】:
我正在记录一个公共 API,该 API 有一个名为 /findGuild 的方法,该方法采用强制性 key 参数和以下参数之一:
byPlayerbyName
它必须有byPlayer或byName;我的问题是:我如何表明byPlayer 和byName 是互斥的,但必须有一个?
现在,我的.apib 中有以下资源:
### GET /findGuild{?byName,byPlayer,key}
+ Parameters
+ byName: `YourGuild` (string, optional) - Search for the Guild by its name.
+ byPlayer: (string, optional) - Search for Guild by a player. Does not seem to work.
+ key: `ffffffff-ffff-ffff-ffff-ffffffffffff` (string, required) - The user's API key.
+ Response 200 (application/json)
+ Attributes (object)
+ guild (string) - The guild id or null.
+ success (boolean) - Should be true.
+ Body
{
"guild": "ffffffffffffffffffffffff",
"success": true
}
【问题讨论】:
标签: apiblueprint