valorant_api_official 0.2.2

A library for interacting with the Official Valorant API.
Documentation
use std::fmt::Display;

use serde::{Deserialize, Serialize};

#[derive(PartialEq, Eq, Hash, Serialize, Deserialize, Debug, Clone, Copy)]
#[serde(rename_all = "camelCase")]
pub enum MatchHistoryQueryArg {
    StartIndex,
    EndIndex,
    Queue,
}

impl Display for MatchHistoryQueryArg {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::StartIndex => write!(f, "startIndex"),
            Self::EndIndex => write!(f, "endIndex"),
            Self::Queue => write!(f, "queue"),
        }
    }
}

#[derive(PartialEq, Eq, Hash, Serialize, Deserialize, Debug, Clone, Copy)]
#[serde(rename_all = "camelCase")]
pub enum ContentQueryArg {
    Locale,
}

impl Display for ContentQueryArg {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Locale => write!(f, "locale"),
        }
    }
}

#[derive(PartialEq, Eq, Hash, Serialize, Deserialize, Debug, Clone, Copy)]
#[serde(rename_all = "camelCase")]
pub enum LeaderboardQueryArg {
    StartIndex,
    Size,
    Query,
    PlatformType,
}

impl Display for LeaderboardQueryArg {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::StartIndex => write!(f, "startIndex"),
            Self::Size => write!(f, "size"),
            Self::Query => write!(f, "query"),
            Self::PlatformType => write!(f, "platformType"),
        }
    }
}