steam-user 0.1.0

Steam User web client for Rust - HTTP-based Steam Community interactions
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::super::{GasError, GasSteamUser};
use crate::types::PrivacySettings;

impl GasSteamUser {
    pub async fn get_privacy_settings(&self) -> Result<PrivacySettings, GasError> {
        self.call("get_privacy_settings", &[]).await
    }
    pub async fn set_privacy_settings(&self, settings: PrivacySettings) -> Result<PrivacySettings, GasError> {
        let s = serde_json::to_string(&settings).map_err(GasError::Json)?;
        self.call("set_privacy_settings", &[("settings", &s)]).await
    }
    pub async fn set_all_privacy(&self, level: &str) -> Result<PrivacySettings, GasError> {
        self.call("set_all_privacy", &[("level", level)]).await
    }
}