diff --git a/src/api/users/relationships.rs b/src/api/users/relationships.rs index ede39f0..563b846 100644 --- a/src/api/users/relationships.rs +++ b/src/api/users/relationships.rs @@ -37,6 +37,19 @@ impl UserMeta { .await } + pub async fn get_relationships(&mut self) -> Result, ChorusLibError> { + let belongs_to = self.belongs_to.borrow(); + let url = format!("{}/users/@me/relationships/", belongs_to.urls.get_api(),); + drop(belongs_to); + let request = Client::new().get(url).bearer_auth(self.token()); + deserialize_response::>( + request, + self, + crate::api::limits::LimitType::Global, + ) + .await + } + /// Sends a friend request to a user. /// /// # Arguments