Start implementing get_relationship
This commit is contained in:
parent
3bf911745f
commit
94ae449f7d
|
@ -37,6 +37,19 @@ impl UserMeta {
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn get_relationships(&mut self) -> Result<Vec<types::Relationship>, 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::<Vec<types::Relationship>>(
|
||||||
|
request,
|
||||||
|
self,
|
||||||
|
crate::api::limits::LimitType::Global,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
|
||||||
/// Sends a friend request to a user.
|
/// Sends a friend request to a user.
|
||||||
///
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
|
|
Loading…
Reference in New Issue