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::{AddPhoneNumberResponse, ConfirmPhoneCodeResponse, RemovePhoneResult};

impl RemoteSteamUser {
    pub async fn get_phone_number_status(&self) -> Result<Option<String>, RemoteSteamUserError> {
        self.call_typed("/api/phone/status", serde_json::json!({})).await
    }
    pub async fn add_phone_number(&self, phone: &str) -> Result<AddPhoneNumberResponse, RemoteSteamUserError> {
        self.call_typed("/api/phone/add", serde_json::json!({"phone": phone})).await
    }
    pub async fn confirm_phone_code_for_add(&self, code: &str) -> Result<ConfirmPhoneCodeResponse, RemoteSteamUserError> {
        self.call_typed("/api/phone/confirm_code", serde_json::json!({"code": code})).await
    }
    pub async fn resend_phone_verification_code(&self) -> Result<serde_json::Value, RemoteSteamUserError> {
        self.call("/api/phone/resend_code", serde_json::json!({})).await
    }
    pub async fn get_remove_phone_number_type(&self) -> Result<Option<RemovePhoneResult>, RemoteSteamUserError> {
        self.call_typed("/api/phone/remove_type", serde_json::json!({})).await
    }
    pub async fn send_account_recovery_code(&self, wizard_param: serde_json::Value, method: i32) -> Result<serde_json::Value, RemoteSteamUserError> {
        self.call("/api/phone/send_recovery_code", serde_json::json!({"wizard_param": wizard_param, "method": method})).await
    }
    pub async fn confirm_remove_phone_number_code(&self, wizard_param: serde_json::Value, code: &str) -> Result<serde_json::Value, RemoteSteamUserError> {
        self.call("/api/phone/confirm_remove", serde_json::json!({"wizard_param": wizard_param, "code": code})).await
    }
    pub async fn send_confirmation_2_steam_mobile_app(&self, wizard_param: serde_json::Value) -> Result<serde_json::Value, RemoteSteamUserError> {
        self.call("/api/phone/send_app_confirmation", serde_json::json!({"wizard_param": wizard_param})).await
    }
    pub async fn send_confirmation_2_steam_mobile_app_final(&self, wizard_param: serde_json::Value) -> Result<serde_json::Value, RemoteSteamUserError> {
        self.call("/api/phone/send_app_confirmation_final", serde_json::json!({"wizard_param": wizard_param})).await
    }
}