using Lantean.QBitTorrentClient.Models; namespace Lantean.QBitTorrentClient { public interface IApiClient { #region Authentication Task CheckAuthState(); Task Login(string username, string password); Task Logout(); #endregion Authentication #region Application Task GetApplicationVersion(); Task GetAPIVersion(); Task GetBuildInfo(); Task Shutdown(); Task GetApplicationPreferences(); Task SetApplicationPreferences(UpdatePreferences preferences); Task GetDefaultSavePath(); Task> GetNetworkInterfaces(); Task> GetNetworkInterfaceAddressList(string @interface); #endregion Application #region Log Task> GetLog(bool? normal = null, bool? info = null, bool? warning = null, bool? critical = null, int? lastKnownId = null); Task> GetPeerLog(int? lastKnownId = null); #endregion Log #region Sync Task GetMainData(int requestId); Task GetTorrentPeersData(string hash, int requestId); #endregion Sync #region Transfer info Task GetGlobalTransferInfo(); Task GetAlternativeSpeedLimitsState(); Task ToggleAlternativeSpeedLimits(); Task GetGlobalDownloadLimit(); Task SetGlobalDownloadLimit(long limit); Task GetGlobalUploadLimit(); Task SetGlobalUploadLimit(long limit); Task BanPeers(IEnumerable peers); #endregion Transfer info #region Torrent management Task> GetTorrentList(string? filter = null, string? category = null, string? tag = null, string? sort = null, bool? reverse = null, int? limit = null, int? offset = null, bool? isPrivate = null, params string[] hashes); Task GetTorrentProperties(string hash); Task> GetTorrentTrackers(string hash); Task> GetTorrentWebSeeds(string hash); Task> GetTorrentContents(string hash, params int[] indexes); Task> GetTorrentPieceStates(string hash); Task> GetTorrentPieceHashes(string hash); Task PauseTorrents(bool? all = null, params string[] hashes); Task ResumeTorrents(bool? all = null, params string[] hashes); Task StartTorrents(bool? all = null, params string[] hashes); Task StopTorrents(bool? all = null, params string[] hashes); Task DeleteTorrents(bool? all = null, bool deleteFiles = false, params string[] hashes); Task RecheckTorrents(bool? all = null, params string[] hashes); Task ReannounceTorrents(bool? all = null, params string[] hashes); Task AddTorrent(AddTorrentParams addTorrentParams); Task AddTrackersToTorrent(string hash, IEnumerable urls); Task EditTracker(string hash, string originalUrl, string newUrl); Task RemoveTrackers(string hash, IEnumerable urls); Task AddPeers(IEnumerable hashes, IEnumerable peers); Task IncreaseTorrentPriority(bool? all = null, params string[] hashes); Task DecreaseTorrentPriority(bool? all = null, params string[] hashes); Task MaxTorrentPriority(bool? all = null, params string[] hashes); Task MinTorrentPriority(bool? all = null, params string[] hashes); Task SetFilePriority(string hash, IEnumerable id, Priority priority); Task> GetTorrentDownloadLimit(bool? all = null, params string[] hashes); Task SetTorrentDownloadLimit(long limit, bool? all = null, params string[] hashes); Task SetTorrentShareLimit(float ratioLimit, float seedingTimeLimit, float inactiveSeedingTimeLimit, bool? all = null, params string[] hashes); Task> GetTorrentUploadLimit(bool? all = null, params string[] hashes); Task SetTorrentUploadLimit(long limit, bool? all = null, params string[] hashes); Task SetTorrentLocation(string location, bool? all = null, params string[] hashes); Task SetTorrentName(string name, string hash); Task SetTorrentCategory(string category, bool? all = null, params string[] hashes); Task> GetAllCategories(); Task AddCategory(string category, string savePath); Task EditCategory(string category, string savePath); Task RemoveCategories(params string[] categories); Task AddTorrentTags(IEnumerable tags, bool? all = null, params string[] hashes); Task RemoveTorrentTags(IEnumerable tags, bool? all = null, params string[] hashes); Task> GetAllTags(); Task CreateTags(IEnumerable tags); Task DeleteTags(params string[] tags); Task SetAutomaticTorrentManagement(bool enable, bool? all = null, params string[] hashes); Task ToggleSequentialDownload(bool? all = null, params string[] hashes); Task SetFirstLastPiecePriority(bool? all = null, params string[] hashes); Task SetForceStart(bool value, bool? all = null, params string[] hashes); Task SetSuperSeeding(bool value, bool? all = null, params string[] hashes); Task RenameFile(string hash, string oldPath, string newPath); Task RenameFolder(string hash, string oldPath, string newPath); Task GetExportUrl(string hash); #endregion Torrent management #region RSS Task AddRssFolder(string path); Task AddRssFeed(string url, string? path = null); Task RemoveRssItem(string path); Task MoveRssItem(string itemPath, string destPath); Task> GetAllRssItems(bool? withData = null); Task MarkRssItemAsRead(string itemPath, string? articleId = null); Task RefreshRssItem(string itemPath); Task SetRssAutoDownloadingRule(string ruleName, AutoDownloadingRule ruleDef); Task RenameRssAutoDownloadingRule(string ruleName, string newRuleName); Task RemoveRssAutoDownloadingRule(string ruleName); Task> GetAllRssAutoDownloadingRules(); Task>> GetRssMatchingArticles(string ruleName); #endregion RSS #region Search Task StartSearch(string pattern, IEnumerable plugins, string category = "all"); Task StopSearch(int id); Task GetSearchStatus(int id); Task> GetSearchesStatus(); Task GetSearchResults(int id, int? limit = null, int? offset = null); Task DeleteSearch(int id); Task> GetSearchPlugins(); Task InstallSearchPlugins(params string[] sources); Task UninstallSearchPlugins(params string[] names); Task EnableSearchPlugins(params string[] names); Task DisableSearchPlugins(params string[] names); Task UpdateSearchPlugins(); #endregion Search } }