Files
YandexMusic/YandexMusic.API/Requests/Artist/YGetArtistTrackBuilder.cs
FrigaT 36e28ce3fe
All checks were successful
Release / pack-and-publish (release) Successful in 36s
Полностью переписанное api
2026-04-19 17:00:05 +03:00

16 lines
824 B
C#

using System.Collections.Specialized;
using System.Net;
using YandexMusic.API.Models.Artist;
namespace YandexMusic.API.Requests.Artist;
public 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() } };
}