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::{SteamGuardStatus, TwoFactorResponse};

impl RemoteSteamUser {
    pub async fn get_steam_guard_status(&self) -> Result<SteamGuardStatus, RemoteSteamUserError> {
        self.call_typed("/api/twofactor/status", serde_json::json!({})).await
    }
    pub async fn enable_two_factor(&self) -> Result<TwoFactorResponse, RemoteSteamUserError> {
        self.call_typed("/api/twofactor/enable", serde_json::json!({})).await
    }
    pub async fn finalize_two_factor(&self, shared_secret: &str, activation_code: &str) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/twofactor/finalize", serde_json::json!({"shared_secret": shared_secret, "activation_code": activation_code})).await
    }
    pub async fn disable_two_factor(&self, revocation_code: &str) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/twofactor/disable", serde_json::json!({"revocation_code": revocation_code})).await
    }
    pub async fn deauthorize_devices(&self) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/twofactor/deauthorize_devices", serde_json::json!({})).await
    }
    pub async fn add_authenticator(&self) -> Result<TwoFactorResponse, RemoteSteamUserError> {
        self.call_typed("/api/twofactor/add_authenticator", serde_json::json!({})).await
    }
    pub async fn finalize_authenticator(&self, activation_code: &str) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/twofactor/finalize_authenticator", serde_json::json!({"activation_code": activation_code})).await
    }
    pub async fn remove_authenticator(&self, revocation_code: &str) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/twofactor/remove_authenticator", serde_json::json!({"revocation_code": revocation_code})).await
    }
    pub async fn enable_steam_guard_email(&self) -> Result<bool, RemoteSteamUserError> {
        self.call_typed("/api/twofactor/enable_email_guard", serde_json::json!({})).await
    }
    pub async fn disable_steam_guard_email(&self) -> Result<bool, RemoteSteamUserError> {
        self.call_typed("/api/twofactor/disable_email_guard", serde_json::json!({})).await
    }
}