Function valorant_api::get_mmr_details_v1
source · pub async fn get_mmr_details_v1<T: HttpClient>(
credentials_manager: &CredentialsManager,
http_client: &T,
region: Region,
puuid: &Uuid
) -> Result<MMRDetailsV1, RequestError>
Expand description
Get the mmr of a player
§Arguments
credentials_manager
- The credentials managerregion
- The region of the playerpuuid
- The puuid of the player
§Example
let puuid = Uuid::parse_str("ee89b4d9-13d0-5832-8dd7-eb5d8806d918").expect("Invalid UUID");
let region = Region::EU;
let result = valorant_api::get_mmr_details_v1(credentials_manager, &http_client, region, &puuid).await;
println!("Result: {:#?}", result);
Examples found in repository?
examples/mmrdetails.rs (line 17)
8 9 10 11 12 13 14 15 16 17 18 19 20
async fn main() {
let http_client = get_http_client().expect("Error while creating http client");
let credentials_manager = get_credentials_manager(&http_client)
.await
.expect("Error while getting credentials manager");
let puuid = Uuid::parse_str("ee89b4d9-13d0-5832-8dd7-eb5d8806d918").expect("Invalid UUID");
let region = Region::EU;
let result =
valorant_api::get_mmr_details_v1(&credentials_manager, &http_client, region, &puuid).await;
println!("Result: {:#?}", result);
assert!(result.is_ok());
}