2 releases
0.1.1 | Dec 24, 2020 |
---|---|
0.1.0 | Dec 20, 2020 |
#11 in #riot-games
83KB
2K
SLoC
ZedScript
League Of Legends API Wrapper for Rust - very easy to use
Every method from the Riot API are wrapped inside easy to use functions. Below are just a few examples to help you get started.
Example get_api_status - returns a 'SharedStatus', containing status info:
let x : LolApiKey = LolApiKey {api_key: env::var("LEAGUE_API_KEY").unwrap().to_string(), region: Region::NA };
let result = RiotApi::get_status(&x).unwrap();
println!("{:?}", result);
Example get_champion_mastery - returns a list of 'ChampionMasteryDto', containing all the champion masteries for the summonerId passed:
let api_key : LolApiKey = LolApiKey {api_key: env::var("LEAGUE_API_KEY").unwrap().to_string(), region: Region::NA };
// LeagueOfSausage SummonerId
let result = RiotApi::get_champion_mastery(&api_key, &"n-zcEtpy2E4JUt8AksUMpkEB9SsBw51-6b6rDF27wvZ1YYw".to_string());
println!("{:?}", result);
Disclaimer
ZedScript
is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.
Dependencies
~8–11MB
~240K SLoC