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 Freeze for Hydrus
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