Function valorant_api::get_match_details_v1

source ·
pub async fn get_match_details_v1<T: HttpClient>(
    credentials_manager: &CredentialsManager,
    http_client: &T,
    region: Region,
    match_id: &Uuid
) -> Result<MatchDetailsV1, RequestError>
Expand description

Get the match details of a match

§Arguments

  • credentials_manager - The credentials manager
  • region - The region of the match
  • match_id - The match id of the match

§Example

let match_id = Uuid::parse_str("3100c02b-17d2-4adb-97b5-e45dee67d292").expect("Invalid UUID");
let region = Region::EU;
let result = valorant_api::get_match_details_v1(credentials_manager, &http_client, region, &match_id).await;
println!("Result: {:#?}", result);
Examples found in repository?
examples/matchdetails.rs (line 17)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 match_id = Uuid::parse_str("3100c02b-17d2-4adb-97b5-e45dee67d292").expect("Invalid UUID");
    let region = Region::EU;
    let result =
        valorant_api::get_match_details_v1(&credentials_manager, &http_client, region, &match_id)
            .await;
    println!("Result: {:#?}", result);
    assert!(result.is_ok());
}