steam-user 0.1.0

Steam User web client for Rust - HTTP-based Steam Community interactions
Documentation
use super::super::{RemoteSteamUser, RemoteSteamUserError};
use crate::types::{HelpRequest, MatchHistoryResponse, PlayerReport};

impl RemoteSteamUser {
    pub async fn get_player_reports(&self) -> Result<Vec<PlayerReport>, RemoteSteamUserError> {
        self.call_typed("/api/extra/player_reports", serde_json::json!({})).await
    }
    pub async fn add_free_license(&self, package_id: u32) -> Result<bool, RemoteSteamUserError> {
        self.call_typed("/api/extra/add_free_license", serde_json::json!({"package_id": package_id})).await
    }
    pub async fn add_sub_free_license(&self, sub_id: u32) -> Result<bool, RemoteSteamUserError> {
        self.call_typed("/api/extra/add_sub_free_license", serde_json::json!({"sub_id": sub_id})).await
    }
    pub async fn redeem_points(&self, definition_id: u32) -> Result<steam_protos::messages::loyalty_rewards::CLoyaltyRewardsRedeemPointsResponse, RemoteSteamUserError> {
        self.call_typed("/api/extra/redeem_points", serde_json::json!({"definition_id": definition_id})).await
    }
    pub async fn get_help_requests(&self) -> Result<Vec<HelpRequest>, RemoteSteamUserError> {
        self.call_typed("/api/extra/help_requests", serde_json::json!({})).await
    }
    pub async fn get_help_request_detail(&self, id: &str) -> Result<String, RemoteSteamUserError> {
        self.call_typed("/api/extra/help_request_detail", serde_json::json!({"id": id})).await
    }
    pub async fn get_match_history(&self, match_type: &str, token: Option<&str>) -> Result<MatchHistoryResponse, RemoteSteamUserError> {
        self.call_typed("/api/extra/match_history", serde_json::json!({"match_type": match_type, "token": token})).await
    }
}