pub struct Client { /* private fields */ }
Implementations
sourceimpl Client
impl Client
sourcepub fn new(root_url: &str) -> Result<Client, Box<dyn Error>>
pub fn new(root_url: &str) -> Result<Client, Box<dyn Error>>
Constructs a new Client
.
This client contains the web session.
sourcepub fn forums(&mut self) -> Result<Vec<String>, Box<dyn Error>>
pub fn forums(&mut self) -> Result<Vec<String>, Box<dyn Error>>
Get the names of all the forums.
sourcepub fn get_submissions_from_page(
&mut self,
url: &str
) -> Result<Vec<SubmissionInfo>, Box<dyn Error>>
pub fn get_submissions_from_page(
&mut self,
url: &str
) -> Result<Vec<SubmissionInfo>, Box<dyn Error>>
Get a list of all the urls of submissions on a page.
sourcepub fn get_submissions_from_page_until(
&mut self,
url: &str,
date: DateTime<FixedOffset>
) -> Result<Vec<SubmissionInfo>, Box<dyn Error>>
pub fn get_submissions_from_page_until(
&mut self,
url: &str,
date: DateTime<FixedOffset>
) -> Result<Vec<SubmissionInfo>, Box<dyn Error>>
Get a list of all the urls of submissions on a page from now until a certain date.
sourcepub fn get_submission_urls_from_page(
&mut self,
url: &str
) -> Result<Vec<String>, Box<dyn Error>>
pub fn get_submission_urls_from_page(
&mut self,
url: &str
) -> Result<Vec<String>, Box<dyn Error>>
Get a list of all the urls of submissions on a page.
sourcepub fn login(
&mut self,
username: &str,
password: &str
) -> Result<(), Box<dyn Error>>
pub fn login(
&mut self,
username: &str,
password: &str
) -> Result<(), Box<dyn Error>>
Login as a user. This sets the session cookie and the csrf token which are bound to the user login.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more