16 lines
826 B
C#
16 lines
826 B
C#
using System.Collections.Specialized;
|
|
using System.Net;
|
|
using YandexMusic.API.Models.Artist;
|
|
|
|
namespace YandexMusic.API.Requests.Artist;
|
|
|
|
internal class YGetArtistTrackBuilder : YMusicRequestBuilder<YTracksPage?, (string id, int page, int pageSize)>
|
|
{
|
|
public YGetArtistTrackBuilder(YandexMusicApi api) : base(api) { }
|
|
protected override string Method => WebRequestMethods.Http.Get;
|
|
protected override string PathTemplate => "artists/{artistId}/tracks";
|
|
protected override Dictionary<string, string> GetSubstitutions((string id, int page, int pageSize) tuple)
|
|
=> new() { { "artistId", tuple.id } };
|
|
protected override NameValueCollection GetQueryParams((string id, int page, int pageSize) tuple)
|
|
=> new() { { "page", tuple.page.ToString() }, { "pageSize", tuple.pageSize.ToString() } };
|
|
} |