Struct qbit_api_rs::client::QbitClient
source · pub struct QbitClient {
pub host: Url,
pub auth: Credential,
pub client: Client,
pub cookie_store: Arc<CookieStoreMutex>,
}
Fields§
§host: Url
§auth: Credential
§client: Client
Implementations§
source§impl QbitClient
impl QbitClient
pub fn new_with_user_pwd<U>( host: U, username: U, password: U ) -> Result<Self, ClientError>where U: AsRef<str>,
pub fn new_from_env() -> Result<Self, ClientError>
pub async fn _resp<E>(&self, endpoint: &E) -> Result<E::Response, ClientError>where E: Endpoint,
pub async fn auth_login(&self) -> Result<String, ClientError>
pub async fn auth_logout(&self) -> Result<String, ClientError>
pub async fn app_version(&self) -> Result<String, ClientError>
pub async fn app_webapi_version(&self) -> Result<String, ClientError>
pub async fn app_build_info(&self) -> Result<AppBuildInfoResponse, ClientError>
pub async fn app_preferences(&self) -> Result<AppPreferences, ClientError>
pub async fn app_set_preferences( &self, f: AppSetPreferencesForm ) -> Result<String, ClientError>
pub async fn app_default_save_path(&self) -> Result<String, ClientError>
pub async fn log_main( &self, q: LogMainQuery ) -> Result<Vec<LogMainResponseItem>, ClientError>
pub async fn log_peers( &self, q: LogPeersQuery ) -> Result<Vec<LogPeersResponseItem>, ClientError>
pub async fn sync_maindata( &self, q: SyncMaindataQuery ) -> Result<SyncMaindataResponse, ClientError>
pub async fn sync_torrent_peers( &self, q: SyncTorrentPeersQuery ) -> Result<SyncTorrentPeersResponse, ClientError>
pub async fn transfer_info(&self) -> Result<TransferInfoResponse, ClientError>
pub async fn speed_limits_mode( &self ) -> Result<SpeedLimitsModeResponse, ClientError>
pub async fn toggle_speed_limits_mode(&self) -> Result<String, ClientError>
pub async fn download_limit(&self) -> Result<String, ClientError>
pub async fn set_download_limit( &self, limit: u64 ) -> Result<String, ClientError>
pub async fn upload_limit(&self) -> Result<String, ClientError>
pub async fn set_upload_limit(&self, limit: u64) -> Result<String, ClientError>
pub async fn ban_peers(&self, peers: Vec<String>) -> Result<String, ClientError>
pub async fn torrents_info( &self, q: TorrentsInfoQuery ) -> Result<TorrentsInfoResponse, ClientError>
pub async fn torrents_properties( &self, hash: String ) -> Result<TorrentsPropertiesResponse, ClientError>
pub async fn torrents_trackers( &self, hash: String ) -> Result<TorrentsTrackersResponse, ClientError>
pub async fn torrents_webseeds( &self, hash: String ) -> Result<TorrentsWebseedsResponse, ClientError>
pub async fn torrents_files( &self, hash: String ) -> Result<TorrentsFilesResponse, ClientError>
pub async fn torrents_piece_states( &self, hash: String ) -> Result<TorrentsPieceStatesResponse, ClientError>
pub async fn torrents_piece_hashes( &self, hash: String ) -> Result<TorrentsPieceHashesResponse, ClientError>
pub async fn torrents_pause( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_add_by_url<U>( &self, urls: &[U] ) -> Result<String, ClientError>where U: AsRef<str>,
pub async fn torrents_add_by_file<F>( &self, files: &[F] ) -> Result<String, ClientError>where F: AsRef<Path>,
pub async fn torrents_add_trackers( &self, hash: String, urls: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_edit_tracker( &self, hash: String, orig_url: String, new_url: String ) -> Result<String, ClientError>
pub async fn torrents_remove_trackers( &self, hash: String, urls: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_add_peers( &self, hashes: Vec<String>, peers: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_increase_prio( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_decrease_prio( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_top_prio( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_bottom_prio( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_download_limit( &self, hashes: Vec<String> ) -> Result<TorrentsDownloadLimitResponse, ClientError>
pub async fn torrents_set_download_limit( &self, hashes: Vec<String>, limit: u64 ) -> Result<String, ClientError>
pub async fn torrents_upload_limit( &self, hashes: Vec<String> ) -> Result<TorrentsUploadLimitResponse, ClientError>
pub async fn torrents_set_upload_limit( &self, hashes: Vec<String>, limit: u64 ) -> Result<String, ClientError>
pub async fn torrents_set_location<T>( &self, hashes: Vec<String>, location: T ) -> Result<String, ClientError>where T: AsRef<Path>,
pub async fn torernts_rename( &self, hash: String, name: String ) -> Result<String, ClientError>
pub async fn torernts_set_category( &self, hashes: Vec<String>, category: String ) -> Result<String, ClientError>
pub async fn torrents_categories( &self ) -> Result<TorrentsCategoriesResponse, ClientError>
pub async fn torrents_create_category<T>( &self, category: String, save_path: T ) -> Result<String, ClientError>where T: AsRef<Path>,
pub async fn torrents_edit_category<T>( &self, category: String, save_path: T ) -> Result<String, ClientError>where T: AsRef<Path>,
pub async fn torrents_remove_categories( &self, categories: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_set_auto_management( &self, hashes: Vec<String>, enable: bool ) -> Result<String, ClientError>
pub async fn torrents_toggle_sequential_download( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_toggle_first_last_piece_prio( &self, hashes: Vec<String> ) -> Result<String, ClientError>
pub async fn torrents_set_force_start( &self, hashes: Vec<String>, value: bool ) -> Result<String, ClientError>
pub async fn torrents_set_super_seeding( &self, hashes: Vec<String>, value: bool ) -> Result<String, ClientError>
pub async fn torrents_rename_file<T>( &self, hash: String, old_path: T, new_path: T ) -> Result<String, ClientError>where T: AsRef<Path>,
pub async fn torrents_rename_folder<T>( &self, hash: String, old_path: T, new_path: T ) -> Result<String, ClientError>where T: AsRef<Path>,
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for QbitClient
impl Send for QbitClient
impl Sync for QbitClient
impl Unpin for QbitClient
impl !UnwindSafe for QbitClient
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