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
use super::super::{RemoteSteamUser, RemoteSteamUserError};
use crate::types::Confirmation;

impl RemoteSteamUser {
    pub async fn get_confirmations(&self, identity_secret: &str, tag: Option<&str>) -> Result<Vec<Confirmation>, RemoteSteamUserError> {
        self.call_typed("/api/confirmations/list", serde_json::json!({"identity_secret": identity_secret, "tag": tag})).await
    }
    pub async fn accept_confirmation_for_object(&self, identity_secret: &str, object_id: u64) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/confirmations/accept", serde_json::json!({"identity_secret": identity_secret, "object_id": object_id})).await
    }
    pub async fn deny_confirmation_for_object(&self, identity_secret: &str, object_id: u64) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/confirmations/deny", serde_json::json!({"identity_secret": identity_secret, "object_id": object_id})).await
    }
}