Interface IQBittorrentClient2
Provides access to qBittorrent remote API.
Inherited Members
Namespace: QBittorrent.Client
Assembly: QBittorrent.Client.dll
Syntax
public interface IQBittorrentClient2 : IQBittorrentClient
Methods
| Improve this Doc View SourceAddCategoryAsync(String, String, CancellationToken)
Adds the category.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task AddCategoryAsync(string category, string savePath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category name. |
System.String | savePath | The save path for the torrents belonging to this category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddRssFeedAsync(Uri, String, CancellationToken)
Adds the RSS feed.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task AddRssFeedAsync(Uri url, string path = "", CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Uri | url | The URL of the RSS feed. |
System.String | path | The full path of added folder. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddRssFolderAsync(String, CancellationToken)
Adds the RSS folder.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task AddRssFolderAsync(string path, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Full path of added folder. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentPeersAsync(IEnumerable<String>, IEnumerable<IPEndPoint>, CancellationToken)
Adds peers to the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task<IReadOnlyDictionary<string, PeerAddResult>> AddTorrentPeersAsync(IEnumerable<string> hashes, IEnumerable<IPEndPoint> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.Net.IPEndPoint> | peers | The list of peers to ban. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, PeerAddResult>> |
AddTorrentPeersAsync(IEnumerable<String>, IEnumerable<String>, CancellationToken)
Adds peers to the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task<IReadOnlyDictionary<string, PeerAddResult>> AddTorrentPeersAsync(IEnumerable<string> hashes, IEnumerable<string> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.String> | peers | The list of peers to ban. The peers must be in form |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, PeerAddResult>> |
AddTorrentsAsync(AddTorrentsRequest, CancellationToken)
Adds the torrents to download.
Declaration
[ApiLevel(ApiLevel.V2)]
Task AddTorrentsAsync(AddTorrentsRequest request, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
AddTorrentsRequest | request | The request. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentTagsAsync(IEnumerable<String>, IEnumerable<String>, CancellationToken)
Adds the tags to the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task AddTorrentTagsAsync(IEnumerable<string> hashes, IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
AddTorrentTagsAsync(IEnumerable<String>, CancellationToken)
Adds the tags to all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task AddTorrentTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
BanPeersAsync(IEnumerable<IPEndPoint>, CancellationToken)
Bans peers.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task BanPeersAsync(IEnumerable<IPEndPoint> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Net.IPEndPoint> | peers | The list of peers to ban. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
BanPeersAsync(IEnumerable<String>, CancellationToken)
Bans peers.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task BanPeersAsync(IEnumerable<string> peers, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | peers | The list of peers to ban. The peers must be in form |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ChangeTorrentPriorityAsync(TorrentPriorityChange, CancellationToken)
Changes the torrent priority for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task ChangeTorrentPriorityAsync(TorrentPriorityChange change, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TorrentPriorityChange | change | The priority change. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearTorrentTagsAsync(IEnumerable<String>, CancellationToken)
Removes all tags from the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task ClearTorrentTagsAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ClearTorrentTagsAsync(CancellationToken)
Removes all tags from all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task ClearTorrentTagsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
CreateTagsAsync(IEnumerable<String>, CancellationToken)
Creates the tags.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task CreateTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The list of the tags to create. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteAsync(Boolean, CancellationToken)
Deletes all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task DeleteAsync(bool deleteDownloadedData = false, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | deleteDownloadedData | true to delete the downloaded data. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteRssAutoDownloadingRuleAsync(String, CancellationToken)
Deletes the RSS auto-downloading rule.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task DeleteRssAutoDownloadingRuleAsync(string name, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The rule name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteRssItemAsync(String, CancellationToken)
Removes the RSS folder or feed.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task DeleteRssItemAsync(string path, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The full path of removed folder or feed. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteSearchAsync(Int32, CancellationToken)
Deletes the search job with the specified id
.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task DeleteSearchAsync(int id, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteTagsAsync(IEnumerable<String>, CancellationToken)
Deletes the tags.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task DeleteTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The list of the tags to delete. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteTorrentTagsAsync(IEnumerable<String>, IEnumerable<String>, CancellationToken)
Removes the specified tags from the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task DeleteTorrentTagsAsync(IEnumerable<string> hashes, IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
If the list of tags is empty, this method is no op.
DeleteTorrentTagsAsync(IEnumerable<String>, CancellationToken)
Removes the specified tags from all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task DeleteTorrentTagsAsync(IEnumerable<string> tags, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | tags | The tags. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
If the list of tags is empty, this method is no op.
DeleteTrackersAsync(String, IEnumerable<Uri>, CancellationToken)
Removes the trackers from the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
Task DeleteTrackersAsync(string hash, IEnumerable<Uri> trackerUrls, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.Collections.Generic.IEnumerable<System.Uri> | trackerUrls | The tracker URLs you want to remove. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DisableSearchPluginsAsync(IEnumerable<String>, CancellationToken)
Disables the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task DisableSearchPluginsAsync(IEnumerable<string> names, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | names | Names of the plugins to disable. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
EditCategoryAsync(String, String, CancellationToken)
Changes the category save path.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task EditCategoryAsync(string category, string savePath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category name. |
System.String | savePath | The save path for the torrents belonging to this category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
EditTrackerAsync(String, Uri, Uri, CancellationToken)
Changes tracker URL.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
Task EditTrackerAsync(string hash, Uri trackerUrl, Uri newTrackerUrl, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.Uri | trackerUrl | The tracker URL you want to edit. |
System.Uri | newTrackerUrl | The new URL to replace the |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
EnableSearchPluginsAsync(IEnumerable<String>, CancellationToken)
Enables the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task EnableSearchPluginsAsync(IEnumerable<string> names, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | names | Names of the plugins to enable. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
GetBuildInfoAsync(CancellationToken)
Gets the build information.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task<BuildInfo> GetBuildInfoAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<BuildInfo> |
GetCategoriesAsync(CancellationToken)
Gets all categories.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task<IReadOnlyDictionary<string, Category>> GetCategoriesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, Category>> |
GetMatchingRssArticlesAsync(String, CancellationToken)
Returns all articles that match a rule by feed name.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.5.1")]
Task<IReadOnlyDictionary<string, IReadOnlyList<string>>> GetMatchingRssArticlesAsync(string ruleName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | ruleName | Rule name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IReadOnlyList<System.String>>> |
GetNetworkInterfaceAddressesAsync(String, CancellationToken)
Gets the list of network interface IP addresses.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task<IReadOnlyList<string>> GetNetworkInterfaceAddressesAsync(string networkInterfaceId, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | networkInterfaceId | The network interface id to retrieve the IP addresses for. If null or empty, the result will include IP addresses for all interfaces. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>> |
GetNetworkInterfacesAsync(CancellationToken)
Gets the list of network interfaces on the qBittorrent machine.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task<IReadOnlyList<NetInterface>> GetNetworkInterfacesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<NetInterface>> |
GetPeerLogAsync(Int32, CancellationToken)
Gets the peer log.
Declaration
[ApiLevel(ApiLevel.V2)]
Task<IEnumerable<PeerLogEntry>> GetPeerLogAsync(int afterId = -1, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | afterId | |
System.Threading.CancellationToken | token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PeerLogEntry>> |
GetRssAutoDownloadingRulesAsync(CancellationToken)
Gets the RSS auto-downloading rules.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task<IReadOnlyDictionary<string, RssAutoDownloadingRule>> GetRssAutoDownloadingRulesAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.String, RssAutoDownloadingRule>> |
GetRssItemsAsync(Boolean, CancellationToken)
Gets all RSS folders and feeds.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task<RssFolder> GetRssItemsAsync(bool withData = false, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | withData | true if you need current feed articles. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<RssFolder> |
GetSearchCategoriesAsync(String, CancellationToken)
Gets the search categories.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
[Deprecated("2.6")]
Task<IReadOnlyList<string>> GetSearchCategoriesAsync(string plugin, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | plugin | Name of the plugin (e.g. "legittorrents"). Also supports All and Enabled. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>> | The list of the search categories. |
GetSearchPluginsAsync(CancellationToken)
Gets the installed search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task<IReadOnlyList<SearchPlugin>> GetSearchPluginsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<SearchPlugin>> | The list of the search plugins. |
GetSearchResultsAsync(Int32, Int32, Int32, CancellationToken)
Gets the results of the search job with the specified id
.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task<SearchResults> GetSearchResultsAsync(int id, int offset = 0, int limit = 0, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Int32 | offset | Result to start at. A negative number means count backwards (e.g. -2 returns the 2 most recent results). |
System.Int32 | limit | The maximal number of results to return. 0 or negative means no limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SearchResults> |
GetSearchStatusAsync(Int32, CancellationToken)
Gets the status of the search jobs with the specified id
.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task<SearchStatus> GetSearchStatusAsync(int id, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SearchStatus> | The object containing the status and the number of found torrents. |
GetSearchStatusAsync(CancellationToken)
Gets the status of all search jobs.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task<IReadOnlyList<SearchStatus>> GetSearchStatusAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<SearchStatus>> | The list containing statuses and the number of found torrents for each search job. |
GetTagsAsync(CancellationToken)
Gets the list of the tags.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.3.0")]
Task<IReadOnlyList<string>> GetTagsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<System.String>> |
GetTorrentContentsAsync(String, IEnumerable<String>, CancellationToken)
Gets the torrent contents.
Declaration
Task<IReadOnlyList<TorrentContent>> GetTorrentContentsAsync(string hash, IEnumerable<string> indexes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Collections.Generic.IEnumerable<System.String> | indexes | The indexes of the files you want to retrieve. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<TorrentContent>> |
InstallSearchPluginsAsync(IEnumerable<Uri>, CancellationToken)
Installs the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task InstallSearchPluginsAsync(IEnumerable<Uri> sources, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Uri> | sources | URLs of the plugins to install. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
Plugins can be installed from the local file system using file:///
URIs as sources
.
MarkRssItemAsReadAsync(String, String, CancellationToken)
Marks the RSS article as read, if articleId
is not null.
Otherwise marks the whole RSS feed as read.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.5.1")]
Task MarkRssItemAsReadAsync(string itemPath, string articleId = null, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | itemPath | Full path of the item. |
System.String | articleId | ID of the article. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
MoveRssItemAsync(String, String, CancellationToken)
Moves or renames the RSS folder or feed.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task MoveRssItemAsync(string path, string newPath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The current full path of the folder or feed. |
System.String | newPath | The new path. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
PauseAsync(IEnumerable<String>, CancellationToken)
Pauses the torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task PauseAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
PauseAsync(CancellationToken)
Pauses all torrents.
Declaration
[ApiLevel(ApiLevel.V1)]
Task PauseAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method supersedes PauseAllAsync(CancellationToken).
ReannounceAsync(IEnumerable<String>, CancellationToken)
Reannounces the torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.2")]
Task ReannounceAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ReannounceAsync(CancellationToken)
Reannounces all torrents.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.2")]
Task ReannounceAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RecheckAsync(IEnumerable<String>, CancellationToken)
Rechecks the torrents.
Declaration
Task RecheckAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RecheckAsync(CancellationToken)
Rechecks all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task RecheckAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RenameFileAsync(String, Int32, String, CancellationToken)
Renames the file in the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.4.0")]
[Deprecated("2.8.0")]
Task RenameFileAsync(string hash, int fileId, string newName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.Int32 | fileId | The ID of the file to rename. |
System.String | newName | The new name to use for the file. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This overload is not supported starting from API v2.8.0. Use RenameFileAsync(String, String, String, CancellationToken) instead.
RenameFileAsync(String, String, String, CancellationToken)
Renames the folder of the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.8.0")]
Task RenameFileAsync(string hash, string oldPath, string newPath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.String | oldPath | The old path of the file. |
System.String | newPath | The new path to use for the file. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This overload is not supported starting until API v2.8.0. Use RenameFileAsync(String, Int32, String, CancellationToken) for earlier API versions instead.
RenameFolderAsync(String, String, String, CancellationToken)
Renames the folder of the torrent.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.8.0")]
Task RenameFolderAsync(string hash, string oldPath, string newPath, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The hash of the torrent. |
System.String | oldPath | The old path of the folder. |
System.String | newPath | The new path to use for the folder. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
RenameRssAutoDownloadingRuleAsync(String, String, CancellationToken)
Renames the RSS auto-downloading rule.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task RenameRssAutoDownloadingRuleAsync(string name, string newName, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The rule name. |
System.String | newName | The new rule name. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ResumeAsync(IEnumerable<String>, CancellationToken)
Resumes the torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task ResumeAsync(IEnumerable<string> hashes, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ResumeAsync(CancellationToken)
Resumes all torrents.
Declaration
[ApiLevel(ApiLevel.V1)]
Task ResumeAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Remarks
This method supersedes ResumeAllAsync(CancellationToken).
SetAutomaticTorrentManagementAsync(Boolean, CancellationToken)
Sets the automatic torrent management for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetAutomaticTorrentManagementAsync(bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetFilePriorityAsync(String, IEnumerable<Int32>, TorrentContentPriority, CancellationToken)
Sets the file priority for multiple files.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.2.0")]
Task SetFilePriorityAsync(string hash, IEnumerable<int> fileIds, TorrentContentPriority priority, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | hash | The torrent hash. |
System.Collections.Generic.IEnumerable<System.Int32> | fileIds | The file identifiers. |
TorrentContentPriority | priority | The priority. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetForceStartAsync(Boolean, CancellationToken)
Sets the force start for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetForceStartAsync(bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetLocationAsync(String, CancellationToken)
Sets the location of all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetLocationAsync(string newLocation, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | newLocation | The new location. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetRssAutoDownloadingRuleAsync(String, RssAutoDownloadingRule, CancellationToken)
Sets the RSS auto-downloading rule.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.0")]
Task SetRssAutoDownloadingRuleAsync(string name, RssAutoDownloadingRule rule, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The rule name. |
RssAutoDownloadingRule | rule | The rule definition. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetShareLimitsAsync(IEnumerable<String>, Double, TimeSpan, CancellationToken)
Sets the torrent share limits.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.0.1", MaxVersion = "2.9.1")]
Task SetShareLimitsAsync(IEnumerable<string> hashes, double ratio, TimeSpan seedingTime, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Double | ratio | The ratio limit. Use Global in order to use global limit. Use Unlimited in order to set no limit. |
System.TimeSpan | seedingTime | The seeding time limit. Use Global in order to use global limit. Use Unlimited in order to set no limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
See Also
| Improve this Doc View SourceSetShareLimitsAsync(IEnumerable<String>, Double, TimeSpan, TimeSpan, CancellationToken)
Sets the torrent share limits.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.9.2")]
Task SetShareLimitsAsync(IEnumerable<string> hashes, double ratio, TimeSpan seedingTime, TimeSpan inactiveSeedingTime, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | hashes | The torrent hashes. |
System.Double | ratio | The ratio limit. Use Global in order to use global limit. Use Unlimited in order to set no limit. |
System.TimeSpan | seedingTime | The seeding time limit. Use Global in order to use global limit. Use Unlimited in order to set no limit. |
System.TimeSpan | inactiveSeedingTime | The inactive seeding time limit. Use Global in order to use global limit. Use Unlimited in order to set no limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
See Also
| Improve this Doc View SourceSetSuperSeedingAsync(Boolean, CancellationToken)
Sets the super seeding for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetSuperSeedingAsync(bool enabled, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | enabled | |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentCategoryAsync(String, CancellationToken)
Sets the torrent category for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetTorrentCategoryAsync(string category, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | category | The category. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentDownloadLimitAsync(Int64, CancellationToken)
Sets the torrent download speed limit for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetTorrentDownloadLimitAsync(long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetTorrentUploadLimitAsync(Int64, CancellationToken)
Sets the torrent upload speed limit for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task SetTorrentUploadLimitAsync(long limit, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | limit | The limit. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
StartSearchAsync(String, IEnumerable<String>, String, CancellationToken)
Starts torrent search job.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task<int> StartSearchAsync(string pattern, IEnumerable<string> plugins, string category = "all", CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.String | pattern | Pattern to search for (e.g. "Ubuntu 18.04"). |
System.Collections.Generic.IEnumerable<System.String> | plugins | Plugins to use for searching (e.g. "legittorrents"). |
System.String | category | Categories to limit your search to (e.g. "legittorrents").
Available categories depend on the specified |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | The ID of the search job. |
StopSearchAsync(Int32, CancellationToken)
Stops torrent search job.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task StopSearchAsync(int id, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The ID of the search job. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleFirstLastPiecePrioritizedAsync(CancellationToken)
Toggles the first and last piece priority for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task ToggleFirstLastPiecePrioritizedAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToggleSequentialDownloadAsync(CancellationToken)
Toggles the sequential download for all torrents.
Declaration
[ApiLevel(ApiLevel.V2)]
Task ToggleSequentialDownloadAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
UninstallSearchPluginsAsync(IEnumerable<String>, CancellationToken)
Uninstalls the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task UninstallSearchPluginsAsync(IEnumerable<string> names, CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | names | Names of the plugins to uninstall. |
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
UpdateSearchPluginsAsync(CancellationToken)
Updates the search plugins.
Declaration
[ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")]
Task UpdateSearchPluginsAsync(CancellationToken token = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |