added cancellation tokens to more apiclient methods
This commit is contained in:
parent
7bd586d133
commit
89a31e23ec
|
@ -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<UserDto[]> GetPublicUsersAsync(this IApiClient apiClient)
|
||||
{
|
||||
return apiClient.GetPublicUsersAsync(CancellationToken.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace MediaBrowser.Model.ApiClient
|
|||
/// <param name="startIndex">The start index.</param>
|
||||
/// <param name="limit">The limit.</param>
|
||||
/// <returns>Task{ItemReviewsResult}.</returns>
|
||||
Task<ItemReviewsResult> GetCriticReviews(string itemId, int? startIndex = null, int? limit = null);
|
||||
Task<ItemReviewsResult> GetCriticReviews(string itemId, CancellationToken cancellationToken, int? startIndex = null, int? limit = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the theme songs async.
|
||||
|
@ -155,7 +155,7 @@ namespace MediaBrowser.Model.ApiClient
|
|||
/// Gets the public users async.
|
||||
/// </summary>
|
||||
/// <returns>Task{UserDto[]}.</returns>
|
||||
Task<UserDto[]> GetPublicUsersAsync();
|
||||
Task<UserDto[]> GetPublicUsersAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets active client sessions.
|
||||
|
@ -563,7 +563,7 @@ namespace MediaBrowser.Model.ApiClient
|
|||
/// <param name="userId">The user id.</param>
|
||||
/// <param name="client">The client.</param>
|
||||
/// <returns>Task{BaseItemDto}.</returns>
|
||||
Task<DisplayPreferences> GetDisplayPreferencesAsync(string id, string userId, string client);
|
||||
Task<DisplayPreferences> GetDisplayPreferencesAsync(string id, string userId, string client, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Updates display preferences for a user
|
||||
|
|
Loading…
Reference in New Issue
Block a user