Обнновлено до .net10

This commit is contained in:
FrigaT
2026-04-10 15:05:32 +03:00
parent 11d0b0d72f
commit 8444fc5f8e
386 changed files with 6361 additions and 7164 deletions

View File

@@ -5,28 +5,27 @@ using YandexMusic.API.Models.Common;
using YandexMusic.API.Requests.Common;
using YandexMusic.API.Requests.Common.Attributes;
namespace YandexMusic.API.Requests.Ugc
namespace YandexMusic.API.Requests.Ugc;
[YRequest(WebRequestMethods.Http.Post, "{postTargetLink}")]
public class YUgcUploadBuilder : YRequestBuilder<YResponse<string>, (string postTargetLink, byte[] fileBytes)>
{
[YRequest(WebRequestMethods.Http.Post, "{postTargetLink}")]
public class YUgcUploadBuilder : YRequestBuilder<YResponse<string>, (string postTargetLink, byte[] fileBytes)>
public YUgcUploadBuilder(YandexMusicApi yandex, AuthStorage auth) : base(yandex, auth)
{
public YUgcUploadBuilder(YandexMusicApi yandex, AuthStorage auth) : base(yandex, auth)
{
}
protected override Dictionary<string, string> GetSubstitutions((string postTargetLink, byte[] fileBytes) tuple)
{
return new Dictionary<string, string> {
{ "postTargetLink", tuple.postTargetLink }
};
}
protected override HttpContent GetContent((string postTargetLink, byte[] fileBytes) tuple)
{
return new MultipartFormDataContent {
{ new ByteArrayContent(tuple.fileBytes), "file" }
};
}
}
protected override Dictionary<string, string> GetSubstitutions((string postTargetLink, byte[] fileBytes) tuple)
{
return new Dictionary<string, string> {
{ "postTargetLink", tuple.postTargetLink }
};
}
protected override HttpContent GetContent((string postTargetLink, byte[] fileBytes) tuple)
{
return new MultipartFormDataContent {
{ new ByteArrayContent(tuple.fileBytes), "file" }
};
}
}