Struct butlerd::Butler [−][src]
pub struct Butler { /* fields omitted */ }
Represents a connection to a butlerd instance
Methods
impl Butler
[src]
impl Butler
pub fn new() -> Result<Butler, String>
[src]
pub fn new() -> Result<Butler, String>
Initializes a new butlerd instance. It will close when your program does.
pub fn close(&self)
[src]
pub fn close(&self)
Shuts down butler daemon.
pub fn fetchall(&self) -> Result<Vec<Cave>, BError>
[src]
pub fn fetchall(&self) -> Result<Vec<Cave>, BError>
Fetchs all installed caves
pub fn fetch_game(&self, game_id: i32) -> Result<Game, BError>
[src]
pub fn fetch_game(&self, game_id: i32) -> Result<Game, BError>
Fetches specific game by id
pub fn fetch_cave(&self, cave_id: &str) -> Result<Cave, BError>
[src]
pub fn fetch_cave(&self, cave_id: &str) -> Result<Cave, BError>
Fetches specific cave by id
pub fn pin_cave(&self, cave_id: &str, pinned: bool)
[src]
pub fn pin_cave(&self, cave_id: &str, pinned: bool)
Makes a cave 'pinned' or not depending on pinned
pub fn launch_game(&self, cave_id: &str)
[src]
pub fn launch_game(&self, cave_id: &str)
Launches game by CaveID. Note that this will not complete until the game is closed.
pub fn profile_list(&self) -> Result<Vec<Profile>, BError>
[src]
pub fn profile_list(&self) -> Result<Vec<Profile>, BError>
Lists saved profiles
pub fn profile_put(&self, profile_id: i32, key: &str, value: &str)
[src]
pub fn profile_put(&self, profile_id: i32, key: &str, value: &str)
Sets a specific profile info value
pub fn clean_search(
&self,
roots: Vec<String>,
whitelist: Vec<String>
) -> Result<Vec<CleanDownloadsEntry>, BError>
[src]
pub fn clean_search(
&self,
roots: Vec<String>,
whitelist: Vec<String>
) -> Result<Vec<CleanDownloadsEntry>, BError>
Searches for folders possible to clean
pub fn clean_apply(&self, entries: Vec<CleanDownloadsEntry>)
[src]
pub fn clean_apply(&self, entries: Vec<CleanDownloadsEntry>)
Cleans specified CleanDownloadsEntries
pub fn profile_get(&self, profile_id: i32, key: &str) -> Result<String, BError>
[src]
pub fn profile_get(&self, profile_id: i32, key: &str) -> Result<String, BError>
Gets a specific profile info value
pub fn profile_forget(&self, profile_id: i32) -> Result<bool, BError>
[src]
pub fn profile_forget(&self, profile_id: i32) -> Result<bool, BError>
Removes a profile's saved info. Also removes it from profile_list. Returns true if successful.
pub fn snooze_cave(&self, cave_id: &str)
[src]
pub fn snooze_cave(&self, cave_id: &str)
Disables updates for a cave
pub fn login_saved(&self, profile_id: i32) -> Result<Profile, BError>
[src]
pub fn login_saved(&self, profile_id: i32) -> Result<Profile, BError>
Logs into a profile using saved credentials
pub fn login_api_key(&self, api_key: &str) -> Result<Profile, BError>
[src]
pub fn login_api_key(&self, api_key: &str) -> Result<Profile, BError>
Given an API key, logs into a profile and returns profile.
pub fn login_password(
&self,
username: &str,
password: &str
) -> Result<PassLogRes, BError>
[src]
pub fn login_password(
&self,
username: &str,
password: &str
) -> Result<PassLogRes, BError>
Given an username and password, logs into a profile and returns profile and cookie. May fail if a captcha or 2factor is required. Working on fix.
pub fn fetch_commons(&self) -> Result<Commons, BError>
[src]
pub fn fetch_commons(&self) -> Result<Commons, BError>
Fetches all common/cached items and returns summaries
pub fn fetch_profile_games(
&self,
profile_id: i32
) -> Result<Vec<ProfileGame>, BError>
[src]
pub fn fetch_profile_games(
&self,
profile_id: i32
) -> Result<Vec<ProfileGame>, BError>
Fetches a vec of games owned by a specific profile id
pub fn fetch_download_key(
&self,
profile_id: i32,
download_key_id: i32,
fresh: bool
) -> Result<DownloadKey, BError>
[src]
pub fn fetch_download_key(
&self,
profile_id: i32,
download_key_id: i32,
fresh: bool
) -> Result<DownloadKey, BError>
Fetches download key
pub fn fetch_collection(
&self,
profile_id: i32,
collection_id: i32,
fresh: bool
) -> Result<Collection, BError>
[src]
pub fn fetch_collection(
&self,
profile_id: i32,
collection_id: i32,
fresh: bool
) -> Result<Collection, BError>
Fetches collection info. Does not include games
pub fn fetch_profile_collections(
&self,
profile_id: i32,
fresh: bool
) -> Result<Vec<Collection>, BError>
[src]
pub fn fetch_profile_collections(
&self,
profile_id: i32,
fresh: bool
) -> Result<Vec<Collection>, BError>
Fetches all collections for a profile. Does not include games
pub fn fetch_collection_games(
&self,
profile_id: i32,
collection_id: i32,
fresh: bool
) -> Result<Vec<CollectionGame>, BError>
[src]
pub fn fetch_collection_games(
&self,
profile_id: i32,
collection_id: i32,
fresh: bool
) -> Result<Vec<CollectionGame>, BError>
Fetches games in a collection
pub fn fetch_profile_keys(
&self,
profile_id: i32,
fresh: bool
) -> Result<Vec<DownloadKey>, BError>
[src]
pub fn fetch_profile_keys(
&self,
profile_id: i32,
fresh: bool
) -> Result<Vec<DownloadKey>, BError>
Fetches owned download keys for a profile. Pass fresh as true to force butler to refresh cache
pub fn expireall(&self)
[src]
pub fn expireall(&self)
Marks all local data as 'stale' and outdated
pub fn search_users(
&self,
profile_id: i32,
query: &str
) -> Result<Vec<User>, BError>
[src]
pub fn search_users(
&self,
profile_id: i32,
query: &str
) -> Result<Vec<User>, BError>
Searches users
pub fn set_throttle(&self, enabled: bool, rate: i64)
[src]
pub fn set_throttle(&self, enabled: bool, rate: i64)
Sets a throttle for how much bandwith butler can use. If enabled is false, disables any previous set throttles. Rate is measured in kbps
pub fn fetch_sale(&self, game_id: i32) -> Result<Sale, BError>
[src]
pub fn fetch_sale(&self, game_id: i32) -> Result<Sale, BError>
Fetches the best available sale for a game(if such a sale exists)
pub fn get_install_locations(
&self
) -> Result<Vec<InstallLocationSummary>, BError>
[src]
pub fn get_install_locations(
&self
) -> Result<Vec<InstallLocationSummary>, BError>
Gets all configured butler install locations in a vec
pub fn statfs(&self, path: &str) -> Result<FsInfo, BError>
[src]
pub fn statfs(&self, path: &str) -> Result<FsInfo, BError>
Gets info on a filesystem
pub fn check_update(&self, cave_ids: Vec<String>) -> Result<CheckUpdate, BError>
[src]
pub fn check_update(&self, cave_ids: Vec<String>) -> Result<CheckUpdate, BError>
Checks if an update is available for a vec of Caves. If you pass an empty vec, all caves will be checked.
pub fn install_cancel(&self, id: &str) -> Result<bool, BError>
[src]
pub fn install_cancel(&self, id: &str) -> Result<bool, BError>
Cancels an install. Needs an install id. Result is true if cancel succeeded
pub fn install_queue(
&self,
game: Game,
install_location_id: &str,
upload: Upload,
reason: DownloadReason
) -> Result<QueueResponse, BError>
[src]
pub fn install_queue(
&self,
game: Game,
install_location_id: &str,
upload: Upload,
reason: DownloadReason
) -> Result<QueueResponse, BError>
Queues up a game installation
pub fn install_perform(&self, queue_id: &str, staging_folder: &str)
[src]
pub fn install_perform(&self, queue_id: &str, staging_folder: &str)
Performs an Install. Download must be completed beforehand
pub fn fetch_uploads(
&self,
game_id: i32,
compatible: bool
) -> Result<Vec<Upload>, BError>
[src]
pub fn fetch_uploads(
&self,
game_id: i32,
compatible: bool
) -> Result<Vec<Upload>, BError>
Fetches all uploads for a game
pub fn download_queue(&self, i_queue: QueueResponse)
[src]
pub fn download_queue(&self, i_queue: QueueResponse)
Queues a download to later be downloaded by downloads_drive
pub fn downloads_drive(&self)
[src]
pub fn downloads_drive(&self)
Downloads all games in the queue. Completes when they are all done
pub fn cancel_download_drive(&self) -> Result<bool, BError>
[src]
pub fn cancel_download_drive(&self) -> Result<bool, BError>
Cancels driving downloads. Returns bool indicating success.
pub fn set_offline(&self, online: bool)
[src]
pub fn set_offline(&self, online: bool)
Forces butler's online/offline state. True is offline, False is online
pub fn discard_download(&self, download_id: &str)
[src]
pub fn discard_download(&self, download_id: &str)
Discards one download
pub fn prioritize_download(&self, download_id: &str)
[src]
pub fn prioritize_download(&self, download_id: &str)
Prioritizes by download id
pub fn download_retry(&self, download_id: &str)
[src]
pub fn download_retry(&self, download_id: &str)
Retries an errored download id
pub fn get_version(&self) -> Result<VersionInfo, BError>
[src]
pub fn get_version(&self) -> Result<VersionInfo, BError>
Gets butler version strings
pub fn clear_completed(&self)
[src]
pub fn clear_completed(&self)
Clears all completed downloads from the queue
pub fn install_game(
&self,
game: Game,
install_location_id: &str,
upload: Upload
)
[src]
pub fn install_game(
&self,
game: Game,
install_location_id: &str,
upload: Upload
)
A helper function that performs all of the game installation/download steps for you. Recommended over doing installation yourself.
pub fn downloads_list(&self) -> Result<Vec<Download>, BError>
[src]
pub fn downloads_list(&self) -> Result<Vec<Download>, BError>
Fetches a vec of Downloads from the queue, returning a BError if none are available
pub fn search_games(
&self,
profile_id: i32,
query: &str
) -> Result<Vec<Game>, BError>
[src]
pub fn search_games(
&self,
profile_id: i32,
query: &str
) -> Result<Vec<Game>, BError>
Searches games for string. Requires profileid.
pub fn install_location_add(&self, path: &str)
[src]
pub fn install_location_add(&self, path: &str)
Adds a new install location
pub fn install_location_remove(&self, id: &str)
[src]
pub fn install_location_remove(&self, id: &str)
Removes an install location
pub fn install_location_get_by_id(
&self,
id: &str
) -> Result<InstallLocationSummary, BError>
[src]
pub fn install_location_get_by_id(
&self,
id: &str
) -> Result<InstallLocationSummary, BError>
Gets an install location from a previously fetched id
pub fn uninstall(&self, cave_id: &str)
[src]
pub fn uninstall(&self, cave_id: &str)
Uninstalls a cave