Struct roux::me::Me [−][src]
Me
Fields
access_token: String
Access token
Implementations
impl Me
[src]
pub fn new(access_token: &str, config: Config) -> Me
[src]
Create a new me
pub async fn me(&self) -> Result<MeData, RouxError>
[src]
Get me
pub async fn submit_link(
&self,
title: &str,
link: &str,
sr: &str
) -> Result<Response, RouxError>
[src]
&self,
title: &str,
link: &str,
sr: &str
) -> Result<Response, RouxError>
Submit link
pub async fn submit_text(
&self,
title: &str,
text: &str,
sr: &str
) -> Result<Response, RouxError>
[src]
&self,
title: &str,
text: &str,
sr: &str
) -> Result<Response, RouxError>
Submit text
pub async fn compose_message(
&self,
username: &str,
subject: &str,
body: &str
) -> Result<Response, RouxError>
[src]
&self,
username: &str,
subject: &str,
body: &str
) -> Result<Response, RouxError>
Compose message
pub async fn inbox(&self) -> Result<Inbox, RouxError>
[src]
Get user’s submitted posts.
pub async fn saved(&self) -> Result<Submissions, RouxError>
[src]
Get saved
pub async fn upvoted(&self) -> Result<Submissions, RouxError>
[src]
Get upvoted
pub async fn downvoted(&self) -> Result<Submissions, RouxError>
[src]
Get downvoted
pub async fn unread(&self) -> Result<Inbox, RouxError>
[src]
Get users unread messages
pub async fn mark_read(&self, ids: &str) -> Result<Response, RouxError>
[src]
Mark messages as read
pub async fn mark_unread(&self, ids: &str) -> Result<Response, RouxError>
[src]
Mark messages as unread
pub async fn comment(
&self,
text: &str,
parent: &str
) -> Result<Response, RouxError>
[src]
&self,
text: &str,
parent: &str
) -> Result<Response, RouxError>
Comment
pub async fn edit(
&self,
text: &str,
parent: &str
) -> Result<Response, RouxError>
[src]
&self,
text: &str,
parent: &str
) -> Result<Response, RouxError>
Edit
pub async fn logout(self) -> Result<(), RouxError>
[src]
Logout
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,