steam_user/services/
notifications.rs1use crate::{
4 client::SteamUser,
5 endpoint::steam_endpoint,
6 error::SteamUserError,
7 types::{Notifications, notifications::NotificationCountsEnvelope},
8};
9
10impl SteamUser {
11 #[steam_endpoint(GET, host = Community, path = "/actions/GetNotificationCounts", kind = Read)]
20 pub async fn get_notifications(&self) -> Result<Notifications, SteamUserError> {
21 let envelope: NotificationCountsEnvelope = self.get_path("/actions/GetNotificationCounts").send().await?.json().await?;
24
25 Ok(envelope.notifications.into())
26 }
27}