From 300cf1ba18dea75b6e9d479341c57029b5d3c9a4 Mon Sep 17 00:00:00 2001 From: ScottIsAFool Scott Lovegrove ScottIsAFool Date: Fri, 7 Sep 2012 08:07:29 +0100 Subject: [PATCH] Added GetRecentlyAddedItemsAsync method in ApiClient. --- MediaBrowser.ApiInteraction/ApiClient.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/MediaBrowser.ApiInteraction/ApiClient.cs b/MediaBrowser.ApiInteraction/ApiClient.cs index 4e519ce4fb..55c30765d1 100644 --- a/MediaBrowser.ApiInteraction/ApiClient.cs +++ b/MediaBrowser.ApiInteraction/ApiClient.cs @@ -104,6 +104,20 @@ namespace MediaBrowser.ApiInteraction } } + /// + /// Gets the recently added items + /// + /// The user id. + /// + public async Task GetRecentlyAddedItemsAsync(Guid userId) + { + string url = ApiUrl + "/itemlist?listtype=recentlyaddeditems&userId=" + userId.ToString(); + using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(true)) + { + return DeserializeFromStream(stream); + } + } + /// /// Gets all Years ///