diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-07 12:17:39 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-07 12:17:39 -0400 |
| commit | 8fc828361e6e6019bc833ffba1d5ef8fc8605ac9 (patch) | |
| tree | f06929b9d9ee013a3fb49b2f53abd7a9f7e4b7bc /MediaBrowser.ApiInteraction | |
| parent | 31c710ca34e91a21356a19a6c1f3f6f5f3a2011f (diff) | |
Updated authentication
Diffstat (limited to 'MediaBrowser.ApiInteraction')
| -rw-r--r-- | MediaBrowser.ApiInteraction/ApiClient.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/MediaBrowser.ApiInteraction/ApiClient.cs b/MediaBrowser.ApiInteraction/ApiClient.cs index 5de1750959..0315d9dd9a 100644 --- a/MediaBrowser.ApiInteraction/ApiClient.cs +++ b/MediaBrowser.ApiInteraction/ApiClient.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.DTO;
+using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Weather;
using System;
using System.IO;
@@ -82,13 +83,30 @@ namespace MediaBrowser.ApiInteraction public async Task<DTOBaseItem[]> GetRecentlyAddedItemsAsync(Guid userId)
{
string url = ApiUrl + "/itemlist?listtype=recentlyaddeditems&userId=" + userId.ToString();
- using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(true))
+
+ using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false))
{
return DeserializeFromStream<DTOBaseItem[]>(stream);
}
- }
+ }
/// <summary>
+ /// Gets recently added items within a specific folder
+ /// </summary>
+ /// <param name="userId">The user id.</param>
+ public async Task<DTOBaseItem[]> GetRecentlyAddedItemsAsync(Guid userId, Guid folderId)
+ {
+ string url = ApiUrl + "/itemlist?listtype=recentlyaddeditems&userId=" + userId.ToString();
+
+ url += "&id=" + folderId.ToString();
+
+ using (Stream stream = await GetSerializedStreamAsync(url).ConfigureAwait(false))
+ {
+ return DeserializeFromStream<DTOBaseItem[]>(stream);
+ }
+ }
+
+ /// <summary>
/// Gets all Years
/// </summary>
public async Task<IBNItem[]> GetAllYearsAsync(Guid userId)
|
