use steamid::SteamID;
use super::super::{RemoteSteamUser, RemoteSteamUserError};
use crate::types::{ActivityCommentResponse, FriendActivity, FriendActivityResponse};
impl RemoteSteamUser {
pub async fn get_friend_activity(&self, start: Option<u64>) -> Result<FriendActivityResponse, RemoteSteamUserError> {
self.call_typed("/api/activity/feed", serde_json::json!({ "start": start })).await
}
pub async fn get_friend_activity_full(&self) -> Result<Vec<FriendActivity>, RemoteSteamUserError> {
self.call_typed("/api/activity/feed_full", serde_json::json!({})).await
}
pub async fn comment_user_received_new_game(&self, steam_id: SteamID, thread_id: u64, comment: &str) -> Result<ActivityCommentResponse, RemoteSteamUserError> {
self.call_typed("/api/activity/comment", serde_json::json!({ "steam_id": steam_id.steam_id64(), "thread_id": thread_id, "comment": comment })).await
}
pub async fn rate_up_user_received_new_game(&self, steam_id: SteamID, thread_id: u64) -> Result<ActivityCommentResponse, RemoteSteamUserError> {
self.call_typed("/api/activity/rate_up", serde_json::json!({ "steam_id": steam_id.steam_id64(), "thread_id": thread_id })).await
}
pub async fn delete_comment_user_received_new_game(&self, steam_id: SteamID, thread_id: u64, comment_id: &str) -> Result<ActivityCommentResponse, RemoteSteamUserError> {
self.call_typed("/api/activity/delete_comment", serde_json::json!({ "steam_id": steam_id.steam_id64(), "thread_id": thread_id, "comment_id": comment_id })).await
}
}