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
16
17
use super::super::{RemoteSteamUser, RemoteSteamUserError};
use crate::services::tokens::RevokeTokensResult;

impl RemoteSteamUser {
    pub async fn enumerate_tokens(&self) -> Result<steam_protos::CAuthenticationRefreshTokenEnumerateResponse, RemoteSteamUserError> {
        self.call_typed("/api/tokens/list", serde_json::json!({})).await
    }
    pub async fn check_token_exists(&self, token_id: &str) -> Result<bool, RemoteSteamUserError> {
        self.call_typed("/api/tokens/check", serde_json::json!({"token_id": token_id})).await
    }
    pub async fn revoke_tokens(&self, token_ids: &[&str], shared_secret: Option<&str>) -> Result<RevokeTokensResult, RemoteSteamUserError> {
        self.call_typed("/api/tokens/revoke", serde_json::json!({"token_ids": token_ids, "shared_secret": shared_secret})).await
    }
    pub async fn renew_access_token(&self) -> Result<serde_json::Value, RemoteSteamUserError> {
        self.call("/api/tokens/renew", serde_json::json!({})).await
    }
}