zed_script

Crates.iozed_script
lib.rszed_script
version0.1.1
sourcesrc
created_at2020-12-20 20:02:17.039926
updated_at2020-12-24 22:32:20.879743
descriptionLeague Of Legends API Wrapper
homepage
repositoryhttps://github.com/LionelBergen/ZedScript
max_upload_size
id324990
size98,184
Lionel Bergen (LionelBergen)

documentation

README

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.

Commit count: 47

cargo fmt