职责调用API如何通过仅输入用户名获得所有用户平台的列表?

2024-05-15 22:20:07 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用职责调用API,我被迫将平台放入调用中,如下例所示:

https://my.callofduty.com/api/papi-client/stats/cod/v1/title/{title}/platform/**{platform}**/gamer/{gamer}/profile/type/{gamemode}

我需要一个链接,通过只插入用户名来返回用户和平台列表

应该是这样的:

https://my.callofduty.com/api/papi-client/stats/cod/v1/title/{title}/gamer/**example**/profile/type/{gamemode}

输出应该如下所示:

[
username: example#12345
platform: psn

username: example
platform: battle

username: example#56789
platform: xbl

username: example#13579
platform: uno

etc..]

我知道已经存在一个api来做这件事,但我找不到它


Tags: httpscomclientapititleexamplemystats