mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-24 15:06:26 +00:00
a27c3729c8
* add top tracks & artists endpoints * fix file extenstion * added TODO * Add Methods to interface * Add Top items query class * implement query into UserProfileClient.cs - Top Requests * Tidy Up Naming * Removed random json file change * Added Tests. * run formatter * remove additional namespace --------- Co-authored-by: Jonas Dellinger <jonas@dellinger.dev>
48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System;
|
|
|
|
namespace SpotifyAPI.Web
|
|
{
|
|
public class UsersTopItemsRequest : RequestParams
|
|
{
|
|
public UsersTopItemsRequest(TimeRange timeRange)
|
|
{
|
|
Ensure.ArgumentNotNull(timeRange, nameof(TimeRange));
|
|
|
|
TimeRangeParam = timeRange;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The TimeRange Param : How far to look back for the top items.
|
|
/// </summary>
|
|
/// <value></value>
|
|
[QueryParam("time_range")]
|
|
public TimeRange TimeRangeParam { get; } = TimeRange.MediumTerm;
|
|
|
|
|
|
/// <summary>
|
|
/// The maximum number of objects to return. Default: 20. Minimum: 1. Maximum: 50.
|
|
/// </summary>
|
|
/// <value></value>
|
|
[QueryParam("limit")]
|
|
public int? Limit { get; set; }
|
|
|
|
/// <summary>
|
|
/// The index of the first object to return. Default: 0 (i.e., the first object).
|
|
/// Use with limit to get the next set of objects.
|
|
/// </summary>
|
|
/// <value></value>
|
|
[QueryParam("offset")]
|
|
public int? Offset { get; set; }
|
|
|
|
}
|
|
public enum TimeRange
|
|
{
|
|
[String("short_term")]
|
|
ShortTerm,
|
|
[String("medium_term")]
|
|
MediumTerm,
|
|
[String("long_term")]
|
|
LongTerm
|
|
}
|
|
}
|