tulanowski/php-riot-api
Composer 安装命令:
composer require tulanowski/php-riot-api
包简介
PHP Wrapper for Riot Games API
README 文档
README
PHP Wrapper for Riot Games API allows you to quickly make calls to the RIOT API with a proper API Key. Key features include caching (if enabled) and rate limiting. Simply replace API_KEY_HERE with your API key from Riot Games.
Testing.php is a simple testing class that shows how to call all the functions.
Getting Started
- Replace INSERT_API_KEY_HERE
- Create folder called 'cache' wherever the script is (make sure it's writeable by php-riot-api)
- Create an instance of riotapi - $instance = new riotapi($region);
- $region can be na, euw, eune, br, tr (br/tr only can call getLeague() and getTeam() functions)
- Make Calls to the functions listed below and receive JSON data
- Caching is done locally, instantiate php-riot-api with "new riotapi('na', new FileSystemCache('cache/'));" to create a cache in the subfolder 'cache'
- DECODE_ENABLED is true by default. If you want your returns to be pure JSON and not an associative array, set it to false
- Take a look at testing.php for example code, including error handling, caching
Functions
//Returns all champion information.
getChampion();
// Returns all free champions.
getFreeChampions();
//performs a static call. Not counted in rate limit.
getStatic($call, $id);
//New Riot API call. Returns match details given a match id.
getMatch($matchId);
//Returns a user's matchHistory given their summoner id.
getMatchHistory($summoner_id);
//Returns game statistics given a summoner's id.
getGame($summoner_id);
//Returns the league of a given summoner.
getLeague($summoner_id);
getLeague($summoner_id, "entry");
//Returns league information given a *list* of teams.
getLeagueByTeam($team_ids);
//Returns the challenger ladder.
getChallenger();
//Returns a summoner's stats given summoner id.
getStats($summoner_id);
getStats($summoner_id,'ranked');
//returns a summoner's id
getSummonerId($summoner_name);
//Returns summoner info given summoner id.
getSummoner($summoner_id);
getSummoner($summoner_id,'masteries');
getSummoner($summoner_id,'runes');
getSummoner($summoner_id,'name');
//Gets a summoner's info given their name, instead of id.
getSummonerByName($summoner_name);
//Gets the teams of a summoner, given summoner id.
getTeam($summoner_id);
Not Complete
Region Checking - Some functions are only available in certain regions and not in others.
tulanowski/php-riot-api 适用场景与选型建议
tulanowski/php-riot-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 06 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 tulanowski/php-riot-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tulanowski/php-riot-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-17