aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScottIsAFool Scott Lovegrove ScottIsAFool <ScottIsAFool Scott Lovegrove ScottIsAFool@gmail.com>2012-09-07 08:07:29 +0100
committerScottIsAFool Scott Lovegrove ScottIsAFool <ScottIsAFool Scott Lovegrove ScottIsAFool@gmail.com>2012-09-07 08:07:29 +0100
commit300cf1ba18dea75b6e9d479341c57029b5d3c9a4 (patch)
tree3da7f532c52ff3a04dc3923052daa809b7541e47
parent1523117e9b6a55fe5443c2a71121852e75569ae8 (diff)
Added GetRecentlyAddedItemsAsync method in ApiClient.
-rw-r--r--MediaBrowser.ApiInteraction/ApiClient.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.ApiInteraction/ApiClient.cs b/MediaBrowser.ApiInteraction/ApiClient.cs
index 4e519ce4f..55c30765d 100644
--- a/MediaBrowser.ApiInteraction/ApiClient.cs
+++ b/MediaBrowser.ApiInteraction/ApiClient.cs
@@ -105,6 +105,20 @@ namespace MediaBrowser.ApiInteraction
}
/// <summary>
+ /// Gets the recently added items
+ /// </summary>
+ /// <param name="userId">The user id.</param>
+ /// <returns></returns>
+ public async Task<DTOBaseItem[]> GetRecentlyAddedItemsAsync(Guid userId)
+ {
+ string url = ApiUrl + "/itemlist?listtype=recentlyaddeditems&userId=" + userId.ToString();
+ using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(true))
+ {
+ return DeserializeFromStream<DTOBaseItem[]>(stream);
+ }
+ }
+
+ /// <summary>
/// Gets all Years
/// </summary>
public async Task<IBNItem[]> GetAllYearsAsync(Guid userId)