steam-user 0.1.0

Steam User web client for Rust - HTTP-based Steam Community interactions
Documentation
use steamid::SteamID;

use super::super::{GasError, GasSteamUser};
use crate::types::UserComment;

impl GasSteamUser {
    pub async fn get_my_comments(&self) -> Result<Vec<UserComment>, GasError> {
        self.call("get_my_comments", &[]).await
    }
    pub async fn get_user_comments(&self, steam_id: SteamID) -> Result<Vec<UserComment>, GasError> {
        let id = steam_id.steam_id64().to_string();
        self.call("get_user_comments", &[("steamId64", &id)]).await
    }
    pub async fn post_comment(&self, steam_id: SteamID, message: &str) -> Result<Option<UserComment>, GasError> {
        let id = steam_id.steam_id64().to_string();
        self.call("post_comment", &[("steamId64", &id), ("message", message)]).await
    }
    pub async fn delete_comment(&self, steam_id: SteamID, gidcomment: &str) -> Result<(), GasError> {
        let id = steam_id.steam_id64().to_string();
        self.call_void("delete_comment", &[("steamId64", &id), ("gidcomment", gidcomment)]).await
    }
}