用于python 3的clash royale api包装器

pyroyale的Python项目详细描述


焦耶鲁

官方Clash Royale API的非正式夸张定义

这个python包由Swagger Codegen项目自动生成:

  • API版本:1.0
  • 软件包版本:1.0.0
  • 构建包:io.swagger.codegen.v3.generators.python.pythonclientcodegen

要求。

python 2.7和3.4+

安装和使用

pip安装

如果python包托管在github上,则可以直接从github安装

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(您可能需要使用根权限运行pipsudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

然后导入包:

importpyroyale

设置工具

通过Setuptools安装。

python setup.py install --user

(或sudo python setup.py install为所有用户安装软件包)

然后导入包:

importpyroyale

开始

请按照installation procedure操作,然后运行以下命令:

from__future__importprint_functionimporttimeimportpyroyalefrompyroyale.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: JWTconfiguration=pyroyale.Configuration()configuration.api_key['authorization']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['authorization'] = 'Bearer'# create an instance of the API classapi_instance=pyroyale.CardsApi(pyroyale.ApiClient(configuration))try:# Get list of available cardsapi_response=api_instance.get_cards()pprint(api_response)exceptApiExceptionase:print("Exception when calling CardsApi->get_cards: %s\n"%e)

API端点文档

所有uri都与https://api.clashroyale.com/v1

ClassMethodHTTP requestDescription
CardsApiget_cardsGET /cardsGet list of available cards
ClansApiget_clanGET /clans/{clanTag}Get clan information
ClansApiget_clan_membersGET /clans/{clanTag}/membersList clan members
ClansApiget_clan_war_logGET /clans/{clanTag}/warlogRetrieve clan's clan war log
ClansApiget_current_warGET /clans/{clanTag}/currentwarInformation about clan's current clan war
ClansApisearch_clansGET /clansSearch clans
LocationsApiget_clan_rankingGET /locations/{locationId}/rankings/clansGet clan rankings for a specific location
LocationsApiget_clan_wars_rankingGET /locations/{locationId}/rankings/clanwarsGet clan war rankings for a specific location
LocationsApiget_locationGET /locations/{locationId}Get location information
LocationsApiget_locationsGET /locationsList locations
LocationsApiget_player_rankingGET /locations/{locationId}/rankings/playersGet player rankings for a specific location
PlayersApiget_playerGET /players/{playerTag}Get player information
PlayersApiget_player_battlesGET /players/{playerTag}/battlelogGet log of recent battles for a player
PlayersApiget_player_upcoming_chestsGET /players/{playerTag}/upcomingchestsGet information about player's upcoming chests
TournamentsApiget_global_tournamentsGET /globaltournamentsList global tournaments
TournamentsApiget_tournamentGET /tournaments/{tournamentTag}Get tournament information
TournamentsApisearch_tournamentsGET /tournamentsSearch tournaments

型号文档

授权文件

Jwt

  • 类型:api键
  • api密钥参数名:授权
  • 位置:http头

作者

开发链接

该项目使用声纳进行静态分析。分析结果如下 SonarCloud。 代码质量和测试覆盖率是一项正在进行的工作。

支架

如果你需要帮助,可以跳到 pyroyale discord

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带有嵌套JAR的java RCP ClassNotFoundException   java在输入框中设置默认值,crud应用程序使用spring   java如何在Heroku中使用fs创建新文件   java将JPanel放在JFrame中   java这个正则表达式会匹配“i.imgur.com/xxx”吗?   java在片段内创建RecylerView,而无需在Android中设置片段   Android上Groovy导致java错误的双精度浮点精度损失   swing Java查找JFrame属于JPanel的内容   java Spring junit自连线自定义类本身必须有构造函数吗?   java textswitcher支持前面的文本   从Android客户端到JAXRS的java Post自定义对象   java如何检索JSON数据并使用MPAndroidChart绘制折线图,以及在安卓上的改进   拒绝用户“root”@“localhost”的java c3p0访问(使用密码“是”)   使用Selenium Webdriver自动化ExtJS应用程序时java面临的问题