miguelfreire / riot-api
v1.2
2013-12-13 20:34 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-24 05:51:06 UTC
README
Riot API 转换为 PHP!完全兼容 composer!
可用函数
getChampions($free, $region)
$free -> bool
$region -> string
getSummonerBy($summoner, $by, $region)
$summoner -> string or int
$by -> string -> "id" or "name"
$region -> string
getSummoner($summoner_id, $options, $region)
$summoner_id -> int
$options -> string -> "runes" or "masteries" or "name"
$region -> string
getRecentGames($summoner_id, $region)
$summoner_id -> int
$region -> string
getLeagues($summoner_id, $region)
$summoner_id -> int
$region -> string
getPlayerStats($summoner_id, $options, $season, $region) $summoner_id -> int
$options -> string -> "summary" or "ranked"
$season -> string -> "SEASON3" or "SEASONX"
$region -> string
getTeam()
$summoner_id -> int
$region -> string
setKey($key)
$key -> string
setRegion($region)
$region -> string
可用区域及其功能
区域
如何使用
1-创建一个 composer 项目
2- 在 composer 项目的新文件夹中创建一个 php 文件
3- 包含 composer 的自动加载并创建一个 RiotAPI 实例
require_once __DIR__ . '/../vendor/autoload.php';
use RiotAPI\RiotAPI;
$foo = new RiotAPI;
$foo->setKey('Your-API-KEY');
$foo->setRegion('na');
$foo->getChampions();
Composer Require
"require": {
"miguelfreire/riot-api": "v1.0"
},