steam-user 0.1.0

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

use super::super::{RemoteSteamUser, RemoteSteamUserError};
use crate::types::UserComment;

impl RemoteSteamUser {
    pub async fn get_my_comments(&self) -> Result<Vec<UserComment>, RemoteSteamUserError> {
        self.call_typed("/api/comments/my", serde_json::json!({})).await
    }
    pub async fn get_user_comments(&self, steam_id: SteamID) -> Result<Vec<UserComment>, RemoteSteamUserError> {
        self.call_typed("/api/comments/user", serde_json::json!({ "steam_id": steam_id.steam_id64() })).await
    }
    pub async fn post_comment(&self, steam_id: SteamID, message: &str) -> Result<Option<UserComment>, RemoteSteamUserError> {
        self.call_typed("/api/comments/post", serde_json::json!({ "steam_id": steam_id.steam_id64(), "message": message })).await
    }
    pub async fn delete_comment(&self, steam_id: SteamID, gidcomment: &str) -> Result<(), RemoteSteamUserError> {
        self.call_void("/api/comments/delete", serde_json::json!({ "steam_id": steam_id.steam_id64(), "gidcomment": gidcomment })).await
    }
}