From 803e8b4a2eb5fcf1b5a3679fe551d541620d4743 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 11 Sep 2013 13:54:59 -0400 Subject: improved performance of item counts --- MediaBrowser.Model/ApiClient/IApiClient.cs | 50 ++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 13 deletions(-) (limited to 'MediaBrowser.Model/ApiClient') diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 5a0159370f..13113c2b22 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -19,8 +19,14 @@ using System.Threading.Tasks; namespace MediaBrowser.Model.ApiClient { + /// + /// Interface IApiClient + /// public interface IApiClient : IDisposable { + /// + /// Occurs when [server location changed]. + /// event EventHandler ServerLocationChanged; /// @@ -28,12 +34,23 @@ namespace MediaBrowser.Model.ApiClient /// event EventHandler HttpResponseReceived; - Task GetAsync(string url, CancellationToken cancellationToken); + string GetApiUrl(string handler); + + /// + /// Gets the async. + /// + /// + /// The URL. + /// The cancellation token. + /// Task{``0}. + Task GetAsync(string url, CancellationToken cancellationToken) + where T : class; /// /// Gets the critic reviews. /// /// The item id. + /// The cancellation token. /// The start index. /// The limit. /// Task{ItemReviewsResult}. @@ -45,6 +62,7 @@ namespace MediaBrowser.Model.ApiClient /// The user id. /// The item id. /// if set to true [inherit from parents]. + /// The cancellation token. /// Task{ThemeMediaResult}. Task GetThemeSongsAsync(string userId, string itemId, bool inheritFromParents, CancellationToken cancellationToken); @@ -65,6 +83,7 @@ namespace MediaBrowser.Model.ApiClient /// The user id. /// The item id. /// if set to true [inherit from parents]. + /// The cancellation token. /// Task{ThemeMediaResult}. Task GetThemeVideosAsync(string userId, string itemId, bool inheritFromParents, CancellationToken cancellationToken); @@ -74,6 +93,7 @@ namespace MediaBrowser.Model.ApiClient /// The user id. /// The item id. /// if set to true [inherit from parents]. + /// The cancellation token. /// Task{AllThemeMediaResult}. Task GetAllThemeMediaAsync(string userId, string itemId, bool inheritFromParents, CancellationToken cancellationToken); @@ -152,12 +172,14 @@ namespace MediaBrowser.Model.ApiClient /// /// Gets the users async. /// + /// The query. /// Task{UserDto[]}. Task GetUsersAsync(UserQuery query); /// /// Gets the public users async. /// + /// The cancellation token. /// Task{UserDto[]}. Task GetPublicUsersAsync(CancellationToken cancellationToken); @@ -469,6 +491,7 @@ namespace MediaBrowser.Model.ApiClient /// The user id. /// The position ticks. /// if set to true [is paused]. + /// if set to true [is muted]. /// Task{UserItemDataDto}. /// itemId Task ReportPlaybackProgressAsync(string itemId, string userId, long? positionTicks, bool isPaused, bool isMuted); @@ -508,29 +531,27 @@ namespace MediaBrowser.Model.ApiClient /// The session id. /// The request. /// Task. - /// - /// sessionId + /// sessionId /// or - /// request - /// + /// request Task SendPlayCommandAsync(string sessionId, PlayRequest request); /// /// Sends a system command to the client /// - /// - /// - /// + /// The session id. + /// The command. + /// Task. Task SendSystemCommandAsync(string sessionId, SystemCommand command); /// /// Instructs the client to display a message to the user /// - /// - /// - /// + /// The session id. + /// The command. + /// Task. Task SendMessageCommandAsync(string sessionId, MessageCommand command); - + /// /// Clears a user's rating for an item /// @@ -582,14 +603,17 @@ namespace MediaBrowser.Model.ApiClient /// The id. /// The user id. /// The client. + /// The cancellation token. /// Task{BaseItemDto}. Task GetDisplayPreferencesAsync(string id, string userId, string client, CancellationToken cancellationToken); /// /// Updates display preferences for a user /// - /// The id. /// The display preferences. + /// The user id. + /// The client. + /// The cancellation token. /// Task{DisplayPreferences}. /// userId Task UpdateDisplayPreferencesAsync(DisplayPreferences displayPreferences, string userId, string client, CancellationToken cancellationToken); -- cgit v1.2.3