Files
YandexMusic/YandexMusic.API/Requests/Artist/YGetArtistTrackBuilder.cs
FrigaT add7f08215
All checks were successful
Release / pack-and-publish (release) Successful in 32s
Добавлен вывод AuthStorage. Спрятаны внутренние api запросы
2026-04-19 17:41:30 +03:00

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() } };
}