用于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第三方库


热门话题
java在Mollweide投影中获取我的世界地图中一个点的经度   java比较二维数组   java JUNG无法显示大型图形?   java jvm是否保证在切换线程后更新处理器缓存?   java为什么在使用FetchType时会出现LazyInitializationException异常。在一组上懒惰,但在另一组上不懒惰?   从json数据创建java模型   java更新复合组件?   java在具有不同长度的第二维度的2D数组中迭代   使用RESTfulWebService将数据从UI存储到数据库   JTextfield中的java转义字符   java如何修复:Lombok builder()方法在IntelliJ中似乎无法识别?   java Spring MVC控制器如何处理多个长http请求?   java JavaFX:TableView onEditCommit处理程序从未被调用