diff --git a/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs b/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs index 20b707edd9..0c4dbfd658 100644 --- a/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs +++ b/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs @@ -1,6 +1,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Model.Dto; namespace MediaBrowser.Model.ApiClient { @@ -19,5 +20,10 @@ namespace MediaBrowser.Model.ApiClient { return apiClient.GetImageStreamAsync(url, CancellationToken.None); } + + public static Task GetPublicUsersAsync(this IApiClient apiClient) + { + return apiClient.GetPublicUsersAsync(CancellationToken.None); + } } } diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 02589d7ead..84dfdfd8e5 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -33,7 +33,7 @@ namespace MediaBrowser.Model.ApiClient /// The start index. /// The limit. /// Task{ItemReviewsResult}. - Task GetCriticReviews(string itemId, int? startIndex = null, int? limit = null); + Task GetCriticReviews(string itemId, CancellationToken cancellationToken, int? startIndex = null, int? limit = null); /// /// Gets the theme songs async. @@ -155,7 +155,7 @@ namespace MediaBrowser.Model.ApiClient /// Gets the public users async. /// /// Task{UserDto[]}. - Task GetPublicUsersAsync(); + Task GetPublicUsersAsync(CancellationToken cancellationToken); /// /// Gets active client sessions. @@ -205,7 +205,7 @@ namespace MediaBrowser.Model.ApiClient /// The query. /// Task{ItemsResult}. Task GetInstantMixFromMusicGenreAsync(SimilarItemsByNameQuery query); - + /// /// Gets the similar movies async. /// @@ -309,7 +309,7 @@ namespace MediaBrowser.Model.ApiClient /// The query. /// Task{ItemsResult}. Task GetStudiosAsync(ItemsByNameQuery query); - + /// /// Gets the music genre async. /// @@ -325,7 +325,7 @@ namespace MediaBrowser.Model.ApiClient /// The user id. /// Task{BaseItemDto}. Task GetGameGenreAsync(string name, string userId); - + /// /// Gets the artist async. /// @@ -563,7 +563,7 @@ namespace MediaBrowser.Model.ApiClient /// The user id. /// The client. /// Task{BaseItemDto}. - Task GetDisplayPreferencesAsync(string id, string userId, string client); + Task GetDisplayPreferencesAsync(string id, string userId, string client, CancellationToken cancellationToken); /// /// Updates display preferences for a user @@ -728,7 +728,7 @@ namespace MediaBrowser.Model.ApiClient /// The options. /// System.String. string GetGameGenreImageUrl(string name, ImageOptions options); - + /// /// Gets an image url that can be used to download an image from the api ///