Struct hydrus_api::api_core::client::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
A low level Client for the hydrus API. It provides basic abstraction over the REST api.
Implementations
Creates a new client to start requests against the hydrus api.
Returns the current API version. It’s being incremented every time the API changes.
Creates a new session key
Verifies if the access key is valid and returns some information about its permissions
Returns the list of tag and file services of the client
Adds a file to hydrus
Adds a file from binary data to hydrus
Moves files with matching hashes to the trash
Pulls files out of the trash by hash
Moves files from the inbox into the archive
Moves files from the archive into the inbox
Returns the list of tags as the client would see them in a human friendly order
Adds tags to files with the given hashes
Searches for files in the inbox, the archive or both
pub async fn get_file_metadata(
&self,
file_ids: Vec<u64>,
hashes: Vec<String>
) -> Result<FileMetadataResponse>
pub async fn get_file_metadata(
&self,
file_ids: Vec<u64>,
hashes: Vec<String>
) -> Result<FileMetadataResponse>
Returns the metadata for a given list of file_ids or hashes
pub async fn get_file_metadata_by_identifier(
&self,
id: FileIdentifier
) -> Result<FileMetadataInfo>
pub async fn get_file_metadata_by_identifier(
&self,
id: FileIdentifier
) -> Result<FileMetadataInfo>
Returns the metadata for a single file identifier
Returns the bytes of a file from hydrus
Returns all files associated with the given url
Returns information about the given url
Adds an url to hydrus, optionally with additional tags and a destination page
Associates urls with the given file hashes
Disassociates urls with the given file hashes
Returns all pages of the client
Returns information about a single page
Focuses a page in the client
Adds files to a page
Returns all cookies for the given domain
Sets some cookies for some websites.
Each entry needs to be in the format [<name>, <value>, <domain>, <path>, <expires>]
with the types [String, String, String, String, u64]
Sets the user agent that is being used for every request hydrus starts
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more