Struct hydrus_api::wrapper::hydrus::Hydrus
source · pub struct Hydrus { /* private fields */ }
Expand description
A high level wrapper for the hydrus API for easier management of files, tags urls etc.
Implementations§
source§impl Hydrus
impl Hydrus
sourcepub fn import(&self) -> ImportBuilder
pub fn import(&self) -> ImportBuilder
Creates an import builder to build an import request to hydrus
sourcepub fn address<S: AsRef<str> + Debug>(&self, address: S) -> Address
pub fn address<S: AsRef<str> + Debug>(&self, address: S) -> Address
Returns the address as an object that can be used to get and set cookies
sourcepub async fn url<S: AsRef<str> + Debug>(&self, url: S) -> Result<Url>
pub async fn url<S: AsRef<str> + Debug>(&self, url: S) -> Result<Url>
Returns information about a given url in an object that allows further operations with that url
sourcepub async fn file(&self, identifier: FileIdentifier) -> Result<HydrusFile>
pub async fn file(&self, identifier: FileIdentifier) -> Result<HydrusFile>
Returns a file by identifier to perform further operations on
sourcepub async fn delete(&self) -> DeleteFilesBuilder
pub async fn delete(&self) -> DeleteFilesBuilder
Creates a builder to delete files
sourcepub fn tagging(&self) -> TaggingBuilder
pub fn tagging(&self) -> TaggingBuilder
Starts a request to bulk add tags to files
sourcepub fn search(&self) -> SearchBuilder
pub fn search(&self) -> SearchBuilder
Starts a request to search for files
Starts a search request for tags with additional filter options
sourcepub async fn page<S: AsRef<str> + Debug>(
&self,
page_key: S
) -> Result<HydrusPage>
pub async fn page<S: AsRef<str> + Debug>( &self, page_key: S ) -> Result<HydrusPage>
Returns a hydrus page by page key
sourcepub async fn root_page(&self) -> Result<HydrusPage>
pub async fn root_page(&self) -> Result<HydrusPage>
Returns the root page in the client
sourcepub async fn set_user_agent<S: ToString + Debug>(
&self,
user_agent: S
) -> Result<()>
pub async fn set_user_agent<S: ToString + Debug>( &self, user_agent: S ) -> Result<()>
Sets the user agent hydrus uses for http requests
sourcepub async fn get_service_key(
&self,
service: ServiceIdentifier
) -> Result<String>
pub async fn get_service_key( &self, service: ServiceIdentifier ) -> Result<String>
Returns the key for a given service identifier
Auto Trait Implementations§
impl !RefUnwindSafe for Hydrus
impl Send for Hydrus
impl Sync for Hydrus
impl Unpin for Hydrus
impl !UnwindSafe for Hydrus
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more