mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-24 14:40:39 +02:00
Added GetRecentlyAddedItemsAsync method in ApiClient.
This commit is contained in:
parent
1523117e9b
commit
300cf1ba18
|
@ -104,6 +104,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>
|
/// <summary>
|
||||||
/// Gets all Years
|
/// Gets all Years
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue