steam-user 0.1.0

Steam User web client for Rust - HTTP-based Steam Community interactions
Documentation
use super::super::{GasError, GasSteamUser};
use crate::types::Confirmation;

impl GasSteamUser {
    pub async fn get_confirmations(&self, identity_secret: &str, tag: Option<&str>) -> Result<Vec<Confirmation>, GasError> {
        let mut params: Vec<(&str, &str)> = vec![("identitySecret", identity_secret)];
        if let Some(t) = tag {
            params.push(("tag", t));
        }
        self.call("get_confirmations", &params).await
    }
    pub async fn accept_confirmation_for_object(&self, identity_secret: &str, object_id: u64) -> Result<(), GasError> {
        let oid = object_id.to_string();
        self.call_void("accept_confirmation_for_object", &[("identitySecret", identity_secret), ("objectId", &oid)]).await
    }
    pub async fn deny_confirmation_for_object(&self, identity_secret: &str, object_id: u64) -> Result<(), GasError> {
        let oid = object_id.to_string();
        self.call_void("deny_confirmation_for_object", &[("identitySecret", identity_secret), ("objectId", &oid)]).await
    }
}