9864 lines
300 KiB
Go
9864 lines
300 KiB
Go
// Package yamusic provides primitives to interact with the openapi HTTP API.
|
||
//
|
||
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
|
||
package yamusic
|
||
|
||
import (
|
||
"bytes"
|
||
"context"
|
||
"encoding/json"
|
||
"fmt"
|
||
"io"
|
||
"net/http"
|
||
"net/url"
|
||
"strings"
|
||
|
||
"github.com/oapi-codegen/runtime"
|
||
)
|
||
|
||
const (
|
||
OAuthScopes = "oAuth.Scopes"
|
||
OAuthProxiedScopes = "oAuthProxied.Scopes"
|
||
)
|
||
|
||
// Defines values for AlbumMetaType.
|
||
const (
|
||
AlbumMetaTypeMusic AlbumMetaType = "music"
|
||
AlbumMetaTypePodcast AlbumMetaType = "podcast"
|
||
AlbumMetaTypeSingle AlbumMetaType = "single"
|
||
)
|
||
|
||
// Defines values for AlbumType.
|
||
const (
|
||
AlbumTypePodcast AlbumType = "podcast"
|
||
AlbumTypeSingle AlbumType = "single"
|
||
)
|
||
|
||
// Defines values for ChartProgress.
|
||
const (
|
||
Down ChartProgress = "down"
|
||
Same ChartProgress = "same"
|
||
Up ChartProgress = "up"
|
||
)
|
||
|
||
// Defines values for CoverType.
|
||
const (
|
||
Mosaic CoverType = "mosaic"
|
||
Pic CoverType = "pic"
|
||
)
|
||
|
||
// Defines values for FullChartResultType.
|
||
const (
|
||
FullChartResultTypeChart FullChartResultType = "chart"
|
||
)
|
||
|
||
// Defines values for GeneratedPlaylistVisibility.
|
||
const (
|
||
GeneratedPlaylistVisibilityPrivate GeneratedPlaylistVisibility = "private"
|
||
GeneratedPlaylistVisibilityPublic GeneratedPlaylistVisibility = "public"
|
||
)
|
||
|
||
// Defines values for GeneratedPlaylistLandingBlockType.
|
||
const (
|
||
PlaylistOfTheDay GeneratedPlaylistLandingBlockType = "playlistOfTheDay"
|
||
)
|
||
|
||
// Defines values for LandingBlockType.
|
||
const (
|
||
LandingBlockTypeAlbums LandingBlockType = "albums"
|
||
LandingBlockTypeArtists LandingBlockType = "artists"
|
||
LandingBlockTypeChart LandingBlockType = "chart"
|
||
LandingBlockTypeMixes LandingBlockType = "mixes"
|
||
LandingBlockTypeNewPlaylists LandingBlockType = "new-playlists"
|
||
LandingBlockTypeNewReleases LandingBlockType = "new-releases"
|
||
LandingBlockTypePersonalplaylists LandingBlockType = "personalplaylists"
|
||
LandingBlockTypePlayContexts LandingBlockType = "play_contexts"
|
||
LandingBlockTypePlaylists LandingBlockType = "playlists"
|
||
LandingBlockTypePodcasts LandingBlockType = "podcasts"
|
||
LandingBlockTypePromotions LandingBlockType = "promotions"
|
||
)
|
||
|
||
// Defines values for PlaylistVisibility.
|
||
const (
|
||
PlaylistVisibilityPrivate PlaylistVisibility = "private"
|
||
PlaylistVisibilityPublic PlaylistVisibility = "public"
|
||
)
|
||
|
||
// Defines values for SearchType.
|
||
const (
|
||
SearchTypeAlbum SearchType = "album"
|
||
SearchTypeAll SearchType = "all"
|
||
SearchTypeArtist SearchType = "artist"
|
||
SearchTypePodcast SearchType = "podcast"
|
||
SearchTypeTrack SearchType = "track"
|
||
)
|
||
|
||
// Defines values for TrackDownloadInfoCodec.
|
||
const (
|
||
Aac TrackDownloadInfoCodec = "aac"
|
||
Mp3 TrackDownloadInfoCodec = "mp3"
|
||
)
|
||
|
||
// Defines values for UserSettingsTheme.
|
||
const (
|
||
Black UserSettingsTheme = "black"
|
||
Default UserSettingsTheme = "default"
|
||
)
|
||
|
||
// Defines values for VisibilityEnum.
|
||
const (
|
||
Private VisibilityEnum = "private"
|
||
Public VisibilityEnum = "public"
|
||
)
|
||
|
||
// Defines values for SendStationFeedbackJSONBodyType.
|
||
const (
|
||
RadioStarted SendStationFeedbackJSONBodyType = "radioStarted"
|
||
Skip SendStationFeedbackJSONBodyType = "skip"
|
||
TrackFinished SendStationFeedbackJSONBodyType = "trackFinished"
|
||
TrackStarted SendStationFeedbackJSONBodyType = "trackStarted"
|
||
)
|
||
|
||
// Defines values for GetTokenFormdataBodyClientId.
|
||
const (
|
||
N23cabbbdc6cd418abb4b39c32c41195d GetTokenFormdataBodyClientId = "23cabbbdc6cd418abb4b39c32c41195d"
|
||
)
|
||
|
||
// Defines values for GetTokenFormdataBodyClientSecret.
|
||
const (
|
||
N53bc75238f0c4d08a118e51fe9203300 GetTokenFormdataBodyClientSecret = "53bc75238f0c4d08a118e51fe9203300"
|
||
)
|
||
|
||
// Defines values for GetTokenFormdataBodyGrantType.
|
||
const (
|
||
Password GetTokenFormdataBodyGrantType = "password"
|
||
)
|
||
|
||
// Account Основная информация об аккаунте
|
||
type Account struct {
|
||
// DisplayName Отображаемое имя
|
||
DisplayName string `json:"displayName"`
|
||
|
||
// FirstName Имя
|
||
FirstName *string `json:"firstName,omitempty"`
|
||
|
||
// FullName Полное имя (имя и фамилия)
|
||
FullName string `json:"fullName"`
|
||
|
||
// HostedUser Является ли пользователем чьим-то другим
|
||
HostedUser bool `json:"hostedUser"`
|
||
|
||
// Login Виртуальное имя (обычно e-mail)
|
||
Login string `json:"login"`
|
||
|
||
// Now Текущая дата и время
|
||
Now string `json:"now"`
|
||
|
||
// PassportPhones Мобильные номера
|
||
PassportPhones []struct {
|
||
Phone *string `json:"phone,omitempty"`
|
||
} `json:"passport-phones"`
|
||
|
||
// Region Регион
|
||
Region float32 `json:"region"`
|
||
|
||
// SecondName Фамилия
|
||
SecondName string `json:"secondName"`
|
||
|
||
// ServiceAvailable Доступен ли сервис
|
||
ServiceAvailable bool `json:"serviceAvailable"`
|
||
|
||
// Uid Уникальный идентификатор
|
||
Uid float32 `json:"uid"`
|
||
}
|
||
|
||
// AdParams defines model for AdParams.
|
||
type AdParams struct {
|
||
AdVolume *float32 `json:"adVolume,omitempty"`
|
||
CategoryId string `json:"categoryId"`
|
||
GenreId *float32 `json:"genreId,omitempty"`
|
||
GenreName *string `json:"genreName,omitempty"`
|
||
OtherParams string `json:"otherParams"`
|
||
PageRef string `json:"pageRef"`
|
||
PartnerId string `json:"partnerId"`
|
||
TargetRef string `json:"targetRef"`
|
||
}
|
||
|
||
// Album defines model for Album.
|
||
type Album struct {
|
||
// Artists Артисты
|
||
Artists []Artist `json:"artists"`
|
||
|
||
// Available Доступен ли альбом
|
||
Available bool `json:"available"`
|
||
|
||
// AvailableForMobile Доступен ли альбом из приложения для телефона
|
||
AvailableForMobile bool `json:"availableForMobile"`
|
||
|
||
// AvailableForPremiumUsers Доступен ли альбом для пользователей с подпиской
|
||
AvailableForPremiumUsers bool `json:"availableForPremiumUsers"`
|
||
|
||
// AvailablePartially Доступен ли альбом частично для пользователей без подписки
|
||
AvailablePartially bool `json:"availablePartially"`
|
||
|
||
// Bests ID лучших треков альбома
|
||
Bests []float32 `json:"bests"`
|
||
Buy []map[string]interface{} `json:"buy"`
|
||
|
||
// CoverUri Ссылка на обложку
|
||
CoverUri string `json:"coverUri"`
|
||
|
||
// Error Ошибка получения альбома
|
||
Error *string `json:"error"`
|
||
|
||
// Genre Жанр музыки
|
||
Genre string `json:"genre"`
|
||
|
||
// Id Идентификатор альбома
|
||
Id float32 `json:"id"`
|
||
|
||
// Labels Лейблы
|
||
Labels []struct {
|
||
Id *float32 `json:"id,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
} `json:"labels"`
|
||
|
||
// MetaType Мета тип
|
||
MetaType AlbumMetaType `json:"metaType"`
|
||
|
||
// OgImage Ссылка на превью Open Graph
|
||
OgImage string `json:"ogImage"`
|
||
|
||
// Prerolls Прероллы
|
||
Prerolls []map[string]interface{} `json:"prerolls"`
|
||
|
||
// Recent Является ли альбом новым
|
||
Recent bool `json:"recent"`
|
||
|
||
// ReleaseDate Дата релиза в формате ISO 8601
|
||
ReleaseDate string `json:"releaseDate"`
|
||
|
||
// Title Название альбома
|
||
Title string `json:"title"`
|
||
|
||
// TrackCount Количество треков.
|
||
TrackCount float32 `json:"trackCount"`
|
||
|
||
// Type Тип альбома
|
||
Type AlbumType `json:"type"`
|
||
|
||
// VeryImportant Популярен ли альбом у слушателей
|
||
VeryImportant bool `json:"veryImportant"`
|
||
|
||
// Volumes Треки альбома, разделенные по дискам.
|
||
Volumes *[][]Track `json:"volumes"`
|
||
|
||
// Year Год релиза
|
||
Year float32 `json:"year"`
|
||
}
|
||
|
||
// AlbumMetaType Мета тип
|
||
type AlbumMetaType string
|
||
|
||
// AlbumType Тип альбома
|
||
type AlbumType string
|
||
|
||
// Alert Блок с предупреждениями о конце подписки и подарках
|
||
type Alert struct {
|
||
// AlertId Уникальный идентификатор
|
||
AlertId *string `json:"alertId,omitempty"`
|
||
|
||
// AlertType Тип предупреждения
|
||
AlertType *string `json:"alertType,omitempty"`
|
||
|
||
// BgColor Цвет заднего фона (HTML)
|
||
BgColor *string `json:"bgColor,omitempty"`
|
||
|
||
// Button кнопка со ссылкой
|
||
Button *AlertButton `json:"button,omitempty"`
|
||
|
||
// CloseButton Наличие кнопки "Закрыть"
|
||
CloseButton *bool `json:"closeButton,omitempty"`
|
||
|
||
// Text Текст предупреждения
|
||
Text *string `json:"text,omitempty"`
|
||
|
||
// TextColor Цвет текста (HTML)
|
||
TextColor *string `json:"textColor,omitempty"`
|
||
}
|
||
|
||
// AlertButton кнопка со ссылкой
|
||
type AlertButton struct {
|
||
// BgColor Цвет заднего фона (HTML)
|
||
BgColor *string `json:"bgColor,omitempty"`
|
||
|
||
// Text Текст на кнопке
|
||
Text *string `json:"text,omitempty"`
|
||
|
||
// TextColor Цвет текста (HTML)
|
||
TextColor *string `json:"textColor,omitempty"`
|
||
|
||
// Uri Ссылка, куда ведет кнопка
|
||
Uri *string `json:"uri,omitempty"`
|
||
}
|
||
|
||
// Artist defines model for Artist.
|
||
type Artist struct {
|
||
Composer bool `json:"composer"`
|
||
Cover *Cover `json:"cover,omitempty"`
|
||
Decomposed *[]map[string]interface{} `json:"decomposed"`
|
||
Genres []map[string]interface{} `json:"genres"`
|
||
Id Artist_Id `json:"id"`
|
||
Name string `json:"name"`
|
||
PopularTracks *[]Track `json:"popularTracks"`
|
||
Regions *[]string `json:"regions"`
|
||
|
||
// TicketsAvailable Имеются ли в продаже билеты на концерт
|
||
TicketsAvailable *bool `json:"ticketsAvailable"`
|
||
Various bool `json:"various"`
|
||
}
|
||
|
||
// ArtistId0 defines model for .
|
||
type ArtistId0 = string
|
||
|
||
// ArtistId1 defines model for .
|
||
type ArtistId1 = float32
|
||
|
||
// Artist_Id defines model for Artist.Id.
|
||
type Artist_Id struct {
|
||
union json.RawMessage
|
||
}
|
||
|
||
// BadRequest defines model for BadRequest.
|
||
type BadRequest struct {
|
||
Error *Error `json:"error,omitempty"`
|
||
InvocationInfo *InvocationInfo `json:"invocationInfo,omitempty"`
|
||
}
|
||
|
||
// Best лучший результат поиска
|
||
type Best struct {
|
||
Result *Best_Result `json:"result,omitempty"`
|
||
Text *string `json:"text,omitempty"`
|
||
|
||
// Type Тип лучшего результата
|
||
Type *string `json:"type,omitempty"`
|
||
}
|
||
|
||
// Best_Result defines model for Best.Result.
|
||
type Best_Result struct {
|
||
union json.RawMessage
|
||
}
|
||
|
||
// BooksAndPodcastsResult Блоки главной страницы кнги и подкастов
|
||
type BooksAndPodcastsResult struct {
|
||
Blocks []struct {
|
||
Entities *[]struct {
|
||
Data *map[string]interface{} `json:"data,omitempty"`
|
||
Id *string `json:"id,omitempty"`
|
||
Type *string `json:"type,omitempty"`
|
||
} `json:"entities,omitempty"`
|
||
Id string `json:"id"`
|
||
Title *string `json:"title,omitempty"`
|
||
Type string `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"blocks"`
|
||
Title string `json:"title"`
|
||
}
|
||
|
||
// Chart defines model for Chart.
|
||
type Chart struct {
|
||
BgColor string `json:"bgColor"`
|
||
Listeners float32 `json:"listeners"`
|
||
Position float32 `json:"position"`
|
||
Progress ChartProgress `json:"progress"`
|
||
Shift float32 `json:"shift"`
|
||
}
|
||
|
||
// ChartProgress defines model for Chart.Progress.
|
||
type ChartProgress string
|
||
|
||
// ChartItem defines model for ChartItem.
|
||
type ChartItem struct {
|
||
Chart *Chart `json:"chart,omitempty"`
|
||
Id float32 `json:"id"`
|
||
PlayCount float32 `json:"playCount"`
|
||
Recent bool `json:"recent"`
|
||
Timestamp string `json:"timestamp"`
|
||
Track *Track `json:"track,omitempty"`
|
||
}
|
||
|
||
// Cover defines model for Cover.
|
||
type Cover struct {
|
||
Custom bool `json:"custom"`
|
||
|
||
// Dir Существует когда поле type = "pic"
|
||
Dir *string `json:"dir,omitempty"`
|
||
|
||
// Error If exists other properties is missing
|
||
Error *string `json:"error,omitempty"`
|
||
|
||
// ItemsUri Существует когда поле type = "mosaic"
|
||
ItemsUri *[]string `json:"itemsUri,omitempty"`
|
||
Type CoverType `json:"type"`
|
||
|
||
// Uri Существует когда поле type = "pic"
|
||
Uri *string `json:"uri,omitempty"`
|
||
Version *string `json:"version,omitempty"`
|
||
}
|
||
|
||
// CoverType defines model for Cover.Type.
|
||
type CoverType string
|
||
|
||
// Dashboard defines model for Dashboard.
|
||
type Dashboard struct {
|
||
DashboardId string `json:"dashboardId"`
|
||
Pumpkin bool `json:"pumpkin"`
|
||
Stations []StationResult `json:"stations"`
|
||
}
|
||
|
||
// DiscreteScale Класс, представляющий дискретное значение
|
||
type DiscreteScale struct {
|
||
Max *MinMax `json:"max,omitempty"`
|
||
Min *MinMax `json:"min,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
Type *string `json:"type,omitempty"`
|
||
}
|
||
|
||
// Error defines model for Error.
|
||
type Error struct {
|
||
Message *string `json:"message,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
}
|
||
|
||
// Experiments режимы экспериментальных функций
|
||
type Experiments = map[string]interface{}
|
||
|
||
// FullChartResult defines model for FullChartResult.
|
||
type FullChartResult struct {
|
||
// Chart play list data
|
||
Chart Playlist `json:"chart"`
|
||
ChartDescription string `json:"chartDescription"`
|
||
Id string `json:"id"`
|
||
Menu struct {
|
||
Menu MenuItem `json:"menu"`
|
||
} `json:"menu"`
|
||
Title string `json:"title"`
|
||
Type FullChartResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
}
|
||
|
||
// FullChartResultType defines model for FullChartResult.Type.
|
||
type FullChartResultType string
|
||
|
||
// GeneratedPlaylist defines model for GeneratedPlaylist.
|
||
type GeneratedPlaylist struct {
|
||
// AnimatedCoverUri Доступно для плейлиста дня
|
||
AnimatedCoverUri *string `json:"animatedCoverUri,omitempty"`
|
||
Available bool `json:"available"`
|
||
BackgroundColor string `json:"backgroundColor"`
|
||
Collective bool `json:"collective"`
|
||
Cover *Cover `json:"cover,omitempty"`
|
||
CoverWithoutText *Cover `json:"coverWithoutText,omitempty"`
|
||
Created string `json:"created"`
|
||
Description string `json:"description"`
|
||
DescriptionFormatted string `json:"descriptionFormatted"`
|
||
DurationMs float32 `json:"durationMs"`
|
||
EverPlayed *bool `json:"everPlayed,omitempty"`
|
||
GeneratedPlaylistType *string `json:"generatedPlaylistType,omitempty"`
|
||
IdForFrom *string `json:"idForFrom,omitempty"`
|
||
IsBanner bool `json:"isBanner"`
|
||
IsPremiere bool `json:"isPremiere"`
|
||
Kind float32 `json:"kind"`
|
||
LikesCount float32 `json:"likesCount"`
|
||
MadeFor *map[string]interface{} `json:"madeFor,omitempty"`
|
||
Modified string `json:"modified"`
|
||
OgImage *string `json:"ogImage,omitempty"`
|
||
Owner Owner `json:"owner"`
|
||
PlayCounter *struct {
|
||
Description string `json:"description"`
|
||
DescriptionNext string `json:"descriptionNext"`
|
||
Updated bool `json:"updated"`
|
||
Value float32 `json:"value"`
|
||
} `json:"playCounter,omitempty"`
|
||
PlaylistUuid string `json:"playlistUuid"`
|
||
Prerolls *[]map[string]interface{} `json:"prerolls,omitempty"`
|
||
Revision float32 `json:"revision"`
|
||
Snapshot float32 `json:"snapshot"`
|
||
Tags []struct {
|
||
Id *string `json:"id,omitempty"`
|
||
Value *string `json:"value,omitempty"`
|
||
} `json:"tags"`
|
||
TextColor string `json:"textColor"`
|
||
Title string `json:"title"`
|
||
TrackCount float32 `json:"trackCount"`
|
||
Tracks []TrackItem `json:"tracks"`
|
||
Uid float32 `json:"uid"`
|
||
Visibility GeneratedPlaylistVisibility `json:"visibility"`
|
||
}
|
||
|
||
// GeneratedPlaylistVisibility defines model for GeneratedPlaylist.Visibility.
|
||
type GeneratedPlaylistVisibility string
|
||
|
||
// GeneratedPlaylistLandingBlock defines model for GeneratedPlaylistLandingBlock.
|
||
type GeneratedPlaylistLandingBlock struct {
|
||
// Data Плейлист дня, дежавю, премьера, ...
|
||
Data GeneratedPlaylist `json:"data"`
|
||
Notify bool `json:"notify"`
|
||
Ready bool `json:"ready"`
|
||
Type GeneratedPlaylistLandingBlockType `json:"type"`
|
||
}
|
||
|
||
// GeneratedPlaylistLandingBlockType defines model for GeneratedPlaylistLandingBlock.Type.
|
||
type GeneratedPlaylistLandingBlockType string
|
||
|
||
// Genre defines model for Genre.
|
||
type Genre struct {
|
||
// Color Цвет фона изображения
|
||
Color *string `json:"color,omitempty"`
|
||
ComposerTop bool `json:"composerTop"`
|
||
|
||
// FullTitle Полный заголовок
|
||
FullTitle *string `json:"fullTitle,omitempty"`
|
||
|
||
// HideInRegions В каких регионах скрывать жанр
|
||
HideInRegions *[]float32 `json:"hideInRegions,omitempty"`
|
||
|
||
// Id Уникальный идентификатор жанра
|
||
Id string `json:"id"`
|
||
|
||
// Images Изображение жанра
|
||
Images map[string]string `json:"images"`
|
||
RadioIcon *Icon `json:"radioIcon,omitempty"`
|
||
|
||
// ShowInMenu Показывать в меню
|
||
ShowInMenu bool `json:"showInMenu"`
|
||
|
||
// ShowInRegions Список регионов в которых отображается жанр в списках
|
||
ShowInRegions *[]float32 `json:"showInRegions,omitempty"`
|
||
SubGenres *Genre `json:"subGenres,omitempty"`
|
||
|
||
// Title Заголовок жанра
|
||
Title string `json:"title"`
|
||
|
||
// Titles Словарь заголовков на разных языках, где ключ - язык
|
||
Titles map[string]struct {
|
||
FullTitle string `json:"fullTitle"`
|
||
Title string `json:"title"`
|
||
} `json:"titles"`
|
||
|
||
// UrlPart Часть ссылки на жанр для открытия в браузере
|
||
UrlPart *string `json:"urlPart,omitempty"`
|
||
|
||
// Weight Вес TODO (возможно, чем выше показатель, тем больше нравится пользователю)
|
||
Weight float32 `json:"weight"`
|
||
}
|
||
|
||
// Icon defines model for Icon.
|
||
type Icon struct {
|
||
BackgroundColor string `json:"backgroundColor"`
|
||
ImageUrl string `json:"imageUrl"`
|
||
}
|
||
|
||
// InvocationInfo defines model for InvocationInfo.
|
||
type InvocationInfo struct {
|
||
AppName *string `json:"app-name,omitempty"`
|
||
ExecDurationMillis float32 `json:"exec-duration-millis"`
|
||
Hostname string `json:"hostname"`
|
||
ReqId string `json:"req-id"`
|
||
}
|
||
|
||
// LandingBlock defines model for LandingBlock.
|
||
type LandingBlock struct {
|
||
Description string `json:"description"`
|
||
Entities []LandingBlock_Entities_Item `json:"entities"`
|
||
Id string `json:"id"`
|
||
Title string `json:"title"`
|
||
|
||
// Type the follwing values are allowed or combination of these values separated by comman - personal-playlists, podcasts, play-context, chart, new-playlists, new-releases, promotions
|
||
Type string `json:"type"`
|
||
TypeForFrom LandingBlockType `json:"typeForFrom"`
|
||
}
|
||
|
||
// LandingBlock_Entities_Item defines model for LandingBlock.entities.Item.
|
||
type LandingBlock_Entities_Item struct {
|
||
union json.RawMessage
|
||
}
|
||
|
||
// LandingBlockItem defines model for LandingBlockItem.
|
||
type LandingBlockItem struct {
|
||
Data LandingBlockItem_Data `json:"data"`
|
||
Id string `json:"id"`
|
||
Type LandingBlockType `json:"type"`
|
||
}
|
||
|
||
// LandingBlockItem_Data defines model for LandingBlockItem.Data.
|
||
type LandingBlockItem_Data struct {
|
||
union json.RawMessage
|
||
}
|
||
|
||
// LandingBlockType defines model for LandingBlockType.
|
||
type LandingBlockType string
|
||
|
||
// LandingPodcastItem defines model for LandingPodcastItem.
|
||
type LandingPodcastItem struct {
|
||
Data struct {
|
||
Description string `json:"description"`
|
||
DescriptionFormatted string `json:"descriptionFormatted"`
|
||
LastUpdated string `json:"lastUpdated"`
|
||
Podcast Album `json:"podcast"`
|
||
} `json:"data"`
|
||
Description string `json:"description"`
|
||
DescriptionFormatted string `json:"descriptionFormatted"`
|
||
LastUpdated string `json:"lastUpdated"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// LandingResult defines model for LandingResult.
|
||
type LandingResult struct {
|
||
Blocks []LandingBlock `json:"blocks"`
|
||
ContentId string `json:"contentId"`
|
||
Pumpkin bool `json:"pumpkin"`
|
||
}
|
||
|
||
// LicenceTextPart часть текста с ссылкой на лицензионное соглашение
|
||
type LicenceTextPart struct {
|
||
// Text Часть текста.
|
||
Text *string `json:"text,omitempty"`
|
||
|
||
// Url Ссылка на лицензионное соглашение.
|
||
Url *string `json:"url,omitempty"`
|
||
}
|
||
|
||
// Lyrics текст трека
|
||
type Lyrics struct {
|
||
// FullLyrics Текст песни.
|
||
FullLyrics *string `json:"fullLyrics,omitempty"`
|
||
|
||
// HasRights Есть ли права.
|
||
HasRights *bool `json:"hasRights,omitempty"`
|
||
|
||
// Id Уникальный идентификатор текста трека.
|
||
Id *float32 `json:"id,omitempty"`
|
||
|
||
// Lyrics Первые строки текст песни.
|
||
Lyrics *string `json:"lyrics,omitempty"`
|
||
|
||
// ShowTranslation Доступен ли перевод.
|
||
ShowTranslation *bool `json:"showTranslation,omitempty"`
|
||
|
||
// TextLanguage Язык текста.
|
||
TextLanguage *string `json:"textLanguage,omitempty"`
|
||
|
||
// Url Ссылка на источник перевода. Обычно genius.com.
|
||
Url *string `json:"url,omitempty"`
|
||
}
|
||
|
||
// MenuItem defines model for MenuItem.
|
||
type MenuItem struct {
|
||
Selected *bool `json:"selected,omitempty"`
|
||
Title *string `json:"title,omitempty"`
|
||
Url *string `json:"url,omitempty"`
|
||
}
|
||
|
||
// MinMax defines model for MinMax.
|
||
type MinMax struct {
|
||
Name string `json:"name"`
|
||
Value float32 `json:"value"`
|
||
}
|
||
|
||
// MixLink defines model for MixLink.
|
||
type MixLink struct {
|
||
BackgroundColor string `json:"backgroundColor"`
|
||
CoverWhite string `json:"coverWhite"`
|
||
TextColor string `json:"textColor"`
|
||
Title string `json:"title"`
|
||
Url string `json:"url"`
|
||
UrlScheme string `json:"urlScheme"`
|
||
}
|
||
|
||
// NewPlaylistItem defines model for NewPlaylistItem.
|
||
type NewPlaylistItem struct {
|
||
// Kind id плейлиста
|
||
Kind float32 `json:"kind"`
|
||
|
||
// Uid id пользователя
|
||
Uid float32 `json:"uid"`
|
||
}
|
||
|
||
// Owner defines model for Owner.
|
||
type Owner struct {
|
||
Login string `json:"login"`
|
||
Name string `json:"name"`
|
||
Sex string `json:"sex"`
|
||
Uid float32 `json:"uid"`
|
||
Verified bool `json:"verified"`
|
||
}
|
||
|
||
// PermissionAlerts оповещения
|
||
type PermissionAlerts struct {
|
||
Alerts *[]string `json:"alerts,omitempty"`
|
||
}
|
||
|
||
// Permissions Информация о правах пользователя, их изначальных значениях и даты окончания
|
||
type Permissions struct {
|
||
Default *[]interface{} `json:"default,omitempty"`
|
||
Until *string `json:"until,omitempty"`
|
||
Values *[]interface{} `json:"values,omitempty"`
|
||
}
|
||
|
||
// Playlist play list data
|
||
type Playlist struct {
|
||
Available bool `json:"available"`
|
||
BackgroundColor string `json:"backgroundColor"`
|
||
Collective bool `json:"collective"`
|
||
Cover *Cover `json:"cover,omitempty"`
|
||
Created string `json:"created"`
|
||
Description string `json:"description"`
|
||
DescriptionFormatted string `json:"descriptionFormatted"`
|
||
DurationMs float32 `json:"durationMs"`
|
||
IsBanner bool `json:"isBanner"`
|
||
IsPremiere bool `json:"isPremiere"`
|
||
Kind float32 `json:"kind"`
|
||
LikesCount float32 `json:"likesCount"`
|
||
Modified string `json:"modified"`
|
||
OgImage *string `json:"ogImage,omitempty"`
|
||
Owner Owner `json:"owner"`
|
||
PlaylistUuid string `json:"playlistUuid"`
|
||
Prerolls *[]map[string]interface{} `json:"prerolls,omitempty"`
|
||
Revision float32 `json:"revision"`
|
||
Snapshot float32 `json:"snapshot"`
|
||
Tags []struct {
|
||
Id *string `json:"id,omitempty"`
|
||
Value *string `json:"value,omitempty"`
|
||
} `json:"tags"`
|
||
TextColor string `json:"textColor"`
|
||
Title string `json:"title"`
|
||
TrackCount float32 `json:"trackCount"`
|
||
Tracks []TrackItem `json:"tracks"`
|
||
Uid float32 `json:"uid"`
|
||
Visibility PlaylistVisibility `json:"visibility"`
|
||
}
|
||
|
||
// PlaylistVisibility defines model for Playlist.Visibility.
|
||
type PlaylistVisibility string
|
||
|
||
// PlaylistId defines model for PlaylistId.
|
||
type PlaylistId struct {
|
||
// Kind Уникальный идентификатор плейлиста
|
||
Kind *int `json:"kind,omitempty"`
|
||
|
||
// Uid Уникальный идентификатор пользователя владеющим плейлистом
|
||
Uid *int `json:"uid,omitempty"`
|
||
}
|
||
|
||
// PlaylistRecommendations рекомендации для плейлиста
|
||
type PlaylistRecommendations struct {
|
||
// BatchId Уникальный идентификатор партии треков
|
||
BatchId *string `json:"batch_id,omitempty"`
|
||
Tracks *[]Track `json:"tracks,omitempty"`
|
||
}
|
||
|
||
// Price цена
|
||
type Price struct {
|
||
// Amount Количество единиц
|
||
Amount *float32 `json:"amount,omitempty"`
|
||
|
||
// Currency Валюта
|
||
Currency *string `json:"currency,omitempty"`
|
||
}
|
||
|
||
// Product продаваемый продукт
|
||
type Product struct {
|
||
// Available Доступна ли покупка.
|
||
Available *bool `json:"available,omitempty"`
|
||
|
||
// ButtonAdditionalText Дополнительный текст кнопки.
|
||
ButtonAdditionalText *string `json:"buttonAdditionalText,omitempty"`
|
||
|
||
// ButtonText Текст кнопки.
|
||
ButtonText *string `json:"buttonText,omitempty"`
|
||
|
||
// Cheapest Самый дешёвый (лучшее предложение).
|
||
Cheapest *bool `json:"cheapest,omitempty"`
|
||
|
||
// CommonPeriodDuration Длительность общего периода.
|
||
CommonPeriodDuration *string `json:"commonPeriodDuration,omitempty"`
|
||
|
||
// Debug Отладочный продукт.
|
||
Debug *bool `json:"debug,omitempty"`
|
||
|
||
// Description Описание.
|
||
Description *string `json:"description,omitempty"`
|
||
|
||
// Duration Длительность.
|
||
Duration *float32 `json:"duration,omitempty"`
|
||
|
||
// Family Доступно ли для семьи.
|
||
Family *bool `json:"family,omitempty"`
|
||
|
||
// FamilySub Семейная ли подписка.
|
||
FamilySub *bool `json:"familySub,omitempty"`
|
||
|
||
// FbImage Картинка для превью на facebook.
|
||
FbImage *string `json:"fbImage,omitempty"`
|
||
|
||
// FbName Заголовок превью на facebook.
|
||
FbName *string `json:"fbName,omitempty"`
|
||
|
||
// Feature Предоставляемая возможность.
|
||
Feature *string `json:"feature,omitempty"`
|
||
|
||
// Features Список предоставляемых возможностей.
|
||
Features *[]string `json:"features,omitempty"`
|
||
|
||
// IntroPeriodDuration Длительность вступительного периода TODO.
|
||
IntroPeriodDuration *string `json:"introPeriodDuration,omitempty"`
|
||
|
||
// IntroPrice цена
|
||
IntroPrice *Price `json:"introPrice,omitempty"`
|
||
|
||
// LicenceTextParts часть текста с ссылкой на лицензионное соглашение
|
||
LicenceTextParts *LicenceTextPart `json:"licenceTextParts,omitempty"`
|
||
|
||
// PaymentMethodTypes Способы оплаты.
|
||
PaymentMethodTypes *[]string `json:"paymentMethodTypes,omitempty"`
|
||
|
||
// Plus Даёт ли подписку "Плюс".
|
||
Plus *bool `json:"plus,omitempty"`
|
||
|
||
// Price цена
|
||
Price *Price `json:"price,omitempty"`
|
||
|
||
// ProductId Уникальный идентификатор.
|
||
ProductId *string `json:"productId,omitempty"`
|
||
|
||
// StartPeriodDuration Длительность первого срока (за меньшую цену).
|
||
StartPeriodDuration *string `json:"startPeriodDuration,omitempty"`
|
||
|
||
// StartPrice цена
|
||
StartPrice *Price `json:"startPrice,omitempty"`
|
||
|
||
// Title Заголовок продукта.
|
||
Title *string `json:"title,omitempty"`
|
||
|
||
// TrialAvailable Доступен ли пробный период.
|
||
TrialAvailable *bool `json:"trialAvailable,omitempty"`
|
||
|
||
// TrialDuration Длительность испытательного срока.
|
||
TrialDuration *float32 `json:"trialDuration,omitempty"`
|
||
|
||
// TrialPeriodDuration Длительность пробного периода.
|
||
TrialPeriodDuration *string `json:"trialPeriodDuration,omitempty"`
|
||
|
||
// Type Тип продаваемого.
|
||
Type *string `json:"type,omitempty"`
|
||
|
||
// VendorTrialAvailable Доступен испытательный срок продавца TODO.
|
||
VendorTrialAvailable *bool `json:"vendorTrialAvailable,omitempty"`
|
||
}
|
||
|
||
// PromoCodeStatus статус активации промо-кода
|
||
type PromoCodeStatus struct {
|
||
AccountStatus *Status `json:"accountStatus,omitempty"`
|
||
|
||
// Status Статус операции
|
||
Status *string `json:"status,omitempty"`
|
||
|
||
// StatusDesc Описание статуса
|
||
StatusDesc *string `json:"statusDesc,omitempty"`
|
||
}
|
||
|
||
// Promotion defines model for Promotion.
|
||
type Promotion struct {
|
||
Gradient string `json:"gradient"`
|
||
Heading string `json:"heading"`
|
||
Image string `json:"image"`
|
||
PromoId string `json:"promoId"`
|
||
Subtitle string `json:"subtitle"`
|
||
TextColor string `json:"textColor"`
|
||
Title string `json:"title"`
|
||
Url string `json:"url"`
|
||
UrlScheme string `json:"urlScheme"`
|
||
}
|
||
|
||
// QueueContext Содержимое очереди, на основе чего она построена (плейлист, радио, ...)
|
||
type QueueContext struct {
|
||
// Description Описание содержимого (например, название плейлиста, радиостанции) - `various`, `my_music`, `radio`, `playlist`, `artist`. Тип `various` используется при прослушивании из раздела "Моя музыка" с сайта, а `my_music` с мобильных клиентов.
|
||
Description *string `json:"description,omitempty"`
|
||
|
||
// Id Уникальный идентификатор типа содержимого (плейлиста, альбома и т.д.). При `type` равным `my_music` или `various` поле `id` отсутствует.
|
||
Id *string `json:"id,omitempty"`
|
||
|
||
// Type Тип содержимого, на основе чего построена очередь. Значение есть зачастую только когда `type` имеет значение `my_music` или `various`.
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// QueueItem Очередь треков в списке очередей устройств
|
||
type QueueItem struct {
|
||
// Context Содержимое очереди, на основе чего она построена (плейлист, радио, ...)
|
||
Context QueueContext `json:"context"`
|
||
|
||
// CurrentIndex Поле присутствует, только при запросе очереди по идентификатору
|
||
CurrentIndex *float32 `json:"currentIndex,omitempty"`
|
||
|
||
// Id Уникальный идентификатор очереди
|
||
Id string `json:"id"`
|
||
Modified string `json:"modified"`
|
||
|
||
// Tracks Поле присутствует, только при запросе очереди по идентификатору
|
||
Tracks *[]QueueTrack `json:"tracks,omitempty"`
|
||
}
|
||
|
||
// QueueTrack defines model for QueueTrack.
|
||
type QueueTrack struct {
|
||
AlbumId string `json:"albumId"`
|
||
From string `json:"from"`
|
||
TrackId string `json:"trackId"`
|
||
}
|
||
|
||
// QueuesResult defines model for QueuesResult.
|
||
type QueuesResult struct {
|
||
Queues []QueueItem `json:"queues"`
|
||
}
|
||
|
||
// RestrictionEnum defines model for RestrictionEnum.
|
||
type RestrictionEnum struct {
|
||
Name string `json:"name"`
|
||
PossibleValues struct {
|
||
Name string `json:"name"`
|
||
Value string `json:"value"`
|
||
} `json:"possibleValues"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// RestrictionEnum2 defines model for RestrictionEnum2.
|
||
type RestrictionEnum2 struct {
|
||
Name string `json:"name"`
|
||
PossibleValues struct {
|
||
ImageUrl string `json:"imageUrl"`
|
||
Name string `json:"name"`
|
||
SerializedSeed string `json:"serializedSeed"`
|
||
Value string `json:"value"`
|
||
} `json:"possibleValues"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// Restrictions Ограничения для настроек станции старого формата
|
||
type Restrictions struct {
|
||
Diversity *RestrictionEnum `json:"diversity,omitempty"`
|
||
|
||
// Energy Класс, представляющий дискретное значение
|
||
Energy *DiscreteScale `json:"energy,omitempty"`
|
||
Language *RestrictionEnum `json:"language,omitempty"`
|
||
|
||
// Mood Класс, представляющий дискретное значение
|
||
Mood *DiscreteScale `json:"mood,omitempty"`
|
||
}
|
||
|
||
// Restrictions2 Ограничения для настроек станции
|
||
type Restrictions2 struct {
|
||
Diversity *RestrictionEnum2 `json:"diversity,omitempty"`
|
||
Language *RestrictionEnum2 `json:"language,omitempty"`
|
||
MoodEnergy *RestrictionEnum2 `json:"moodEnergy,omitempty"`
|
||
}
|
||
|
||
// RotorData defines model for RotorData.
|
||
type RotorData struct {
|
||
Artists []Artist `json:"artists"`
|
||
Description string `json:"description"`
|
||
ImageUrl string `json:"imageUrl"`
|
||
Title string `json:"title"`
|
||
}
|
||
|
||
// RotorSettings defines model for RotorSettings.
|
||
type RotorSettings struct {
|
||
Diversity string `json:"diversity"`
|
||
Energy float32 `json:"energy"`
|
||
Language string `json:"language"`
|
||
Mood float32 `json:"mood"`
|
||
}
|
||
|
||
// RotorSettings2 defines model for RotorSettings2.
|
||
type RotorSettings2 struct {
|
||
Diversity string `json:"diversity"`
|
||
Language string `json:"language"`
|
||
MoodEnergy string `json:"moodEnergy"`
|
||
}
|
||
|
||
// Search Результаты поиска
|
||
type Search struct {
|
||
// Albums Найденные альбомы
|
||
Albums struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []Album `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"albums"`
|
||
|
||
// Artists Найденные артисты
|
||
Artists struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []Artist `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"artists"`
|
||
|
||
// Best лучший результат поиска
|
||
Best Best `json:"best"`
|
||
|
||
// MisspellCorrected Был ли исправлен запрос
|
||
MisspellCorrected bool `json:"misspellCorrected"`
|
||
|
||
// MisspellOriginal Оригинальный запрос
|
||
MisspellOriginal *string `json:"misspellOriginal,omitempty"`
|
||
|
||
// Nocorrect Было ли отключено исправление результата
|
||
Nocorrect bool `json:"nocorrect"`
|
||
|
||
// Page Текущая страница. Доступно, при использовании параметра type.
|
||
Page *float32 `json:"page,omitempty"`
|
||
|
||
// PerPage Результатов на странице. Доступно, при использовании параметра type.
|
||
PerPage *float32 `json:"perPage,omitempty"`
|
||
|
||
// Playlists Найденные альбомы
|
||
Playlists struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []Playlist `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"playlists"`
|
||
|
||
// PodcastEpisodes Найденные выпуски подкастов
|
||
PodcastEpisodes struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []map[string]interface{} `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"podcast_episodes"`
|
||
|
||
// Podcasts Найденные подкасты
|
||
Podcasts *struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []map[string]interface{} `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"podcasts,omitempty"`
|
||
|
||
// SearchResultId ID запроса
|
||
SearchResultId *string `json:"searchResultId,omitempty"`
|
||
|
||
// Text Текст запроса
|
||
Text string `json:"text"`
|
||
|
||
// Tracks Найденные треки
|
||
Tracks struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []Track `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"tracks"`
|
||
Type *SearchType `json:"type,omitempty"`
|
||
|
||
// Videos Найденные видео
|
||
Videos *struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
Results []Video `json:"results"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
} `json:"videos,omitempty"`
|
||
}
|
||
|
||
// SearchResult defines model for SearchResult.
|
||
type SearchResult struct {
|
||
// Order Позиция блока
|
||
Order float32 `json:"order"`
|
||
|
||
// PerPage Максимальное количество результатов на странице.
|
||
PerPage float32 `json:"perPage"`
|
||
|
||
// Total Количество результатов
|
||
Total float32 `json:"total"`
|
||
|
||
// Type Тип результата
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// SearchType defines model for SearchType.
|
||
type SearchType string
|
||
|
||
// SequenceItem Класс, представляющий звено последовательности радио станции
|
||
type SequenceItem struct {
|
||
Liked bool `json:"liked"`
|
||
Track Track `json:"track"`
|
||
TrackParameters struct {
|
||
Bpm float32 `json:"bpm"`
|
||
Energy float32 `json:"energy"`
|
||
Hue float32 `json:"hue"`
|
||
} `json:"trackParameters"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// Settings Предложения по покупке
|
||
type Settings struct {
|
||
InAppProducts *[]Product `json:"inAppProducts,omitempty"`
|
||
NativeProducts *[]Product `json:"nativeProducts,omitempty"`
|
||
PromoCodesEnabled *bool `json:"promoCodesEnabled,omitempty"`
|
||
|
||
// WebPaymentMonthProductPrice цена
|
||
WebPaymentMonthProductPrice *Price `json:"webPaymentMonthProductPrice,omitempty"`
|
||
WebPaymentUrl *string `json:"webPaymentUrl,omitempty"`
|
||
}
|
||
|
||
// SimilarTracks список похожих треков на другой трек
|
||
type SimilarTracks struct {
|
||
// SimilarTracks Похожие треки
|
||
SimilarTracks *[]Track `json:"similarTracks,omitempty"`
|
||
Track *Track `json:"track,omitempty"`
|
||
}
|
||
|
||
// Station defines model for Station.
|
||
type Station struct {
|
||
// FullImageUrl Ссылка на полное изображение
|
||
FullImageUrl *string `json:"fullImageUrl,omitempty"`
|
||
Icon Icon `json:"icon"`
|
||
Id StationId `json:"id"`
|
||
|
||
// IdForFrom Категория (тип) станции
|
||
IdForFrom *string `json:"idForFrom,omitempty"`
|
||
|
||
// MtsFullImageUrl Ссылка на полную иконку
|
||
MtsFullImageUrl *string `json:"mtsFullImageUrl,omitempty"`
|
||
MtsIcon Icon `json:"mtsIcon"`
|
||
|
||
// Name Название станции
|
||
Name string `json:"name"`
|
||
ParentId *StationId `json:"parentId,omitempty"`
|
||
|
||
// Restrictions Ограничения для настроек станции старого формата
|
||
Restrictions *Restrictions `json:"restrictions,omitempty"`
|
||
|
||
// Restrictions2 Ограничения для настроек станции
|
||
Restrictions2 *Restrictions2 `json:"restrictions2,omitempty"`
|
||
}
|
||
|
||
// StationId defines model for StationId.
|
||
type StationId struct {
|
||
Tag string `json:"tag"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// StationResult defines model for StationResult.
|
||
type StationResult struct {
|
||
AdParams *AdParams `json:"adParams,omitempty"`
|
||
Data *RotorData `json:"data,omitempty"`
|
||
RupDescription *string `json:"rupDescription,omitempty"`
|
||
RupTitle *string `json:"rupTitle,omitempty"`
|
||
Settings *RotorSettings `json:"settings,omitempty"`
|
||
Settings2 *RotorSettings2 `json:"settings2,omitempty"`
|
||
Station *Station `json:"station,omitempty"`
|
||
}
|
||
|
||
// StationTracksResult defines model for StationTracksResult.
|
||
type StationTracksResult struct {
|
||
BatchId string `json:"batchId"`
|
||
Id struct {
|
||
Tag string `json:"tag"`
|
||
Type string `json:"type"`
|
||
} `json:"id"`
|
||
Pumpkin bool `json:"pumpkin"`
|
||
RadioSessionId string `json:"radioSessionId"`
|
||
Sequence []SequenceItem `json:"sequence"`
|
||
}
|
||
|
||
// Status defines model for Status.
|
||
type Status struct {
|
||
// Account Основная информация об аккаунте
|
||
Account Account `json:"account"`
|
||
|
||
// BarBelow Блок с предупреждениями о конце подписки и подарках
|
||
BarBelow *Alert `json:"barBelow,omitempty"`
|
||
|
||
// DefaultEmail Основной e-mail адрес аккаунта
|
||
DefaultEmail string `json:"defaultEmail"`
|
||
|
||
// Permissions Информация о правах пользователя, их изначальных значениях и даты окончания
|
||
Permissions Permissions `json:"permissions"`
|
||
|
||
// Plus Информация о Plus подписке
|
||
Plus struct {
|
||
HasPlus *bool `json:"hasPlus,omitempty"`
|
||
IsTutorialCompleted *bool `json:"isTutorialCompleted,omitempty"`
|
||
Migrated *bool `json:"migrated,omitempty"`
|
||
} `json:"plus"`
|
||
PretrialActive bool `json:"pretrialActive"`
|
||
|
||
// Subeditor Наличие статуса модератора проверки корректности информации
|
||
Subeditor bool `json:"subeditor"`
|
||
|
||
// SubeditorLevel Уровень статуса модератора
|
||
SubeditorLevel float32 `json:"subeditorLevel"`
|
||
|
||
// Subscription Информация о подписках пользователя
|
||
Subscription Subscription `json:"subscription"`
|
||
Userhash string `json:"userhash"`
|
||
}
|
||
|
||
// Subscription Информация о подписках пользователя
|
||
type Subscription struct {
|
||
CanStartTrial *bool `json:"canStartTrial,omitempty"`
|
||
HadAnySubscription *bool `json:"hadAnySubscription,omitempty"`
|
||
Mcdonalds *bool `json:"mcdonalds,omitempty"`
|
||
}
|
||
|
||
// Suggestions подсказки при поиске
|
||
type Suggestions struct {
|
||
Best *map[string]interface{} `json:"best,omitempty"`
|
||
Suggestions *[]string `json:"suggestions,omitempty"`
|
||
}
|
||
|
||
// Supplement дополнительная информация о треке
|
||
type Supplement struct {
|
||
// Description Полное описание эпизода подкаста.
|
||
Description *string `json:"description,omitempty"`
|
||
|
||
// Id Уникальный идентификатор дополнительной информации.
|
||
Id *float32 `json:"id,omitempty"`
|
||
|
||
// Lyrics текст трека
|
||
Lyrics *Lyrics `json:"lyrics,omitempty"`
|
||
|
||
// RadioIsAvailable Доступно ли радио.
|
||
RadioIsAvailable *bool `json:"radioIsAvailable,omitempty"`
|
||
|
||
// Videos видеоклипы
|
||
Videos *VideoSupplement `json:"videos,omitempty"`
|
||
}
|
||
|
||
// Tag Тег
|
||
type Tag struct {
|
||
// Id Уникальный идентификатор тега
|
||
Id string `json:"id"`
|
||
|
||
// Name Название тега (отображаемое)
|
||
Name string `json:"name"`
|
||
|
||
// OgDescription Описание тега для OpenGraph
|
||
OgDescription string `json:"ogDescription"`
|
||
|
||
// OgImage Ссылка на изображение для OpenGraph
|
||
OgImage *string `json:"ogImage,omitempty"`
|
||
|
||
// Value Значение тега (название в lower case)
|
||
Value string `json:"value"`
|
||
}
|
||
|
||
// TagResult Класс, представляющий тег и его плейлисты
|
||
type TagResult struct {
|
||
Ids *[]PlaylistId `json:"ids,omitempty"`
|
||
|
||
// Tag Тег
|
||
Tag *Tag `json:"tag,omitempty"`
|
||
}
|
||
|
||
// Track defines model for Track.
|
||
type Track struct {
|
||
Albums []Album `json:"albums"`
|
||
Artists []Artist `json:"artists"`
|
||
Available bool `json:"available"`
|
||
AvailableForPremiumUsers bool `json:"availableForPremiumUsers"`
|
||
AvailableFullWithoutPermission bool `json:"availableFullWithoutPermission"`
|
||
|
||
// CoverUri Cover uri template
|
||
CoverUri string `json:"coverUri"`
|
||
DurationMs float32 `json:"durationMs"`
|
||
FileSize float32 `json:"fileSize"`
|
||
Id string `json:"id"`
|
||
LyricsAvailable bool `json:"lyricsAvailable"`
|
||
Major struct {
|
||
Id float32 `json:"id"`
|
||
Name string `json:"name"`
|
||
} `json:"major"`
|
||
Normalization struct {
|
||
Gain float32 `json:"gain"`
|
||
Peak float32 `json:"peak"`
|
||
} `json:"normalization"`
|
||
OgImage string `json:"ogImage"`
|
||
PreviewDurationMs float32 `json:"previewDurationMs"`
|
||
RealId string `json:"realId"`
|
||
RememberPosition bool `json:"rememberPosition"`
|
||
StorageDir string `json:"storageDir"`
|
||
Title string `json:"title"`
|
||
Type string `json:"type"`
|
||
}
|
||
|
||
// TrackDownloadInfo информация о вариантах загрузки трека
|
||
type TrackDownloadInfo struct {
|
||
// BitrateInKbps Битрейт аудиофайла в кбит/с
|
||
BitrateInKbps float32 `json:"bitrateInKbps"`
|
||
|
||
// Codec Кодек аудиофайла
|
||
Codec TrackDownloadInfoCodec `json:"codec"`
|
||
|
||
// Direct Прямая ли ссылка
|
||
Direct bool `json:"direct"`
|
||
|
||
// DownloadInfoUrl Ссылка на XML документ содержащий данные для загрузки трека
|
||
DownloadInfoUrl string `json:"downloadInfoUrl"`
|
||
|
||
// Gain Усиление
|
||
Gain bool `json:"gain"`
|
||
|
||
// Preview Предварительный просмотр
|
||
Preview bool `json:"preview"`
|
||
}
|
||
|
||
// TrackDownloadInfoCodec Кодек аудиофайла
|
||
type TrackDownloadInfoCodec string
|
||
|
||
// TrackItem defines model for TrackItem.
|
||
type TrackItem struct {
|
||
Id float32 `json:"id"`
|
||
PlayCount float32 `json:"playCount"`
|
||
Recent bool `json:"recent"`
|
||
Timestamp string `json:"timestamp"`
|
||
Track *Track `json:"track,omitempty"`
|
||
}
|
||
|
||
// TrackShort Укороченная версия трека с неполными данными
|
||
type TrackShort struct {
|
||
// AlbumId Уникальный идентификатор альбома
|
||
AlbumId string `json:"albumId"`
|
||
|
||
// Id Уникальный идентификатор трека
|
||
Id string `json:"id"`
|
||
|
||
// Timestamp Дата
|
||
Timestamp string `json:"timestamp"`
|
||
}
|
||
|
||
// TracksList список треков
|
||
type TracksList struct {
|
||
// Revisions Актуальность данных TODO
|
||
Revisions float32 `json:"revisions"`
|
||
|
||
// Tracks Список треков в укороченной версии
|
||
Tracks []TrackShort `json:"tracks"`
|
||
|
||
// Uid Уникальный идентификатор пользователя
|
||
Uid float32 `json:"uid"`
|
||
}
|
||
|
||
// UpdateQueueResult defines model for UpdateQueueResult.
|
||
type UpdateQueueResult struct {
|
||
MostRecentQueue string `json:"mostRecentQueue"`
|
||
Status string `json:"status"`
|
||
}
|
||
|
||
// UserSettings defines model for UserSettings.
|
||
type UserSettings struct {
|
||
AddNewTrackOnPlaylistTop *bool `json:"addNewTrackOnPlaylistTop,omitempty"`
|
||
AdsDisabled *bool `json:"adsDisabled,omitempty"`
|
||
AutoPlayRadio *bool `json:"autoPlayRadio,omitempty"`
|
||
FacebookScrobblingEnabled *bool `json:"facebookScrobblingEnabled,omitempty"`
|
||
LastFmScrobblingEnabled *bool `json:"lastFmScrobblingEnabled,omitempty"`
|
||
Modified *string `json:"modified,omitempty"`
|
||
PromosDisabled *bool `json:"promosDisabled,omitempty"`
|
||
RbtDisabled *string `json:"rbtDisabled,omitempty"`
|
||
ShuffleEnabled *bool `json:"shuffleEnabled,omitempty"`
|
||
SyncQueueEnabled *bool `json:"syncQueueEnabled,omitempty"`
|
||
|
||
// Theme Тема оформления.
|
||
Theme *UserSettingsTheme `json:"theme,omitempty"`
|
||
Uid *float32 `json:"uid,omitempty"`
|
||
UserMusicVisibility *VisibilityEnum `json:"userMusicVisibility,omitempty"`
|
||
UserSocialVisibility *VisibilityEnum `json:"userSocialVisibility,omitempty"`
|
||
VolumePercents *bool `json:"volumePercents,omitempty"`
|
||
}
|
||
|
||
// UserSettingsTheme Тема оформления.
|
||
type UserSettingsTheme string
|
||
|
||
// Video Видео
|
||
type Video struct {
|
||
// Cover Ссылка на изображение
|
||
Cover *string `json:"cover,omitempty"`
|
||
|
||
// Duration Длительность видео в секундах
|
||
Duration *float32 `json:"duration,omitempty"`
|
||
|
||
// EmbedUrl Ссылка на видео
|
||
EmbedUrl *string `json:"embedUrl,omitempty"`
|
||
|
||
// HtmlAutoPlayVideoPlayer HTML тег для встраивания в разметку страницы
|
||
HtmlAutoPlayVideoPlayer *string `json:"htmlAutoPlayVideoPlayer,omitempty"`
|
||
|
||
// Provider Сервис поставляющий видео
|
||
Provider *string `json:"provider,omitempty"`
|
||
|
||
// ProviderVideoId Уникальный идентификатор видео на сервисе.
|
||
ProviderVideoId *string `json:"providerVideoId,omitempty"`
|
||
Regions *[]string `json:"regions,omitempty"`
|
||
|
||
// Text Текст
|
||
Text *string `json:"text,omitempty"`
|
||
|
||
// ThumbnailUrl Ссылка на изображение
|
||
ThumbnailUrl *string `json:"thumbnailUrl,omitempty"`
|
||
|
||
// Title Название видео
|
||
Title *string `json:"title,omitempty"`
|
||
|
||
// YoutubeUrl Ссылка на видео Youtube
|
||
YoutubeUrl *string `json:"youtubeUrl,omitempty"`
|
||
}
|
||
|
||
// VideoSupplement видеоклипы
|
||
type VideoSupplement struct {
|
||
// Cover URL на обложку видео.
|
||
Cover *string `json:"cover,omitempty"`
|
||
|
||
// Embed HTML тег для встраивания видео.
|
||
Embed *string `json:"embed,omitempty"`
|
||
|
||
// EmbedUrl URL на видео, находящегося на серверах Яндекса.
|
||
EmbedUrl *string `json:"embedUrl,omitempty"`
|
||
|
||
// Provider Сервис поставляющий видео.
|
||
Provider *string `json:"provider,omitempty"`
|
||
|
||
// ProviderVideoId Уникальный идентификатор видео на сервисе.
|
||
ProviderVideoId *string `json:"providerVideoId,omitempty"`
|
||
|
||
// Title Название видео.
|
||
Title *string `json:"title,omitempty"`
|
||
|
||
// Url URL на видео.
|
||
Url *string `json:"url,omitempty"`
|
||
}
|
||
|
||
// VisibilityEnum defines model for VisibilityEnum.
|
||
type VisibilityEnum string
|
||
|
||
// ActivatePromoCodeFormdataBody defines parameters for ActivatePromoCode.
|
||
type ActivatePromoCodeFormdataBody struct {
|
||
Code *string `form:"code,omitempty" json:"code,omitempty"`
|
||
Language *string `form:"language,omitempty" json:"language,omitempty"`
|
||
}
|
||
|
||
// ChangeAccountSettingsFormdataBody defines parameters for ChangeAccountSettings.
|
||
type ChangeAccountSettingsFormdataBody struct {
|
||
}
|
||
|
||
// GetAlbumsByIdsFormdataBody defines parameters for GetAlbumsByIds.
|
||
type GetAlbumsByIdsFormdataBody struct {
|
||
AlbumIds string `form:"album-ids" json:"album-ids"`
|
||
}
|
||
|
||
// GetArtistsArtistIdDirectAlbumsParams defines parameters for GetArtistsArtistIdDirectAlbums.
|
||
type GetArtistsArtistIdDirectAlbumsParams struct {
|
||
Page *float32 `form:"page,omitempty" json:"page,omitempty"`
|
||
PageSize *float32 `form:"page-size,omitempty" json:"page-size,omitempty"`
|
||
SortBy *string `form:"sort-by,omitempty" json:"sort-by,omitempty"`
|
||
}
|
||
|
||
// GetArtistTracksParams defines parameters for GetArtistTracks.
|
||
type GetArtistTracksParams struct {
|
||
Page *float32 `form:"page,omitempty" json:"page,omitempty"`
|
||
PageSize *float32 `form:"page-size,omitempty" json:"page-size,omitempty"`
|
||
}
|
||
|
||
// GetLandingBlocksParams defines parameters for GetLandingBlocks.
|
||
type GetLandingBlocksParams struct {
|
||
Blocks *string `form:"blocks,omitempty" json:"blocks,omitempty"`
|
||
}
|
||
|
||
// PlayAudioFormdataBody defines parameters for PlayAudio.
|
||
type PlayAudioFormdataBody struct {
|
||
// AlbumId Уникальный идентификатор альбома
|
||
AlbumId *string `form:"album-id,omitempty" json:"album-id,omitempty"`
|
||
|
||
// ClientNow Текущая дата и время клиента в ISO
|
||
ClientNow *string `form:"client-now,omitempty" json:"client-now,omitempty"`
|
||
|
||
// EndPositionSeconds Продолжительность трека в секундах
|
||
EndPositionSeconds *float32 `form:"end-position-seconds,omitempty" json:"end-position-seconds,omitempty"`
|
||
|
||
// From Наименования клиента с которого происходит прослушивание
|
||
From string `form:"from" json:"from"`
|
||
|
||
// FromCache Проигрывается ли трек из кеша
|
||
FromCache *bool `form:"from-cache,omitempty" json:"from-cache,omitempty"`
|
||
|
||
// PlayId Уникальный идентификатор проигрывания
|
||
PlayId *string `form:"play-id,omitempty" json:"play-id,omitempty"`
|
||
|
||
// PlaylistId Уникальный идентификатор проигрывания
|
||
PlaylistId *string `form:"playlist-id,omitempty" json:"playlist-id,omitempty"`
|
||
|
||
// Timestamp Текущая дата и время в ISO
|
||
Timestamp *string `form:"timestamp,omitempty" json:"timestamp,omitempty"`
|
||
|
||
// TotalPlayedSeconds Продолжительность трека в секундах
|
||
TotalPlayedSeconds *float32 `form:"total-played-seconds,omitempty" json:"total-played-seconds,omitempty"`
|
||
|
||
// TrackId Уникальный идентификатор трека
|
||
TrackId *string `form:"track-id,omitempty" json:"track-id,omitempty"`
|
||
|
||
// TrackLengthSeconds Продолжительность трека в секундах
|
||
TrackLengthSeconds *float32 `form:"track-length-seconds,omitempty" json:"track-length-seconds,omitempty"`
|
||
|
||
// Uid Уникальный идентификатор пользователя
|
||
Uid *float32 `form:"uid,omitempty" json:"uid,omitempty"`
|
||
}
|
||
|
||
// GetPlaylistsByIdsFormdataBody defines parameters for GetPlaylistsByIds.
|
||
type GetPlaylistsByIdsFormdataBody struct {
|
||
// PlaylistIds uid владельца плейлиста и kind плейлиста через двоеточие и запятую
|
||
PlaylistIds *[]string `form:"playlistIds,omitempty" json:"playlistIds,omitempty"`
|
||
}
|
||
|
||
// GetQueuesParams defines parameters for GetQueues.
|
||
type GetQueuesParams struct {
|
||
// XYandexMusicDevice Содержит информацию об устройстве с которого выполняется запрос. Именно к `device` привязывается очередь. На одном устройстве может быть создана одна очередь.
|
||
XYandexMusicDevice string `json:"X-Yandex-Music-Device"`
|
||
}
|
||
|
||
// UpdateQueuePositionParams defines parameters for UpdateQueuePosition.
|
||
type UpdateQueuePositionParams struct {
|
||
// CurrentIndex Текущий индекс
|
||
CurrentIndex string `form:"currentIndex" json:"currentIndex"`
|
||
IsInteractive bool `form:"IsInteractive" json:"IsInteractive"`
|
||
}
|
||
|
||
// SendStationFeedbackJSONBody defines parameters for SendStationFeedback.
|
||
type SendStationFeedbackJSONBody struct {
|
||
// From Откуда начато воспроизведение радио
|
||
From *string `json:"from,omitempty"`
|
||
|
||
// Timestamp Текущее время и дата
|
||
Timestamp *string `json:"timestamp,omitempty"`
|
||
|
||
// TotalPlayedSeconds Сколько было проиграно секунд трека. Необходимо указывать только для типов 'trackFinished' и 'skip'
|
||
TotalPlayedSeconds *float32 `json:"totalPlayedSeconds,omitempty"`
|
||
|
||
// TrackId Уникальной идентификатор трека
|
||
TrackId *string `json:"trackId,omitempty"`
|
||
|
||
// Type Тип отправляемого фидбека
|
||
Type SendStationFeedbackJSONBodyType `json:"type"`
|
||
}
|
||
|
||
// SendStationFeedbackParams defines parameters for SendStationFeedback.
|
||
type SendStationFeedbackParams struct {
|
||
// BatchId Уникальный идентификатор партии треков. Возвращается при получении треков. Должен отсутствовать, для типа 'radioStarted'
|
||
BatchId *string `form:"batch-id,omitempty" json:"batch-id,omitempty"`
|
||
}
|
||
|
||
// SendStationFeedbackJSONBodyType defines parameters for SendStationFeedback.
|
||
type SendStationFeedbackJSONBodyType string
|
||
|
||
// GetStationTracksParams defines parameters for GetStationTracks.
|
||
type GetStationTracksParams struct {
|
||
// Settings2 Использовать ли второй набор настроек. Все официальные клиенты выполняют запросы с `settings2 = True`.
|
||
Settings2 *bool `form:"settings2,omitempty" json:"settings2,omitempty"`
|
||
|
||
// Queue Уникальной идентификатор трека, который только что был.
|
||
Queue *string `form:"queue,omitempty" json:"queue,omitempty"`
|
||
}
|
||
|
||
// GetStationsListParams defines parameters for GetStationsList.
|
||
type GetStationsListParams struct {
|
||
// Language Язык, на котором будет информация о станциях
|
||
Language *string `form:"language,omitempty" json:"language,omitempty"`
|
||
}
|
||
|
||
// SearchParams defines parameters for Search.
|
||
type SearchParams struct {
|
||
// Text Текст запроса
|
||
Text string `form:"text" json:"text"`
|
||
|
||
// Page Номер страницы выдачи
|
||
Page float32 `form:"page" json:"page"`
|
||
Type SearchType `form:"type" json:"type"`
|
||
Nococrrect *bool `form:"nococrrect,omitempty" json:"nococrrect,omitempty"`
|
||
}
|
||
|
||
// GetSearchSuggestParams defines parameters for GetSearchSuggest.
|
||
type GetSearchSuggestParams struct {
|
||
// Part Часть поискового запроса
|
||
Part string `form:"part" json:"part"`
|
||
}
|
||
|
||
// GetTokenFormdataBody defines parameters for GetToken.
|
||
type GetTokenFormdataBody struct {
|
||
ClientId GetTokenFormdataBodyClientId `form:"client_id" json:"client_id"`
|
||
ClientSecret GetTokenFormdataBodyClientSecret `form:"client_secret" json:"client_secret"`
|
||
GrantType GetTokenFormdataBodyGrantType `form:"grant_type" json:"grant_type"`
|
||
Password string `form:"password" json:"password"`
|
||
Username string `form:"username" json:"username"`
|
||
}
|
||
|
||
// GetTokenFormdataBodyClientId defines parameters for GetToken.
|
||
type GetTokenFormdataBodyClientId string
|
||
|
||
// GetTokenFormdataBodyClientSecret defines parameters for GetToken.
|
||
type GetTokenFormdataBodyClientSecret string
|
||
|
||
// GetTokenFormdataBodyGrantType defines parameters for GetToken.
|
||
type GetTokenFormdataBodyGrantType string
|
||
|
||
// GetTracksFormdataBody defines parameters for GetTracks.
|
||
type GetTracksFormdataBody struct {
|
||
// TrackIds Уникальные идентификаторы треков
|
||
TrackIds *[]string `form:"trackIds,omitempty" json:"trackIds,omitempty"`
|
||
|
||
// WithPositions С позициями
|
||
WithPositions *bool `form:"with-positions,omitempty" json:"with-positions,omitempty"`
|
||
}
|
||
|
||
// GetTrackLyricsParams defines parameters for GetTrackLyrics.
|
||
type GetTrackLyricsParams struct {
|
||
Format *string `form:"format,omitempty" json:"format,omitempty"`
|
||
TimeStamp *string `form:"timeStamp,omitempty" json:"timeStamp,omitempty"`
|
||
Sign *string `form:"sign,omitempty" json:"sign,omitempty"`
|
||
}
|
||
|
||
// GetDislikedTracksIdsParams defines parameters for GetDislikedTracksIds.
|
||
type GetDislikedTracksIdsParams struct {
|
||
// IfModifiedSinceRevision TODO
|
||
IfModifiedSinceRevision *float32 `form:"if_modified_since_revision,omitempty" json:"if_modified_since_revision,omitempty"`
|
||
}
|
||
|
||
// LikeTracksFormdataBody defines parameters for LikeTracks.
|
||
type LikeTracksFormdataBody struct {
|
||
TrackIds *[]string `form:"track-ids,omitempty" json:"track-ids,omitempty"`
|
||
}
|
||
|
||
// RemoveLikedTracksFormdataBody defines parameters for RemoveLikedTracks.
|
||
type RemoveLikedTracksFormdataBody struct {
|
||
TrackIds *[]string `form:"track-ids,omitempty" json:"track-ids,omitempty"`
|
||
}
|
||
|
||
// GetUserPlaylistsByIdsParams defines parameters for GetUserPlaylistsByIds.
|
||
type GetUserPlaylistsByIdsParams struct {
|
||
Kinds string `form:"kinds" json:"kinds"`
|
||
Mixed bool `form:"mixed" json:"mixed"`
|
||
RichTracks bool `form:"rich-tracks" json:"rich-tracks"`
|
||
}
|
||
|
||
// CreatePlaylistFormdataBody defines parameters for CreatePlaylist.
|
||
type CreatePlaylistFormdataBody struct {
|
||
Title string `form:"title" json:"title"`
|
||
Visibility VisibilityEnum `form:"visibility" json:"visibility"`
|
||
}
|
||
|
||
// ChangePlaylistTracksFormdataBody defines parameters for ChangePlaylistTracks.
|
||
type ChangePlaylistTracksFormdataBody struct {
|
||
Diff *string `form:"diff,omitempty" json:"diff,omitempty"`
|
||
Revision *string `form:"revision,omitempty" json:"revision,omitempty"`
|
||
}
|
||
|
||
// RenamePlaylistFormdataBody defines parameters for RenamePlaylist.
|
||
type RenamePlaylistFormdataBody struct {
|
||
Value *string `form:"value,omitempty" json:"value,omitempty"`
|
||
}
|
||
|
||
// ChangePlaylistVisibilityFormdataBody defines parameters for ChangePlaylistVisibility.
|
||
type ChangePlaylistVisibilityFormdataBody struct {
|
||
Value *VisibilityEnum `form:"value,omitempty" json:"value,omitempty"`
|
||
}
|
||
|
||
// ActivatePromoCodeFormdataRequestBody defines body for ActivatePromoCode for application/x-www-form-urlencoded ContentType.
|
||
type ActivatePromoCodeFormdataRequestBody ActivatePromoCodeFormdataBody
|
||
|
||
// ChangeAccountSettingsFormdataRequestBody defines body for ChangeAccountSettings for application/x-www-form-urlencoded ContentType.
|
||
type ChangeAccountSettingsFormdataRequestBody ChangeAccountSettingsFormdataBody
|
||
|
||
// GetAlbumsByIdsFormdataRequestBody defines body for GetAlbumsByIds for application/x-www-form-urlencoded ContentType.
|
||
type GetAlbumsByIdsFormdataRequestBody GetAlbumsByIdsFormdataBody
|
||
|
||
// PlayAudioFormdataRequestBody defines body for PlayAudio for application/x-www-form-urlencoded ContentType.
|
||
type PlayAudioFormdataRequestBody PlayAudioFormdataBody
|
||
|
||
// GetPlaylistsByIdsFormdataRequestBody defines body for GetPlaylistsByIds for application/x-www-form-urlencoded ContentType.
|
||
type GetPlaylistsByIdsFormdataRequestBody GetPlaylistsByIdsFormdataBody
|
||
|
||
// SendStationFeedbackJSONRequestBody defines body for SendStationFeedback for application/json ContentType.
|
||
type SendStationFeedbackJSONRequestBody SendStationFeedbackJSONBody
|
||
|
||
// GetTokenFormdataRequestBody defines body for GetToken for application/x-www-form-urlencoded ContentType.
|
||
type GetTokenFormdataRequestBody GetTokenFormdataBody
|
||
|
||
// GetTracksFormdataRequestBody defines body for GetTracks for application/x-www-form-urlencoded ContentType.
|
||
type GetTracksFormdataRequestBody GetTracksFormdataBody
|
||
|
||
// LikeTracksFormdataRequestBody defines body for LikeTracks for application/x-www-form-urlencoded ContentType.
|
||
type LikeTracksFormdataRequestBody LikeTracksFormdataBody
|
||
|
||
// RemoveLikedTracksFormdataRequestBody defines body for RemoveLikedTracks for application/x-www-form-urlencoded ContentType.
|
||
type RemoveLikedTracksFormdataRequestBody RemoveLikedTracksFormdataBody
|
||
|
||
// CreatePlaylistFormdataRequestBody defines body for CreatePlaylist for application/x-www-form-urlencoded ContentType.
|
||
type CreatePlaylistFormdataRequestBody CreatePlaylistFormdataBody
|
||
|
||
// ChangePlaylistTracksFormdataRequestBody defines body for ChangePlaylistTracks for application/x-www-form-urlencoded ContentType.
|
||
type ChangePlaylistTracksFormdataRequestBody ChangePlaylistTracksFormdataBody
|
||
|
||
// RenamePlaylistFormdataRequestBody defines body for RenamePlaylist for application/x-www-form-urlencoded ContentType.
|
||
type RenamePlaylistFormdataRequestBody RenamePlaylistFormdataBody
|
||
|
||
// ChangePlaylistVisibilityFormdataRequestBody defines body for ChangePlaylistVisibility for application/x-www-form-urlencoded ContentType.
|
||
type ChangePlaylistVisibilityFormdataRequestBody ChangePlaylistVisibilityFormdataBody
|
||
|
||
// AsArtistId0 returns the union data inside the Artist_Id as a ArtistId0
|
||
func (t Artist_Id) AsArtistId0() (ArtistId0, error) {
|
||
var body ArtistId0
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromArtistId0 overwrites any union data inside the Artist_Id as the provided ArtistId0
|
||
func (t *Artist_Id) FromArtistId0(v ArtistId0) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeArtistId0 performs a merge with any union data inside the Artist_Id, using the provided ArtistId0
|
||
func (t *Artist_Id) MergeArtistId0(v ArtistId0) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsArtistId1 returns the union data inside the Artist_Id as a ArtistId1
|
||
func (t Artist_Id) AsArtistId1() (ArtistId1, error) {
|
||
var body ArtistId1
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromArtistId1 overwrites any union data inside the Artist_Id as the provided ArtistId1
|
||
func (t *Artist_Id) FromArtistId1(v ArtistId1) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeArtistId1 performs a merge with any union data inside the Artist_Id, using the provided ArtistId1
|
||
func (t *Artist_Id) MergeArtistId1(v ArtistId1) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
func (t Artist_Id) MarshalJSON() ([]byte, error) {
|
||
b, err := t.union.MarshalJSON()
|
||
return b, err
|
||
}
|
||
|
||
func (t *Artist_Id) UnmarshalJSON(b []byte) error {
|
||
err := t.union.UnmarshalJSON(b)
|
||
return err
|
||
}
|
||
|
||
// AsTrack returns the union data inside the Best_Result as a Track
|
||
func (t Best_Result) AsTrack() (Track, error) {
|
||
var body Track
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromTrack overwrites any union data inside the Best_Result as the provided Track
|
||
func (t *Best_Result) FromTrack(v Track) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeTrack performs a merge with any union data inside the Best_Result, using the provided Track
|
||
func (t *Best_Result) MergeTrack(v Track) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsArtist returns the union data inside the Best_Result as a Artist
|
||
func (t Best_Result) AsArtist() (Artist, error) {
|
||
var body Artist
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromArtist overwrites any union data inside the Best_Result as the provided Artist
|
||
func (t *Best_Result) FromArtist(v Artist) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeArtist performs a merge with any union data inside the Best_Result, using the provided Artist
|
||
func (t *Best_Result) MergeArtist(v Artist) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsAlbum returns the union data inside the Best_Result as a Album
|
||
func (t Best_Result) AsAlbum() (Album, error) {
|
||
var body Album
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromAlbum overwrites any union data inside the Best_Result as the provided Album
|
||
func (t *Best_Result) FromAlbum(v Album) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeAlbum performs a merge with any union data inside the Best_Result, using the provided Album
|
||
func (t *Best_Result) MergeAlbum(v Album) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsPlaylist returns the union data inside the Best_Result as a Playlist
|
||
func (t Best_Result) AsPlaylist() (Playlist, error) {
|
||
var body Playlist
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromPlaylist overwrites any union data inside the Best_Result as the provided Playlist
|
||
func (t *Best_Result) FromPlaylist(v Playlist) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergePlaylist performs a merge with any union data inside the Best_Result, using the provided Playlist
|
||
func (t *Best_Result) MergePlaylist(v Playlist) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsVideo returns the union data inside the Best_Result as a Video
|
||
func (t Best_Result) AsVideo() (Video, error) {
|
||
var body Video
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromVideo overwrites any union data inside the Best_Result as the provided Video
|
||
func (t *Best_Result) FromVideo(v Video) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeVideo performs a merge with any union data inside the Best_Result, using the provided Video
|
||
func (t *Best_Result) MergeVideo(v Video) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
func (t Best_Result) MarshalJSON() ([]byte, error) {
|
||
b, err := t.union.MarshalJSON()
|
||
return b, err
|
||
}
|
||
|
||
func (t *Best_Result) UnmarshalJSON(b []byte) error {
|
||
err := t.union.UnmarshalJSON(b)
|
||
return err
|
||
}
|
||
|
||
// AsLandingPodcastItem returns the union data inside the LandingBlock_Entities_Item as a LandingPodcastItem
|
||
func (t LandingBlock_Entities_Item) AsLandingPodcastItem() (LandingPodcastItem, error) {
|
||
var body LandingPodcastItem
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromLandingPodcastItem overwrites any union data inside the LandingBlock_Entities_Item as the provided LandingPodcastItem
|
||
func (t *LandingBlock_Entities_Item) FromLandingPodcastItem(v LandingPodcastItem) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeLandingPodcastItem performs a merge with any union data inside the LandingBlock_Entities_Item, using the provided LandingPodcastItem
|
||
func (t *LandingBlock_Entities_Item) MergeLandingPodcastItem(v LandingPodcastItem) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsLandingBlockItem returns the union data inside the LandingBlock_Entities_Item as a LandingBlockItem
|
||
func (t LandingBlock_Entities_Item) AsLandingBlockItem() (LandingBlockItem, error) {
|
||
var body LandingBlockItem
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromLandingBlockItem overwrites any union data inside the LandingBlock_Entities_Item as the provided LandingBlockItem
|
||
func (t *LandingBlock_Entities_Item) FromLandingBlockItem(v LandingBlockItem) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeLandingBlockItem performs a merge with any union data inside the LandingBlock_Entities_Item, using the provided LandingBlockItem
|
||
func (t *LandingBlock_Entities_Item) MergeLandingBlockItem(v LandingBlockItem) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
func (t LandingBlock_Entities_Item) MarshalJSON() ([]byte, error) {
|
||
b, err := t.union.MarshalJSON()
|
||
return b, err
|
||
}
|
||
|
||
func (t *LandingBlock_Entities_Item) UnmarshalJSON(b []byte) error {
|
||
err := t.union.UnmarshalJSON(b)
|
||
return err
|
||
}
|
||
|
||
// AsAlbum returns the union data inside the LandingBlockItem_Data as a Album
|
||
func (t LandingBlockItem_Data) AsAlbum() (Album, error) {
|
||
var body Album
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromAlbum overwrites any union data inside the LandingBlockItem_Data as the provided Album
|
||
func (t *LandingBlockItem_Data) FromAlbum(v Album) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeAlbum performs a merge with any union data inside the LandingBlockItem_Data, using the provided Album
|
||
func (t *LandingBlockItem_Data) MergeAlbum(v Album) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsPlaylist returns the union data inside the LandingBlockItem_Data as a Playlist
|
||
func (t LandingBlockItem_Data) AsPlaylist() (Playlist, error) {
|
||
var body Playlist
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromPlaylist overwrites any union data inside the LandingBlockItem_Data as the provided Playlist
|
||
func (t *LandingBlockItem_Data) FromPlaylist(v Playlist) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergePlaylist performs a merge with any union data inside the LandingBlockItem_Data, using the provided Playlist
|
||
func (t *LandingBlockItem_Data) MergePlaylist(v Playlist) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsPromotion returns the union data inside the LandingBlockItem_Data as a Promotion
|
||
func (t LandingBlockItem_Data) AsPromotion() (Promotion, error) {
|
||
var body Promotion
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromPromotion overwrites any union data inside the LandingBlockItem_Data as the provided Promotion
|
||
func (t *LandingBlockItem_Data) FromPromotion(v Promotion) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergePromotion performs a merge with any union data inside the LandingBlockItem_Data, using the provided Promotion
|
||
func (t *LandingBlockItem_Data) MergePromotion(v Promotion) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsMixLink returns the union data inside the LandingBlockItem_Data as a MixLink
|
||
func (t LandingBlockItem_Data) AsMixLink() (MixLink, error) {
|
||
var body MixLink
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromMixLink overwrites any union data inside the LandingBlockItem_Data as the provided MixLink
|
||
func (t *LandingBlockItem_Data) FromMixLink(v MixLink) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeMixLink performs a merge with any union data inside the LandingBlockItem_Data, using the provided MixLink
|
||
func (t *LandingBlockItem_Data) MergeMixLink(v MixLink) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsGeneratedPlaylistLandingBlock returns the union data inside the LandingBlockItem_Data as a GeneratedPlaylistLandingBlock
|
||
func (t LandingBlockItem_Data) AsGeneratedPlaylistLandingBlock() (GeneratedPlaylistLandingBlock, error) {
|
||
var body GeneratedPlaylistLandingBlock
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromGeneratedPlaylistLandingBlock overwrites any union data inside the LandingBlockItem_Data as the provided GeneratedPlaylistLandingBlock
|
||
func (t *LandingBlockItem_Data) FromGeneratedPlaylistLandingBlock(v GeneratedPlaylistLandingBlock) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeGeneratedPlaylistLandingBlock performs a merge with any union data inside the LandingBlockItem_Data, using the provided GeneratedPlaylistLandingBlock
|
||
func (t *LandingBlockItem_Data) MergeGeneratedPlaylistLandingBlock(v GeneratedPlaylistLandingBlock) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
// AsChartItem returns the union data inside the LandingBlockItem_Data as a ChartItem
|
||
func (t LandingBlockItem_Data) AsChartItem() (ChartItem, error) {
|
||
var body ChartItem
|
||
err := json.Unmarshal(t.union, &body)
|
||
return body, err
|
||
}
|
||
|
||
// FromChartItem overwrites any union data inside the LandingBlockItem_Data as the provided ChartItem
|
||
func (t *LandingBlockItem_Data) FromChartItem(v ChartItem) error {
|
||
b, err := json.Marshal(v)
|
||
t.union = b
|
||
return err
|
||
}
|
||
|
||
// MergeChartItem performs a merge with any union data inside the LandingBlockItem_Data, using the provided ChartItem
|
||
func (t *LandingBlockItem_Data) MergeChartItem(v ChartItem) error {
|
||
b, err := json.Marshal(v)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
|
||
merged, err := runtime.JSONMerge(t.union, b)
|
||
t.union = merged
|
||
return err
|
||
}
|
||
|
||
func (t LandingBlockItem_Data) MarshalJSON() ([]byte, error) {
|
||
b, err := t.union.MarshalJSON()
|
||
return b, err
|
||
}
|
||
|
||
func (t *LandingBlockItem_Data) UnmarshalJSON(b []byte) error {
|
||
err := t.union.UnmarshalJSON(b)
|
||
return err
|
||
}
|
||
|
||
// RequestEditorFn is the function signature for the RequestEditor callback function
|
||
type RequestEditorFn func(ctx context.Context, req *http.Request) error
|
||
|
||
// Doer performs HTTP requests.
|
||
//
|
||
// The standard http.Client implements this interface.
|
||
type HttpRequestDoer interface {
|
||
Do(req *http.Request) (*http.Response, error)
|
||
}
|
||
|
||
// Client which conforms to the OpenAPI3 specification for this service.
|
||
type Client struct {
|
||
// The endpoint of the server conforming to this interface, with scheme,
|
||
// https://api.deepmap.com for example. This can contain a path relative
|
||
// to the server, such as https://api.deepmap.com/dev-test, and all the
|
||
// paths in the swagger spec will be appended to the server.
|
||
Server string
|
||
|
||
// Doer for performing requests, typically a *http.Client with any
|
||
// customized settings, such as certificate chains.
|
||
Client HttpRequestDoer
|
||
|
||
// A list of callbacks for modifying requests which are generated before sending over
|
||
// the network.
|
||
RequestEditors []RequestEditorFn
|
||
}
|
||
|
||
// ClientOption allows setting custom parameters during construction
|
||
type ClientOption func(*Client) error
|
||
|
||
// Creates a new Client, with reasonable defaults
|
||
func NewClient(server string, opts ...ClientOption) (*Client, error) {
|
||
// create a client with sane default values
|
||
client := Client{
|
||
Server: server,
|
||
}
|
||
// mutate client and add all optional params
|
||
for _, o := range opts {
|
||
if err := o(&client); err != nil {
|
||
return nil, err
|
||
}
|
||
}
|
||
// ensure the server URL always has a trailing slash
|
||
if !strings.HasSuffix(client.Server, "/") {
|
||
client.Server += "/"
|
||
}
|
||
// create httpClient, if not already present
|
||
if client.Client == nil {
|
||
client.Client = &http.Client{}
|
||
}
|
||
return &client, nil
|
||
}
|
||
|
||
// WithHTTPClient allows overriding the default Doer, which is
|
||
// automatically created using http.Client. This is useful for tests.
|
||
func WithHTTPClient(doer HttpRequestDoer) ClientOption {
|
||
return func(c *Client) error {
|
||
c.Client = doer
|
||
return nil
|
||
}
|
||
}
|
||
|
||
// WithRequestEditorFn allows setting up a callback function, which will be
|
||
// called right before sending the request. This can be used to mutate the request.
|
||
func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
|
||
return func(c *Client) error {
|
||
c.RequestEditors = append(c.RequestEditors, fn)
|
||
return nil
|
||
}
|
||
}
|
||
|
||
// The interface specification for the client above.
|
||
type ClientInterface interface {
|
||
// ActivatePromoCodeWithBody request with any body
|
||
ActivatePromoCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
ActivatePromoCodeWithFormdataBody(ctx context.Context, body ActivatePromoCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetAccountExperiments request
|
||
GetAccountExperiments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetAccountSettings request
|
||
GetAccountSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// ChangeAccountSettingsWithBody request with any body
|
||
ChangeAccountSettingsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
ChangeAccountSettingsWithFormdataBody(ctx context.Context, body ChangeAccountSettingsFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetAccountStatus request
|
||
GetAccountStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetAlbumsByIdsWithBody request with any body
|
||
GetAlbumsByIdsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
GetAlbumsByIdsWithFormdataBody(ctx context.Context, body GetAlbumsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetAlbumById request
|
||
GetAlbumById(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetAlbumsWithTracks request
|
||
GetAlbumsWithTracks(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetArtistsArtistIdBriefInfo request
|
||
GetArtistsArtistIdBriefInfo(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetArtistsArtistIdDirectAlbums request
|
||
GetArtistsArtistIdDirectAlbums(ctx context.Context, artistId string, params *GetArtistsArtistIdDirectAlbumsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetPopularTracks request
|
||
GetPopularTracks(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetArtistTracks request
|
||
GetArtistTracks(ctx context.Context, artistId string, params *GetArtistTracksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetFeed request
|
||
GetFeed(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetFeedWizardIsPassed request
|
||
GetFeedWizardIsPassed(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetGenres request
|
||
GetGenres(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetLandingBlocks request
|
||
GetLandingBlocks(ctx context.Context, params *GetLandingBlocksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetChart request
|
||
GetChart(ctx context.Context, chartType string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetNewPlaylists request
|
||
GetNewPlaylists(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetNewReleases request
|
||
GetNewReleases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetNewPodcasts request
|
||
GetNewPodcasts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetLandingBlock request
|
||
GetLandingBlock(ctx context.Context, landingBlock string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetBooksAndPodcasts request
|
||
GetBooksAndPodcasts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetPermissionAlerts request
|
||
GetPermissionAlerts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// PlayAudioWithBody request with any body
|
||
PlayAudioWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
PlayAudioWithFormdataBody(ctx context.Context, body PlayAudioFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetPlaylistsByIdsWithBody request with any body
|
||
GetPlaylistsByIdsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
GetPlaylistsByIdsWithFormdataBody(ctx context.Context, body GetPlaylistsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetQueues request
|
||
GetQueues(ctx context.Context, params *GetQueuesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetQueueById request
|
||
GetQueueById(ctx context.Context, queueId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// UpdateQueuePosition request
|
||
UpdateQueuePosition(ctx context.Context, queueId string, params *UpdateQueuePositionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetRotorAccountStatus request
|
||
GetRotorAccountStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// SendStationFeedbackWithBody request with any body
|
||
SendStationFeedbackWithBody(ctx context.Context, stationId string, params *SendStationFeedbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
SendStationFeedback(ctx context.Context, stationId string, params *SendStationFeedbackParams, body SendStationFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetStationInfo request
|
||
GetStationInfo(ctx context.Context, stationId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetStationTracks request
|
||
GetStationTracks(ctx context.Context, stationId string, params *GetStationTracksParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetRotorStationsDashboard request
|
||
GetRotorStationsDashboard(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetStationsList request
|
||
GetStationsList(ctx context.Context, params *GetStationsListParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// Search request
|
||
Search(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetSearchSuggest request
|
||
GetSearchSuggest(ctx context.Context, params *GetSearchSuggestParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetSettings request
|
||
GetSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetPlaylistsIdsByTag request
|
||
GetPlaylistsIdsByTag(ctx context.Context, tagId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetTokenWithBody request with any body
|
||
GetTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
GetTokenWithFormdataBody(ctx context.Context, body GetTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetTracksWithBody request with any body
|
||
GetTracksWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
GetTracksWithFormdataBody(ctx context.Context, body GetTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetDownloadInfo request
|
||
GetDownloadInfo(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetTrackLyrics request
|
||
GetTrackLyrics(ctx context.Context, trackId string, params *GetTrackLyricsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetSimilarTracks request
|
||
GetSimilarTracks(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetTrackSupplement request
|
||
GetTrackSupplement(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetDislikedTracksIds request
|
||
GetDislikedTracksIds(ctx context.Context, userId float32, params *GetDislikedTracksIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetLikedTracksIds request
|
||
GetLikedTracksIds(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// LikeTracksWithBody request with any body
|
||
LikeTracksWithBody(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
LikeTracksWithFormdataBody(ctx context.Context, userId float32, body LikeTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// RemoveLikedTracksWithBody request with any body
|
||
RemoveLikedTracksWithBody(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
RemoveLikedTracksWithFormdataBody(ctx context.Context, userId float32, body RemoveLikedTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetUserPlaylistsByIds request
|
||
GetUserPlaylistsByIds(ctx context.Context, userId float32, params *GetUserPlaylistsByIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// CreatePlaylistWithBody request with any body
|
||
CreatePlaylistWithBody(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
CreatePlaylistWithFormdataBody(ctx context.Context, userId float32, body CreatePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetPlayLists request
|
||
GetPlayLists(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetPlaylistById request
|
||
GetPlaylistById(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// ChangePlaylistTracksWithBody request with any body
|
||
ChangePlaylistTracksWithBody(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
ChangePlaylistTracksWithFormdataBody(ctx context.Context, userId float32, kind float32, body ChangePlaylistTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// DeletePlaylist request
|
||
DeletePlaylist(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// RenamePlaylistWithBody request with any body
|
||
RenamePlaylistWithBody(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
RenamePlaylistWithFormdataBody(ctx context.Context, userId float32, kind float32, body RenamePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// GetRecommendations request
|
||
GetRecommendations(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
// ChangePlaylistVisibilityWithBody request with any body
|
||
ChangePlaylistVisibilityWithBody(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
|
||
ChangePlaylistVisibilityWithFormdataBody(ctx context.Context, userId float32, kind float32, body ChangePlaylistVisibilityFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
|
||
}
|
||
|
||
func (c *Client) ActivatePromoCodeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewActivatePromoCodeRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ActivatePromoCodeWithFormdataBody(ctx context.Context, body ActivatePromoCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewActivatePromoCodeRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAccountExperiments(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAccountExperimentsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAccountSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAccountSettingsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ChangeAccountSettingsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewChangeAccountSettingsRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ChangeAccountSettingsWithFormdataBody(ctx context.Context, body ChangeAccountSettingsFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewChangeAccountSettingsRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAccountStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAccountStatusRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAlbumsByIdsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAlbumsByIdsRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAlbumsByIdsWithFormdataBody(ctx context.Context, body GetAlbumsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAlbumsByIdsRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAlbumById(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAlbumByIdRequest(c.Server, albumId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetAlbumsWithTracks(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetAlbumsWithTracksRequest(c.Server, albumId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetArtistsArtistIdBriefInfo(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetArtistsArtistIdBriefInfoRequest(c.Server, artistId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetArtistsArtistIdDirectAlbums(ctx context.Context, artistId string, params *GetArtistsArtistIdDirectAlbumsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetArtistsArtistIdDirectAlbumsRequest(c.Server, artistId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPopularTracks(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPopularTracksRequest(c.Server, artistId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetArtistTracks(ctx context.Context, artistId string, params *GetArtistTracksParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetArtistTracksRequest(c.Server, artistId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetFeed(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetFeedRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetFeedWizardIsPassed(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetFeedWizardIsPassedRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetGenres(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetGenresRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetLandingBlocks(ctx context.Context, params *GetLandingBlocksParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetLandingBlocksRequest(c.Server, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetChart(ctx context.Context, chartType string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetChartRequest(c.Server, chartType)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetNewPlaylists(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetNewPlaylistsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetNewReleases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetNewReleasesRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetNewPodcasts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetNewPodcastsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetLandingBlock(ctx context.Context, landingBlock string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetLandingBlockRequest(c.Server, landingBlock)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetBooksAndPodcasts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetBooksAndPodcastsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPermissionAlerts(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPermissionAlertsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) PlayAudioWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewPlayAudioRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) PlayAudioWithFormdataBody(ctx context.Context, body PlayAudioFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewPlayAudioRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPlaylistsByIdsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPlaylistsByIdsRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPlaylistsByIdsWithFormdataBody(ctx context.Context, body GetPlaylistsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPlaylistsByIdsRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetQueues(ctx context.Context, params *GetQueuesParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetQueuesRequest(c.Server, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetQueueById(ctx context.Context, queueId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetQueueByIdRequest(c.Server, queueId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) UpdateQueuePosition(ctx context.Context, queueId string, params *UpdateQueuePositionParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewUpdateQueuePositionRequest(c.Server, queueId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetRotorAccountStatus(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetRotorAccountStatusRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) SendStationFeedbackWithBody(ctx context.Context, stationId string, params *SendStationFeedbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewSendStationFeedbackRequestWithBody(c.Server, stationId, params, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) SendStationFeedback(ctx context.Context, stationId string, params *SendStationFeedbackParams, body SendStationFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewSendStationFeedbackRequest(c.Server, stationId, params, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetStationInfo(ctx context.Context, stationId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetStationInfoRequest(c.Server, stationId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetStationTracks(ctx context.Context, stationId string, params *GetStationTracksParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetStationTracksRequest(c.Server, stationId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetRotorStationsDashboard(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetRotorStationsDashboardRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetStationsList(ctx context.Context, params *GetStationsListParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetStationsListRequest(c.Server, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) Search(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewSearchRequest(c.Server, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetSearchSuggest(ctx context.Context, params *GetSearchSuggestParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetSearchSuggestRequest(c.Server, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetSettings(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetSettingsRequest(c.Server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPlaylistsIdsByTag(ctx context.Context, tagId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPlaylistsIdsByTagRequest(c.Server, tagId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetTokenWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetTokenRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetTokenWithFormdataBody(ctx context.Context, body GetTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetTokenRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetTracksWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetTracksRequestWithBody(c.Server, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetTracksWithFormdataBody(ctx context.Context, body GetTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetTracksRequestWithFormdataBody(c.Server, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetDownloadInfo(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetDownloadInfoRequest(c.Server, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetTrackLyrics(ctx context.Context, trackId string, params *GetTrackLyricsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetTrackLyricsRequest(c.Server, trackId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetSimilarTracks(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetSimilarTracksRequest(c.Server, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetTrackSupplement(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetTrackSupplementRequest(c.Server, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetDislikedTracksIds(ctx context.Context, userId float32, params *GetDislikedTracksIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetDislikedTracksIdsRequest(c.Server, userId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetLikedTracksIds(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetLikedTracksIdsRequest(c.Server, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) LikeTracksWithBody(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewLikeTracksRequestWithBody(c.Server, userId, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) LikeTracksWithFormdataBody(ctx context.Context, userId float32, body LikeTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewLikeTracksRequestWithFormdataBody(c.Server, userId, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) RemoveLikedTracksWithBody(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewRemoveLikedTracksRequestWithBody(c.Server, userId, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) RemoveLikedTracksWithFormdataBody(ctx context.Context, userId float32, body RemoveLikedTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewRemoveLikedTracksRequestWithFormdataBody(c.Server, userId, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetUserPlaylistsByIds(ctx context.Context, userId float32, params *GetUserPlaylistsByIdsParams, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetUserPlaylistsByIdsRequest(c.Server, userId, params)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) CreatePlaylistWithBody(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewCreatePlaylistRequestWithBody(c.Server, userId, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) CreatePlaylistWithFormdataBody(ctx context.Context, userId float32, body CreatePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewCreatePlaylistRequestWithFormdataBody(c.Server, userId, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPlayLists(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPlayListsRequest(c.Server, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetPlaylistById(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetPlaylistByIdRequest(c.Server, userId, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ChangePlaylistTracksWithBody(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewChangePlaylistTracksRequestWithBody(c.Server, userId, kind, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ChangePlaylistTracksWithFormdataBody(ctx context.Context, userId float32, kind float32, body ChangePlaylistTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewChangePlaylistTracksRequestWithFormdataBody(c.Server, userId, kind, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) DeletePlaylist(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewDeletePlaylistRequest(c.Server, userId, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) RenamePlaylistWithBody(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewRenamePlaylistRequestWithBody(c.Server, userId, kind, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) RenamePlaylistWithFormdataBody(ctx context.Context, userId float32, kind float32, body RenamePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewRenamePlaylistRequestWithFormdataBody(c.Server, userId, kind, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) GetRecommendations(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewGetRecommendationsRequest(c.Server, userId, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ChangePlaylistVisibilityWithBody(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewChangePlaylistVisibilityRequestWithBody(c.Server, userId, kind, contentType, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
func (c *Client) ChangePlaylistVisibilityWithFormdataBody(ctx context.Context, userId float32, kind float32, body ChangePlaylistVisibilityFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) {
|
||
req, err := NewChangePlaylistVisibilityRequestWithFormdataBody(c.Server, userId, kind, body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
req = req.WithContext(ctx)
|
||
if err := c.applyEditors(ctx, req, reqEditors); err != nil {
|
||
return nil, err
|
||
}
|
||
return c.Client.Do(req)
|
||
}
|
||
|
||
// NewActivatePromoCodeRequestWithFormdataBody calls the generic ActivatePromoCode builder with application/x-www-form-urlencoded body
|
||
func NewActivatePromoCodeRequestWithFormdataBody(server string, body ActivatePromoCodeFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewActivatePromoCodeRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewActivatePromoCodeRequestWithBody generates requests for ActivatePromoCode with any type of body
|
||
func NewActivatePromoCodeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/account/consume-promo-code")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetAccountExperimentsRequest generates requests for GetAccountExperiments
|
||
func NewGetAccountExperimentsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/account/experiments")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetAccountSettingsRequest generates requests for GetAccountSettings
|
||
func NewGetAccountSettingsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/account/settings")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewChangeAccountSettingsRequestWithFormdataBody calls the generic ChangeAccountSettings builder with application/x-www-form-urlencoded body
|
||
func NewChangeAccountSettingsRequestWithFormdataBody(server string, body ChangeAccountSettingsFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewChangeAccountSettingsRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewChangeAccountSettingsRequestWithBody generates requests for ChangeAccountSettings with any type of body
|
||
func NewChangeAccountSettingsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/account/settings")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetAccountStatusRequest generates requests for GetAccountStatus
|
||
func NewGetAccountStatusRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/account/status")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetAlbumsByIdsRequestWithFormdataBody calls the generic GetAlbumsByIds builder with application/x-www-form-urlencoded body
|
||
func NewGetAlbumsByIdsRequestWithFormdataBody(server string, body GetAlbumsByIdsFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewGetAlbumsByIdsRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewGetAlbumsByIdsRequestWithBody generates requests for GetAlbumsByIds with any type of body
|
||
func NewGetAlbumsByIdsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/albums")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetAlbumByIdRequest generates requests for GetAlbumById
|
||
func NewGetAlbumByIdRequest(server string, albumId float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "albumId", runtime.ParamLocationPath, albumId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/albums/%s/", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetAlbumsWithTracksRequest generates requests for GetAlbumsWithTracks
|
||
func NewGetAlbumsWithTracksRequest(server string, albumId float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "albumId", runtime.ParamLocationPath, albumId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/albums/%s/with-tracks", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetArtistsArtistIdBriefInfoRequest generates requests for GetArtistsArtistIdBriefInfo
|
||
func NewGetArtistsArtistIdBriefInfoRequest(server string, artistId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "artistId", runtime.ParamLocationPath, artistId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/artists/%s/brief-info", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetArtistsArtistIdDirectAlbumsRequest generates requests for GetArtistsArtistIdDirectAlbums
|
||
func NewGetArtistsArtistIdDirectAlbumsRequest(server string, artistId string, params *GetArtistsArtistIdDirectAlbumsParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "artistId", runtime.ParamLocationPath, artistId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/artists/%s/direct-albums", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.Page != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
if params.PageSize != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page-size", runtime.ParamLocationQuery, *params.PageSize); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
if params.SortBy != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sort-by", runtime.ParamLocationQuery, *params.SortBy); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetPopularTracksRequest generates requests for GetPopularTracks
|
||
func NewGetPopularTracksRequest(server string, artistId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "artistId", runtime.ParamLocationPath, artistId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/artists/%s/track-ids-by-rating", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetArtistTracksRequest generates requests for GetArtistTracks
|
||
func NewGetArtistTracksRequest(server string, artistId string, params *GetArtistTracksParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "artistId", runtime.ParamLocationPath, artistId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/artists/%s/tracks", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.Page != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
if params.PageSize != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page-size", runtime.ParamLocationQuery, *params.PageSize); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetFeedRequest generates requests for GetFeed
|
||
func NewGetFeedRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/feed")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetFeedWizardIsPassedRequest generates requests for GetFeedWizardIsPassed
|
||
func NewGetFeedWizardIsPassedRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/feed/wizard/is-passed")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetGenresRequest generates requests for GetGenres
|
||
func NewGetGenresRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/genres")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetLandingBlocksRequest generates requests for GetLandingBlocks
|
||
func NewGetLandingBlocksRequest(server string, params *GetLandingBlocksParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/landing3")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.Blocks != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "blocks", runtime.ParamLocationQuery, *params.Blocks); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetChartRequest generates requests for GetChart
|
||
func NewGetChartRequest(server string, chartType string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "chartType", runtime.ParamLocationPath, chartType)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/landing3/chart/%s", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetNewPlaylistsRequest generates requests for GetNewPlaylists
|
||
func NewGetNewPlaylistsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/landing3/new-playlists")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetNewReleasesRequest generates requests for GetNewReleases
|
||
func NewGetNewReleasesRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/landing3/new-releases")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetNewPodcastsRequest generates requests for GetNewPodcasts
|
||
func NewGetNewPodcastsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/landing3/podcasts")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetLandingBlockRequest generates requests for GetLandingBlock
|
||
func NewGetLandingBlockRequest(server string, landingBlock string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "landingBlock", runtime.ParamLocationPath, landingBlock)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/landing3/%s", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetBooksAndPodcastsRequest generates requests for GetBooksAndPodcasts
|
||
func NewGetBooksAndPodcastsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/non-music/calague")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetPermissionAlertsRequest generates requests for GetPermissionAlerts
|
||
func NewGetPermissionAlertsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/permission-alerts")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewPlayAudioRequestWithFormdataBody calls the generic PlayAudio builder with application/x-www-form-urlencoded body
|
||
func NewPlayAudioRequestWithFormdataBody(server string, body PlayAudioFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewPlayAudioRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewPlayAudioRequestWithBody generates requests for PlayAudio with any type of body
|
||
func NewPlayAudioRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/play-audio")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetPlaylistsByIdsRequestWithFormdataBody calls the generic GetPlaylistsByIds builder with application/x-www-form-urlencoded body
|
||
func NewGetPlaylistsByIdsRequestWithFormdataBody(server string, body GetPlaylistsByIdsFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewGetPlaylistsByIdsRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewGetPlaylistsByIdsRequestWithBody generates requests for GetPlaylistsByIds with any type of body
|
||
func NewGetPlaylistsByIdsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/playlists/list")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetQueuesRequest generates requests for GetQueues
|
||
func NewGetQueuesRequest(server string, params *GetQueuesParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/queues")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
|
||
var headerParam0 string
|
||
|
||
headerParam0, err = runtime.StyleParamWithLocation("simple", false, "X-Yandex-Music-Device", runtime.ParamLocationHeader, params.XYandexMusicDevice)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Set("X-Yandex-Music-Device", headerParam0)
|
||
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetQueueByIdRequest generates requests for GetQueueById
|
||
func NewGetQueueByIdRequest(server string, queueId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "queueId", runtime.ParamLocationPath, queueId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/queues/%s", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewUpdateQueuePositionRequest generates requests for UpdateQueuePosition
|
||
func NewUpdateQueuePositionRequest(server string, queueId string, params *UpdateQueuePositionParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "queueId", runtime.ParamLocationPath, queueId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/queues/%s/update-position", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "currentIndex", runtime.ParamLocationQuery, params.CurrentIndex); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "IsInteractive", runtime.ParamLocationQuery, params.IsInteractive); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetRotorAccountStatusRequest generates requests for GetRotorAccountStatus
|
||
func NewGetRotorAccountStatusRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/rotor/account/status")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewSendStationFeedbackRequest calls the generic SendStationFeedback builder with application/json body
|
||
func NewSendStationFeedbackRequest(server string, stationId string, params *SendStationFeedbackParams, body SendStationFeedbackJSONRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
buf, err := json.Marshal(body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = bytes.NewReader(buf)
|
||
return NewSendStationFeedbackRequestWithBody(server, stationId, params, "application/json", bodyReader)
|
||
}
|
||
|
||
// NewSendStationFeedbackRequestWithBody generates requests for SendStationFeedback with any type of body
|
||
func NewSendStationFeedbackRequestWithBody(server string, stationId string, params *SendStationFeedbackParams, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "stationId", runtime.ParamLocationPath, stationId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/rotor/station/%s/feedback", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.BatchId != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "batch-id", runtime.ParamLocationQuery, *params.BatchId); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetStationInfoRequest generates requests for GetStationInfo
|
||
func NewGetStationInfoRequest(server string, stationId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "stationId", runtime.ParamLocationPath, stationId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/rotor/station/%s/info", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetStationTracksRequest generates requests for GetStationTracks
|
||
func NewGetStationTracksRequest(server string, stationId string, params *GetStationTracksParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "stationId", runtime.ParamLocationPath, stationId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/rotor/station/%s/tracks", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.Settings2 != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "settings2", runtime.ParamLocationQuery, *params.Settings2); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
if params.Queue != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "queue", runtime.ParamLocationQuery, *params.Queue); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetRotorStationsDashboardRequest generates requests for GetRotorStationsDashboard
|
||
func NewGetRotorStationsDashboardRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/rotor/stations/dashboard")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetStationsListRequest generates requests for GetStationsList
|
||
func NewGetStationsListRequest(server string, params *GetStationsListParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/rotor/stations/list")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.Language != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "language", runtime.ParamLocationQuery, *params.Language); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewSearchRequest generates requests for Search
|
||
func NewSearchRequest(server string, params *SearchParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/search")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "text", runtime.ParamLocationQuery, params.Text); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, params.Page); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "type", runtime.ParamLocationQuery, params.Type); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
if params.Nococrrect != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "nococrrect", runtime.ParamLocationQuery, *params.Nococrrect); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetSearchSuggestRequest generates requests for GetSearchSuggest
|
||
func NewGetSearchSuggestRequest(server string, params *GetSearchSuggestParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/search/suggest")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "part", runtime.ParamLocationQuery, params.Part); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetSettingsRequest generates requests for GetSettings
|
||
func NewGetSettingsRequest(server string) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/settings")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetPlaylistsIdsByTagRequest generates requests for GetPlaylistsIdsByTag
|
||
func NewGetPlaylistsIdsByTagRequest(server string, tagId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "tagId", runtime.ParamLocationPath, tagId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/tags/%s/playlist-ids", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetTokenRequestWithFormdataBody calls the generic GetToken builder with application/x-www-form-urlencoded body
|
||
func NewGetTokenRequestWithFormdataBody(server string, body GetTokenFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewGetTokenRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewGetTokenRequestWithBody generates requests for GetToken with any type of body
|
||
func NewGetTokenRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/token")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetTracksRequestWithFormdataBody calls the generic GetTracks builder with application/x-www-form-urlencoded body
|
||
func NewGetTracksRequestWithFormdataBody(server string, body GetTracksFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewGetTracksRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewGetTracksRequestWithBody generates requests for GetTracks with any type of body
|
||
func NewGetTracksRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/tracks/")
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetDownloadInfoRequest generates requests for GetDownloadInfo
|
||
func NewGetDownloadInfoRequest(server string, trackId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "trackId", runtime.ParamLocationPath, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/tracks/%s/download-info", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetTrackLyricsRequest generates requests for GetTrackLyrics
|
||
func NewGetTrackLyricsRequest(server string, trackId string, params *GetTrackLyricsParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "trackId", runtime.ParamLocationPath, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/tracks/%s/lyrics", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.Format != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "format", runtime.ParamLocationQuery, *params.Format); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
if params.TimeStamp != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "timeStamp", runtime.ParamLocationQuery, *params.TimeStamp); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
if params.Sign != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "sign", runtime.ParamLocationQuery, *params.Sign); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetSimilarTracksRequest generates requests for GetSimilarTracks
|
||
func NewGetSimilarTracksRequest(server string, trackId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "trackId", runtime.ParamLocationPath, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/tracks/%s/similar", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetTrackSupplementRequest generates requests for GetTrackSupplement
|
||
func NewGetTrackSupplementRequest(server string, trackId string) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "trackId", runtime.ParamLocationPath, trackId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/tracks/%s/supplement", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetDislikedTracksIdsRequest generates requests for GetDislikedTracksIds
|
||
func NewGetDislikedTracksIdsRequest(server string, userId float32, params *GetDislikedTracksIdsParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/dislikes/tracks", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if params.IfModifiedSinceRevision != nil {
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "if_modified_since_revision", runtime.ParamLocationQuery, *params.IfModifiedSinceRevision); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetLikedTracksIdsRequest generates requests for GetLikedTracksIds
|
||
func NewGetLikedTracksIdsRequest(server string, userId float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/likes/tracks", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewLikeTracksRequestWithFormdataBody calls the generic LikeTracks builder with application/x-www-form-urlencoded body
|
||
func NewLikeTracksRequestWithFormdataBody(server string, userId float32, body LikeTracksFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewLikeTracksRequestWithBody(server, userId, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewLikeTracksRequestWithBody generates requests for LikeTracks with any type of body
|
||
func NewLikeTracksRequestWithBody(server string, userId float32, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/likes/tracks/add-multiple", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewRemoveLikedTracksRequestWithFormdataBody calls the generic RemoveLikedTracks builder with application/x-www-form-urlencoded body
|
||
func NewRemoveLikedTracksRequestWithFormdataBody(server string, userId float32, body RemoveLikedTracksFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewRemoveLikedTracksRequestWithBody(server, userId, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewRemoveLikedTracksRequestWithBody generates requests for RemoveLikedTracks with any type of body
|
||
func NewRemoveLikedTracksRequestWithBody(server string, userId float32, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/likes/tracks/remove", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetUserPlaylistsByIdsRequest generates requests for GetUserPlaylistsByIds
|
||
func NewGetUserPlaylistsByIdsRequest(server string, userId float32, params *GetUserPlaylistsByIdsParams) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
if params != nil {
|
||
queryValues := queryURL.Query()
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "kinds", runtime.ParamLocationQuery, params.Kinds); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "mixed", runtime.ParamLocationQuery, params.Mixed); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
if queryFrag, err := runtime.StyleParamWithLocation("form", true, "rich-tracks", runtime.ParamLocationQuery, params.RichTracks); err != nil {
|
||
return nil, err
|
||
} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
|
||
return nil, err
|
||
} else {
|
||
for k, v := range parsed {
|
||
for _, v2 := range v {
|
||
queryValues.Add(k, v2)
|
||
}
|
||
}
|
||
}
|
||
|
||
queryURL.RawQuery = queryValues.Encode()
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewCreatePlaylistRequestWithFormdataBody calls the generic CreatePlaylist builder with application/x-www-form-urlencoded body
|
||
func NewCreatePlaylistRequestWithFormdataBody(server string, userId float32, body CreatePlaylistFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewCreatePlaylistRequestWithBody(server, userId, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewCreatePlaylistRequestWithBody generates requests for CreatePlaylist with any type of body
|
||
func NewCreatePlaylistRequestWithBody(server string, userId float32, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/create", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetPlayListsRequest generates requests for GetPlayLists
|
||
func NewGetPlayListsRequest(server string, userId float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/list", pathParam0)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetPlaylistByIdRequest generates requests for GetPlaylistById
|
||
func NewGetPlaylistByIdRequest(server string, userId float32, kind float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
var pathParam1 string
|
||
|
||
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/%s", pathParam0, pathParam1)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewChangePlaylistTracksRequestWithFormdataBody calls the generic ChangePlaylistTracks builder with application/x-www-form-urlencoded body
|
||
func NewChangePlaylistTracksRequestWithFormdataBody(server string, userId float32, kind float32, body ChangePlaylistTracksFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewChangePlaylistTracksRequestWithBody(server, userId, kind, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewChangePlaylistTracksRequestWithBody generates requests for ChangePlaylistTracks with any type of body
|
||
func NewChangePlaylistTracksRequestWithBody(server string, userId float32, kind float32, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
var pathParam1 string
|
||
|
||
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/%s/change-relative", pathParam0, pathParam1)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewDeletePlaylistRequest generates requests for DeletePlaylist
|
||
func NewDeletePlaylistRequest(server string, userId float32, kind float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
var pathParam1 string
|
||
|
||
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/%s/delete", pathParam0, pathParam1)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewRenamePlaylistRequestWithFormdataBody calls the generic RenamePlaylist builder with application/x-www-form-urlencoded body
|
||
func NewRenamePlaylistRequestWithFormdataBody(server string, userId float32, kind float32, body RenamePlaylistFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewRenamePlaylistRequestWithBody(server, userId, kind, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewRenamePlaylistRequestWithBody generates requests for RenamePlaylist with any type of body
|
||
func NewRenamePlaylistRequestWithBody(server string, userId float32, kind float32, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
var pathParam1 string
|
||
|
||
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/%s/name", pathParam0, pathParam1)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewGetRecommendationsRequest generates requests for GetRecommendations
|
||
func NewGetRecommendationsRequest(server string, userId float32, kind float32) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
var pathParam1 string
|
||
|
||
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/%s/recommendations", pathParam0, pathParam1)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("GET", queryURL.String(), nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
return req, nil
|
||
}
|
||
|
||
// NewChangePlaylistVisibilityRequestWithFormdataBody calls the generic ChangePlaylistVisibility builder with application/x-www-form-urlencoded body
|
||
func NewChangePlaylistVisibilityRequestWithFormdataBody(server string, userId float32, kind float32, body ChangePlaylistVisibilityFormdataRequestBody) (*http.Request, error) {
|
||
var bodyReader io.Reader
|
||
bodyStr, err := runtime.MarshalForm(body, nil)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
bodyReader = strings.NewReader(bodyStr.Encode())
|
||
return NewChangePlaylistVisibilityRequestWithBody(server, userId, kind, "application/x-www-form-urlencoded", bodyReader)
|
||
}
|
||
|
||
// NewChangePlaylistVisibilityRequestWithBody generates requests for ChangePlaylistVisibility with any type of body
|
||
func NewChangePlaylistVisibilityRequestWithBody(server string, userId float32, kind float32, contentType string, body io.Reader) (*http.Request, error) {
|
||
var err error
|
||
|
||
var pathParam0 string
|
||
|
||
pathParam0, err = runtime.StyleParamWithLocation("simple", false, "userId", runtime.ParamLocationPath, userId)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
var pathParam1 string
|
||
|
||
pathParam1, err = runtime.StyleParamWithLocation("simple", false, "kind", runtime.ParamLocationPath, kind)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
serverURL, err := url.Parse(server)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
operationPath := fmt.Sprintf("/users/%s/playlists/%s/visibility", pathParam0, pathParam1)
|
||
if operationPath[0] == '/' {
|
||
operationPath = "." + operationPath
|
||
}
|
||
|
||
queryURL, err := serverURL.Parse(operationPath)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req, err := http.NewRequest("POST", queryURL.String(), body)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
req.Header.Add("Content-Type", contentType)
|
||
|
||
return req, nil
|
||
}
|
||
|
||
func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error {
|
||
for _, r := range c.RequestEditors {
|
||
if err := r(ctx, req); err != nil {
|
||
return err
|
||
}
|
||
}
|
||
for _, r := range additionalEditors {
|
||
if err := r(ctx, req); err != nil {
|
||
return err
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// ClientWithResponses builds on ClientInterface to offer response payloads
|
||
type ClientWithResponses struct {
|
||
ClientInterface
|
||
}
|
||
|
||
// NewClientWithResponses creates a new ClientWithResponses, which wraps
|
||
// Client with return type handling
|
||
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error) {
|
||
client, err := NewClient(server, opts...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return &ClientWithResponses{client}, nil
|
||
}
|
||
|
||
// WithBaseURL overrides the baseURL.
|
||
func WithBaseURL(baseURL string) ClientOption {
|
||
return func(c *Client) error {
|
||
newBaseURL, err := url.Parse(baseURL)
|
||
if err != nil {
|
||
return err
|
||
}
|
||
c.Server = newBaseURL.String()
|
||
return nil
|
||
}
|
||
}
|
||
|
||
// ClientWithResponsesInterface is the interface specification for the client with responses above.
|
||
type ClientWithResponsesInterface interface {
|
||
// ActivatePromoCodeWithBodyWithResponse request with any body
|
||
ActivatePromoCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePromoCodeResponse, error)
|
||
|
||
ActivatePromoCodeWithFormdataBodyWithResponse(ctx context.Context, body ActivatePromoCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*ActivatePromoCodeResponse, error)
|
||
|
||
// GetAccountExperimentsWithResponse request
|
||
GetAccountExperimentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountExperimentsResponse, error)
|
||
|
||
// GetAccountSettingsWithResponse request
|
||
GetAccountSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountSettingsResponse, error)
|
||
|
||
// ChangeAccountSettingsWithBodyWithResponse request with any body
|
||
ChangeAccountSettingsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeAccountSettingsResponse, error)
|
||
|
||
ChangeAccountSettingsWithFormdataBodyWithResponse(ctx context.Context, body ChangeAccountSettingsFormdataRequestBody, reqEditors ...RequestEditorFn) (*ChangeAccountSettingsResponse, error)
|
||
|
||
// GetAccountStatusWithResponse request
|
||
GetAccountStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountStatusResponse, error)
|
||
|
||
// GetAlbumsByIdsWithBodyWithResponse request with any body
|
||
GetAlbumsByIdsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetAlbumsByIdsResponse, error)
|
||
|
||
GetAlbumsByIdsWithFormdataBodyWithResponse(ctx context.Context, body GetAlbumsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetAlbumsByIdsResponse, error)
|
||
|
||
// GetAlbumByIdWithResponse request
|
||
GetAlbumByIdWithResponse(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*GetAlbumByIdResponse, error)
|
||
|
||
// GetAlbumsWithTracksWithResponse request
|
||
GetAlbumsWithTracksWithResponse(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*GetAlbumsWithTracksResponse, error)
|
||
|
||
// GetArtistsArtistIdBriefInfoWithResponse request
|
||
GetArtistsArtistIdBriefInfoWithResponse(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*GetArtistsArtistIdBriefInfoResponse, error)
|
||
|
||
// GetArtistsArtistIdDirectAlbumsWithResponse request
|
||
GetArtistsArtistIdDirectAlbumsWithResponse(ctx context.Context, artistId string, params *GetArtistsArtistIdDirectAlbumsParams, reqEditors ...RequestEditorFn) (*GetArtistsArtistIdDirectAlbumsResponse, error)
|
||
|
||
// GetPopularTracksWithResponse request
|
||
GetPopularTracksWithResponse(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*GetPopularTracksResponse, error)
|
||
|
||
// GetArtistTracksWithResponse request
|
||
GetArtistTracksWithResponse(ctx context.Context, artistId string, params *GetArtistTracksParams, reqEditors ...RequestEditorFn) (*GetArtistTracksResponse, error)
|
||
|
||
// GetFeedWithResponse request
|
||
GetFeedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFeedResponse, error)
|
||
|
||
// GetFeedWizardIsPassedWithResponse request
|
||
GetFeedWizardIsPassedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFeedWizardIsPassedResponse, error)
|
||
|
||
// GetGenresWithResponse request
|
||
GetGenresWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetGenresResponse, error)
|
||
|
||
// GetLandingBlocksWithResponse request
|
||
GetLandingBlocksWithResponse(ctx context.Context, params *GetLandingBlocksParams, reqEditors ...RequestEditorFn) (*GetLandingBlocksResponse, error)
|
||
|
||
// GetChartWithResponse request
|
||
GetChartWithResponse(ctx context.Context, chartType string, reqEditors ...RequestEditorFn) (*GetChartResponse, error)
|
||
|
||
// GetNewPlaylistsWithResponse request
|
||
GetNewPlaylistsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNewPlaylistsResponse, error)
|
||
|
||
// GetNewReleasesWithResponse request
|
||
GetNewReleasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNewReleasesResponse, error)
|
||
|
||
// GetNewPodcastsWithResponse request
|
||
GetNewPodcastsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNewPodcastsResponse, error)
|
||
|
||
// GetLandingBlockWithResponse request
|
||
GetLandingBlockWithResponse(ctx context.Context, landingBlock string, reqEditors ...RequestEditorFn) (*GetLandingBlockResponse, error)
|
||
|
||
// GetBooksAndPodcastsWithResponse request
|
||
GetBooksAndPodcastsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBooksAndPodcastsResponse, error)
|
||
|
||
// GetPermissionAlertsWithResponse request
|
||
GetPermissionAlertsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPermissionAlertsResponse, error)
|
||
|
||
// PlayAudioWithBodyWithResponse request with any body
|
||
PlayAudioWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PlayAudioResponse, error)
|
||
|
||
PlayAudioWithFormdataBodyWithResponse(ctx context.Context, body PlayAudioFormdataRequestBody, reqEditors ...RequestEditorFn) (*PlayAudioResponse, error)
|
||
|
||
// GetPlaylistsByIdsWithBodyWithResponse request with any body
|
||
GetPlaylistsByIdsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPlaylistsByIdsResponse, error)
|
||
|
||
GetPlaylistsByIdsWithFormdataBodyWithResponse(ctx context.Context, body GetPlaylistsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetPlaylistsByIdsResponse, error)
|
||
|
||
// GetQueuesWithResponse request
|
||
GetQueuesWithResponse(ctx context.Context, params *GetQueuesParams, reqEditors ...RequestEditorFn) (*GetQueuesResponse, error)
|
||
|
||
// GetQueueByIdWithResponse request
|
||
GetQueueByIdWithResponse(ctx context.Context, queueId string, reqEditors ...RequestEditorFn) (*GetQueueByIdResponse, error)
|
||
|
||
// UpdateQueuePositionWithResponse request
|
||
UpdateQueuePositionWithResponse(ctx context.Context, queueId string, params *UpdateQueuePositionParams, reqEditors ...RequestEditorFn) (*UpdateQueuePositionResponse, error)
|
||
|
||
// GetRotorAccountStatusWithResponse request
|
||
GetRotorAccountStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRotorAccountStatusResponse, error)
|
||
|
||
// SendStationFeedbackWithBodyWithResponse request with any body
|
||
SendStationFeedbackWithBodyWithResponse(ctx context.Context, stationId string, params *SendStationFeedbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendStationFeedbackResponse, error)
|
||
|
||
SendStationFeedbackWithResponse(ctx context.Context, stationId string, params *SendStationFeedbackParams, body SendStationFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*SendStationFeedbackResponse, error)
|
||
|
||
// GetStationInfoWithResponse request
|
||
GetStationInfoWithResponse(ctx context.Context, stationId string, reqEditors ...RequestEditorFn) (*GetStationInfoResponse, error)
|
||
|
||
// GetStationTracksWithResponse request
|
||
GetStationTracksWithResponse(ctx context.Context, stationId string, params *GetStationTracksParams, reqEditors ...RequestEditorFn) (*GetStationTracksResponse, error)
|
||
|
||
// GetRotorStationsDashboardWithResponse request
|
||
GetRotorStationsDashboardWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRotorStationsDashboardResponse, error)
|
||
|
||
// GetStationsListWithResponse request
|
||
GetStationsListWithResponse(ctx context.Context, params *GetStationsListParams, reqEditors ...RequestEditorFn) (*GetStationsListResponse, error)
|
||
|
||
// SearchWithResponse request
|
||
SearchWithResponse(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*SearchResponse, error)
|
||
|
||
// GetSearchSuggestWithResponse request
|
||
GetSearchSuggestWithResponse(ctx context.Context, params *GetSearchSuggestParams, reqEditors ...RequestEditorFn) (*GetSearchSuggestResponse, error)
|
||
|
||
// GetSettingsWithResponse request
|
||
GetSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error)
|
||
|
||
// GetPlaylistsIdsByTagWithResponse request
|
||
GetPlaylistsIdsByTagWithResponse(ctx context.Context, tagId string, reqEditors ...RequestEditorFn) (*GetPlaylistsIdsByTagResponse, error)
|
||
|
||
// GetTokenWithBodyWithResponse request with any body
|
||
GetTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTokenResponse, error)
|
||
|
||
GetTokenWithFormdataBodyWithResponse(ctx context.Context, body GetTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetTokenResponse, error)
|
||
|
||
// GetTracksWithBodyWithResponse request with any body
|
||
GetTracksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTracksResponse, error)
|
||
|
||
GetTracksWithFormdataBodyWithResponse(ctx context.Context, body GetTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetTracksResponse, error)
|
||
|
||
// GetDownloadInfoWithResponse request
|
||
GetDownloadInfoWithResponse(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*GetDownloadInfoResponse, error)
|
||
|
||
// GetTrackLyricsWithResponse request
|
||
GetTrackLyricsWithResponse(ctx context.Context, trackId string, params *GetTrackLyricsParams, reqEditors ...RequestEditorFn) (*GetTrackLyricsResponse, error)
|
||
|
||
// GetSimilarTracksWithResponse request
|
||
GetSimilarTracksWithResponse(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*GetSimilarTracksResponse, error)
|
||
|
||
// GetTrackSupplementWithResponse request
|
||
GetTrackSupplementWithResponse(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*GetTrackSupplementResponse, error)
|
||
|
||
// GetDislikedTracksIdsWithResponse request
|
||
GetDislikedTracksIdsWithResponse(ctx context.Context, userId float32, params *GetDislikedTracksIdsParams, reqEditors ...RequestEditorFn) (*GetDislikedTracksIdsResponse, error)
|
||
|
||
// GetLikedTracksIdsWithResponse request
|
||
GetLikedTracksIdsWithResponse(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*GetLikedTracksIdsResponse, error)
|
||
|
||
// LikeTracksWithBodyWithResponse request with any body
|
||
LikeTracksWithBodyWithResponse(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LikeTracksResponse, error)
|
||
|
||
LikeTracksWithFormdataBodyWithResponse(ctx context.Context, userId float32, body LikeTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*LikeTracksResponse, error)
|
||
|
||
// RemoveLikedTracksWithBodyWithResponse request with any body
|
||
RemoveLikedTracksWithBodyWithResponse(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveLikedTracksResponse, error)
|
||
|
||
RemoveLikedTracksWithFormdataBodyWithResponse(ctx context.Context, userId float32, body RemoveLikedTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*RemoveLikedTracksResponse, error)
|
||
|
||
// GetUserPlaylistsByIdsWithResponse request
|
||
GetUserPlaylistsByIdsWithResponse(ctx context.Context, userId float32, params *GetUserPlaylistsByIdsParams, reqEditors ...RequestEditorFn) (*GetUserPlaylistsByIdsResponse, error)
|
||
|
||
// CreatePlaylistWithBodyWithResponse request with any body
|
||
CreatePlaylistWithBodyWithResponse(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePlaylistResponse, error)
|
||
|
||
CreatePlaylistWithFormdataBodyWithResponse(ctx context.Context, userId float32, body CreatePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*CreatePlaylistResponse, error)
|
||
|
||
// GetPlayListsWithResponse request
|
||
GetPlayListsWithResponse(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*GetPlayListsResponse, error)
|
||
|
||
// GetPlaylistByIdWithResponse request
|
||
GetPlaylistByIdWithResponse(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*GetPlaylistByIdResponse, error)
|
||
|
||
// ChangePlaylistTracksWithBodyWithResponse request with any body
|
||
ChangePlaylistTracksWithBodyWithResponse(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePlaylistTracksResponse, error)
|
||
|
||
ChangePlaylistTracksWithFormdataBodyWithResponse(ctx context.Context, userId float32, kind float32, body ChangePlaylistTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*ChangePlaylistTracksResponse, error)
|
||
|
||
// DeletePlaylistWithResponse request
|
||
DeletePlaylistWithResponse(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*DeletePlaylistResponse, error)
|
||
|
||
// RenamePlaylistWithBodyWithResponse request with any body
|
||
RenamePlaylistWithBodyWithResponse(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenamePlaylistResponse, error)
|
||
|
||
RenamePlaylistWithFormdataBodyWithResponse(ctx context.Context, userId float32, kind float32, body RenamePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*RenamePlaylistResponse, error)
|
||
|
||
// GetRecommendationsWithResponse request
|
||
GetRecommendationsWithResponse(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*GetRecommendationsResponse, error)
|
||
|
||
// ChangePlaylistVisibilityWithBodyWithResponse request with any body
|
||
ChangePlaylistVisibilityWithBodyWithResponse(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePlaylistVisibilityResponse, error)
|
||
|
||
ChangePlaylistVisibilityWithFormdataBodyWithResponse(ctx context.Context, userId float32, kind float32, body ChangePlaylistVisibilityFormdataRequestBody, reqEditors ...RequestEditorFn) (*ChangePlaylistVisibilityResponse, error)
|
||
}
|
||
|
||
type ActivatePromoCodeResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result статус активации промо-кода
|
||
Result PromoCodeStatus `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r ActivatePromoCodeResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r ActivatePromoCodeResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetAccountExperimentsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result режимы экспериментальных функций
|
||
Result Experiments `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetAccountExperimentsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetAccountExperimentsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetAccountSettingsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result UserSettings `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetAccountSettingsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetAccountSettingsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type ChangeAccountSettingsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result ChangeAccountSettings_200_Result `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
type ChangeAccountSettings200Result1 = string
|
||
type ChangeAccountSettings_200_Result struct {
|
||
union json.RawMessage
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r ChangeAccountSettingsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r ChangeAccountSettingsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetAccountStatusResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result Status `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetAccountStatusResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetAccountStatusResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetAlbumsByIdsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Album `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetAlbumsByIdsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetAlbumsByIdsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetAlbumByIdResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result Album `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetAlbumByIdResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetAlbumByIdResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetAlbumsWithTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result Album `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetAlbumsWithTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetAlbumsWithTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetArtistsArtistIdBriefInfoResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetArtistsArtistIdBriefInfoResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetArtistsArtistIdBriefInfoResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetArtistsArtistIdDirectAlbumsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetArtistsArtistIdDirectAlbumsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetArtistsArtistIdDirectAlbumsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetPopularTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Artist Artist `json:"artist"`
|
||
Tracks []string `json:"tracks"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetPopularTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetPopularTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetArtistTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetArtistTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetArtistTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetFeedResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
CanGetMoreEvents bool `json:"canGetMoreEvents"`
|
||
Days []map[string]interface{} `json:"days"`
|
||
GeneratedPlaylists []GeneratedPlaylistLandingBlock `json:"generatedPlaylists"`
|
||
Headlines []map[string]interface{} `json:"headlines"`
|
||
IsWizardPassed bool `json:"isWizardPassed"`
|
||
Pumpkin bool `json:"pumpkin"`
|
||
Today string `json:"today"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetFeedResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetFeedResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetFeedWizardIsPassedResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
IsWizardPassed *bool `json:"isWizardPassed,omitempty"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetFeedWizardIsPassedResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetFeedWizardIsPassedResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetGenresResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Genre `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetGenresResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetGenresResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetLandingBlocksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result LandingResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetLandingBlocksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetLandingBlocksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetChartResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result FullChartResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetChartResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetChartResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetNewPlaylistsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Id string `json:"id"`
|
||
NewPlaylists []NewPlaylistItem `json:"newPlaylists"`
|
||
Title string `json:"title"`
|
||
Type GetNewPlaylists200ResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
type GetNewPlaylists200ResultType string
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetNewPlaylistsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetNewPlaylistsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetNewReleasesResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Id string `json:"id"`
|
||
NewReleases []float32 `json:"newReleases"`
|
||
Title string `json:"title"`
|
||
Type GetNewReleases200ResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
type GetNewReleases200ResultType string
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetNewReleasesResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetNewReleasesResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetNewPodcastsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Podcasts []float32 `json:"podcasts"`
|
||
Title string `json:"title"`
|
||
Type GetNewPodcasts200ResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
type GetNewPodcasts200ResultType string
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetNewPodcastsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetNewPodcastsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetLandingBlockResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result map[string]interface{} `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetLandingBlockResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetLandingBlockResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetBooksAndPodcastsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Блоки главной страницы кнги и подкастов
|
||
Result BooksAndPodcastsResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetBooksAndPodcastsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetBooksAndPodcastsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetPermissionAlertsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result оповещения
|
||
Result PermissionAlerts `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetPermissionAlertsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetPermissionAlertsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type PlayAudioResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result string `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r PlayAudioResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r PlayAudioResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetPlaylistsByIdsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Playlist `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetPlaylistsByIdsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetPlaylistsByIdsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetQueuesResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result QueuesResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetQueuesResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetQueuesResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetQueueByIdResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Очередь треков в списке очередей устройств
|
||
Result QueueItem `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetQueueByIdResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetQueueByIdResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type UpdateQueuePositionResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result UpdateQueueResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r UpdateQueuePositionResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r UpdateQueuePositionResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetRotorAccountStatusResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetRotorAccountStatusResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetRotorAccountStatusResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type SendStationFeedbackResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result ok
|
||
Result string `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r SendStationFeedbackResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r SendStationFeedbackResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetStationInfoResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Station `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetStationInfoResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetStationInfoResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetStationTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result StationTracksResult `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetStationTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetStationTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetRotorStationsDashboardResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Dashboard `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetRotorStationsDashboardResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetRotorStationsDashboardResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetStationsListResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []StationResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetStationsListResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetStationsListResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type SearchResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Результаты поиска
|
||
Result Search `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r SearchResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r SearchResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetSearchSuggestResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result подсказки при поиске
|
||
Result Suggestions `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetSearchSuggestResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetSearchSuggestResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetSettingsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Предложения по покупке
|
||
Result Settings `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetSettingsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetSettingsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetPlaylistsIdsByTagResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Класс, представляющий тег и его плейлисты
|
||
Result TagResult `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetPlaylistsIdsByTagResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetPlaylistsIdsByTagResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetTokenResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
AccessToken string `json:"access_token"`
|
||
ExpiresIn float32 `json:"expires_in"`
|
||
TokenType string `json:"token_type"`
|
||
Uid float32 `json:"uid"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetTokenResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetTokenResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Track `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetDownloadInfoResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []TrackDownloadInfo `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetDownloadInfoResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetDownloadInfoResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetTrackLyricsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result map[string]interface{} `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetTrackLyricsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetTrackLyricsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetSimilarTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result список похожих треков на другой трек
|
||
Result SimilarTracks `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetSimilarTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetSimilarTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetTrackSupplementResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result дополнительная информация о треке
|
||
Result Supplement `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetTrackSupplementResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetTrackSupplementResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetDislikedTracksIdsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result список треков
|
||
Result TracksList `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetDislikedTracksIdsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetDislikedTracksIdsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetLikedTracksIdsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
// Library список треков
|
||
Library TracksList `json:"library"`
|
||
} `json:"result"`
|
||
}
|
||
JSON404 *struct {
|
||
InvocationInfo *InvocationInfo `json:"invocationInfo,omitempty"`
|
||
Result *struct {
|
||
Message *string `json:"message,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
} `json:"result,omitempty"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetLikedTracksIdsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetLikedTracksIdsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type LikeTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Revision *float32 `json:"revision,omitempty"`
|
||
} `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r LikeTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r LikeTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type RemoveLikedTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r RemoveLikedTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r RemoveLikedTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetUserPlaylistsByIdsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Playlist `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetUserPlaylistsByIdsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetUserPlaylistsByIdsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type CreatePlaylistResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r CreatePlaylistResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r CreatePlaylistResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetPlayListsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Playlist `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetPlayListsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetPlayListsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetPlaylistByIdResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetPlaylistByIdResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetPlaylistByIdResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type ChangePlaylistTracksResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
JSON412 *struct {
|
||
Message *string `json:"message,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r ChangePlaylistTracksResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r ChangePlaylistTracksResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type DeletePlaylistResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result string `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r DeletePlaylistResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r DeletePlaylistResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type RenamePlaylistResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r RenamePlaylistResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r RenamePlaylistResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type GetRecommendationsResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result рекомендации для плейлиста
|
||
Result PlaylistRecommendations `json:"result"`
|
||
}
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r GetRecommendationsResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r GetRecommendationsResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type ChangePlaylistVisibilityResponse struct {
|
||
Body []byte
|
||
HTTPResponse *http.Response
|
||
JSON200 *struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
JSON400 *BadRequest
|
||
}
|
||
|
||
// Status returns HTTPResponse.Status
|
||
func (r ChangePlaylistVisibilityResponse) Status() string {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.Status
|
||
}
|
||
return http.StatusText(0)
|
||
}
|
||
|
||
// StatusCode returns HTTPResponse.StatusCode
|
||
func (r ChangePlaylistVisibilityResponse) StatusCode() int {
|
||
if r.HTTPResponse != nil {
|
||
return r.HTTPResponse.StatusCode
|
||
}
|
||
return 0
|
||
}
|
||
|
||
// ActivatePromoCodeWithBodyWithResponse request with arbitrary body returning *ActivatePromoCodeResponse
|
||
func (c *ClientWithResponses) ActivatePromoCodeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ActivatePromoCodeResponse, error) {
|
||
rsp, err := c.ActivatePromoCodeWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseActivatePromoCodeResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) ActivatePromoCodeWithFormdataBodyWithResponse(ctx context.Context, body ActivatePromoCodeFormdataRequestBody, reqEditors ...RequestEditorFn) (*ActivatePromoCodeResponse, error) {
|
||
rsp, err := c.ActivatePromoCodeWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseActivatePromoCodeResponse(rsp)
|
||
}
|
||
|
||
// GetAccountExperimentsWithResponse request returning *GetAccountExperimentsResponse
|
||
func (c *ClientWithResponses) GetAccountExperimentsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountExperimentsResponse, error) {
|
||
rsp, err := c.GetAccountExperiments(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAccountExperimentsResponse(rsp)
|
||
}
|
||
|
||
// GetAccountSettingsWithResponse request returning *GetAccountSettingsResponse
|
||
func (c *ClientWithResponses) GetAccountSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountSettingsResponse, error) {
|
||
rsp, err := c.GetAccountSettings(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAccountSettingsResponse(rsp)
|
||
}
|
||
|
||
// ChangeAccountSettingsWithBodyWithResponse request with arbitrary body returning *ChangeAccountSettingsResponse
|
||
func (c *ClientWithResponses) ChangeAccountSettingsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangeAccountSettingsResponse, error) {
|
||
rsp, err := c.ChangeAccountSettingsWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseChangeAccountSettingsResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) ChangeAccountSettingsWithFormdataBodyWithResponse(ctx context.Context, body ChangeAccountSettingsFormdataRequestBody, reqEditors ...RequestEditorFn) (*ChangeAccountSettingsResponse, error) {
|
||
rsp, err := c.ChangeAccountSettingsWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseChangeAccountSettingsResponse(rsp)
|
||
}
|
||
|
||
// GetAccountStatusWithResponse request returning *GetAccountStatusResponse
|
||
func (c *ClientWithResponses) GetAccountStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAccountStatusResponse, error) {
|
||
rsp, err := c.GetAccountStatus(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAccountStatusResponse(rsp)
|
||
}
|
||
|
||
// GetAlbumsByIdsWithBodyWithResponse request with arbitrary body returning *GetAlbumsByIdsResponse
|
||
func (c *ClientWithResponses) GetAlbumsByIdsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetAlbumsByIdsResponse, error) {
|
||
rsp, err := c.GetAlbumsByIdsWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAlbumsByIdsResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) GetAlbumsByIdsWithFormdataBodyWithResponse(ctx context.Context, body GetAlbumsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetAlbumsByIdsResponse, error) {
|
||
rsp, err := c.GetAlbumsByIdsWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAlbumsByIdsResponse(rsp)
|
||
}
|
||
|
||
// GetAlbumByIdWithResponse request returning *GetAlbumByIdResponse
|
||
func (c *ClientWithResponses) GetAlbumByIdWithResponse(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*GetAlbumByIdResponse, error) {
|
||
rsp, err := c.GetAlbumById(ctx, albumId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAlbumByIdResponse(rsp)
|
||
}
|
||
|
||
// GetAlbumsWithTracksWithResponse request returning *GetAlbumsWithTracksResponse
|
||
func (c *ClientWithResponses) GetAlbumsWithTracksWithResponse(ctx context.Context, albumId float32, reqEditors ...RequestEditorFn) (*GetAlbumsWithTracksResponse, error) {
|
||
rsp, err := c.GetAlbumsWithTracks(ctx, albumId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetAlbumsWithTracksResponse(rsp)
|
||
}
|
||
|
||
// GetArtistsArtistIdBriefInfoWithResponse request returning *GetArtistsArtistIdBriefInfoResponse
|
||
func (c *ClientWithResponses) GetArtistsArtistIdBriefInfoWithResponse(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*GetArtistsArtistIdBriefInfoResponse, error) {
|
||
rsp, err := c.GetArtistsArtistIdBriefInfo(ctx, artistId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetArtistsArtistIdBriefInfoResponse(rsp)
|
||
}
|
||
|
||
// GetArtistsArtistIdDirectAlbumsWithResponse request returning *GetArtistsArtistIdDirectAlbumsResponse
|
||
func (c *ClientWithResponses) GetArtistsArtistIdDirectAlbumsWithResponse(ctx context.Context, artistId string, params *GetArtistsArtistIdDirectAlbumsParams, reqEditors ...RequestEditorFn) (*GetArtistsArtistIdDirectAlbumsResponse, error) {
|
||
rsp, err := c.GetArtistsArtistIdDirectAlbums(ctx, artistId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetArtistsArtistIdDirectAlbumsResponse(rsp)
|
||
}
|
||
|
||
// GetPopularTracksWithResponse request returning *GetPopularTracksResponse
|
||
func (c *ClientWithResponses) GetPopularTracksWithResponse(ctx context.Context, artistId string, reqEditors ...RequestEditorFn) (*GetPopularTracksResponse, error) {
|
||
rsp, err := c.GetPopularTracks(ctx, artistId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPopularTracksResponse(rsp)
|
||
}
|
||
|
||
// GetArtistTracksWithResponse request returning *GetArtistTracksResponse
|
||
func (c *ClientWithResponses) GetArtistTracksWithResponse(ctx context.Context, artistId string, params *GetArtistTracksParams, reqEditors ...RequestEditorFn) (*GetArtistTracksResponse, error) {
|
||
rsp, err := c.GetArtistTracks(ctx, artistId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetArtistTracksResponse(rsp)
|
||
}
|
||
|
||
// GetFeedWithResponse request returning *GetFeedResponse
|
||
func (c *ClientWithResponses) GetFeedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFeedResponse, error) {
|
||
rsp, err := c.GetFeed(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetFeedResponse(rsp)
|
||
}
|
||
|
||
// GetFeedWizardIsPassedWithResponse request returning *GetFeedWizardIsPassedResponse
|
||
func (c *ClientWithResponses) GetFeedWizardIsPassedWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetFeedWizardIsPassedResponse, error) {
|
||
rsp, err := c.GetFeedWizardIsPassed(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetFeedWizardIsPassedResponse(rsp)
|
||
}
|
||
|
||
// GetGenresWithResponse request returning *GetGenresResponse
|
||
func (c *ClientWithResponses) GetGenresWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetGenresResponse, error) {
|
||
rsp, err := c.GetGenres(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetGenresResponse(rsp)
|
||
}
|
||
|
||
// GetLandingBlocksWithResponse request returning *GetLandingBlocksResponse
|
||
func (c *ClientWithResponses) GetLandingBlocksWithResponse(ctx context.Context, params *GetLandingBlocksParams, reqEditors ...RequestEditorFn) (*GetLandingBlocksResponse, error) {
|
||
rsp, err := c.GetLandingBlocks(ctx, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetLandingBlocksResponse(rsp)
|
||
}
|
||
|
||
// GetChartWithResponse request returning *GetChartResponse
|
||
func (c *ClientWithResponses) GetChartWithResponse(ctx context.Context, chartType string, reqEditors ...RequestEditorFn) (*GetChartResponse, error) {
|
||
rsp, err := c.GetChart(ctx, chartType, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetChartResponse(rsp)
|
||
}
|
||
|
||
// GetNewPlaylistsWithResponse request returning *GetNewPlaylistsResponse
|
||
func (c *ClientWithResponses) GetNewPlaylistsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNewPlaylistsResponse, error) {
|
||
rsp, err := c.GetNewPlaylists(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetNewPlaylistsResponse(rsp)
|
||
}
|
||
|
||
// GetNewReleasesWithResponse request returning *GetNewReleasesResponse
|
||
func (c *ClientWithResponses) GetNewReleasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNewReleasesResponse, error) {
|
||
rsp, err := c.GetNewReleases(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetNewReleasesResponse(rsp)
|
||
}
|
||
|
||
// GetNewPodcastsWithResponse request returning *GetNewPodcastsResponse
|
||
func (c *ClientWithResponses) GetNewPodcastsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetNewPodcastsResponse, error) {
|
||
rsp, err := c.GetNewPodcasts(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetNewPodcastsResponse(rsp)
|
||
}
|
||
|
||
// GetLandingBlockWithResponse request returning *GetLandingBlockResponse
|
||
func (c *ClientWithResponses) GetLandingBlockWithResponse(ctx context.Context, landingBlock string, reqEditors ...RequestEditorFn) (*GetLandingBlockResponse, error) {
|
||
rsp, err := c.GetLandingBlock(ctx, landingBlock, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetLandingBlockResponse(rsp)
|
||
}
|
||
|
||
// GetBooksAndPodcastsWithResponse request returning *GetBooksAndPodcastsResponse
|
||
func (c *ClientWithResponses) GetBooksAndPodcastsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBooksAndPodcastsResponse, error) {
|
||
rsp, err := c.GetBooksAndPodcasts(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetBooksAndPodcastsResponse(rsp)
|
||
}
|
||
|
||
// GetPermissionAlertsWithResponse request returning *GetPermissionAlertsResponse
|
||
func (c *ClientWithResponses) GetPermissionAlertsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPermissionAlertsResponse, error) {
|
||
rsp, err := c.GetPermissionAlerts(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPermissionAlertsResponse(rsp)
|
||
}
|
||
|
||
// PlayAudioWithBodyWithResponse request with arbitrary body returning *PlayAudioResponse
|
||
func (c *ClientWithResponses) PlayAudioWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PlayAudioResponse, error) {
|
||
rsp, err := c.PlayAudioWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParsePlayAudioResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) PlayAudioWithFormdataBodyWithResponse(ctx context.Context, body PlayAudioFormdataRequestBody, reqEditors ...RequestEditorFn) (*PlayAudioResponse, error) {
|
||
rsp, err := c.PlayAudioWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParsePlayAudioResponse(rsp)
|
||
}
|
||
|
||
// GetPlaylistsByIdsWithBodyWithResponse request with arbitrary body returning *GetPlaylistsByIdsResponse
|
||
func (c *ClientWithResponses) GetPlaylistsByIdsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPlaylistsByIdsResponse, error) {
|
||
rsp, err := c.GetPlaylistsByIdsWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPlaylistsByIdsResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) GetPlaylistsByIdsWithFormdataBodyWithResponse(ctx context.Context, body GetPlaylistsByIdsFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetPlaylistsByIdsResponse, error) {
|
||
rsp, err := c.GetPlaylistsByIdsWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPlaylistsByIdsResponse(rsp)
|
||
}
|
||
|
||
// GetQueuesWithResponse request returning *GetQueuesResponse
|
||
func (c *ClientWithResponses) GetQueuesWithResponse(ctx context.Context, params *GetQueuesParams, reqEditors ...RequestEditorFn) (*GetQueuesResponse, error) {
|
||
rsp, err := c.GetQueues(ctx, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetQueuesResponse(rsp)
|
||
}
|
||
|
||
// GetQueueByIdWithResponse request returning *GetQueueByIdResponse
|
||
func (c *ClientWithResponses) GetQueueByIdWithResponse(ctx context.Context, queueId string, reqEditors ...RequestEditorFn) (*GetQueueByIdResponse, error) {
|
||
rsp, err := c.GetQueueById(ctx, queueId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetQueueByIdResponse(rsp)
|
||
}
|
||
|
||
// UpdateQueuePositionWithResponse request returning *UpdateQueuePositionResponse
|
||
func (c *ClientWithResponses) UpdateQueuePositionWithResponse(ctx context.Context, queueId string, params *UpdateQueuePositionParams, reqEditors ...RequestEditorFn) (*UpdateQueuePositionResponse, error) {
|
||
rsp, err := c.UpdateQueuePosition(ctx, queueId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseUpdateQueuePositionResponse(rsp)
|
||
}
|
||
|
||
// GetRotorAccountStatusWithResponse request returning *GetRotorAccountStatusResponse
|
||
func (c *ClientWithResponses) GetRotorAccountStatusWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRotorAccountStatusResponse, error) {
|
||
rsp, err := c.GetRotorAccountStatus(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetRotorAccountStatusResponse(rsp)
|
||
}
|
||
|
||
// SendStationFeedbackWithBodyWithResponse request with arbitrary body returning *SendStationFeedbackResponse
|
||
func (c *ClientWithResponses) SendStationFeedbackWithBodyWithResponse(ctx context.Context, stationId string, params *SendStationFeedbackParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SendStationFeedbackResponse, error) {
|
||
rsp, err := c.SendStationFeedbackWithBody(ctx, stationId, params, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseSendStationFeedbackResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) SendStationFeedbackWithResponse(ctx context.Context, stationId string, params *SendStationFeedbackParams, body SendStationFeedbackJSONRequestBody, reqEditors ...RequestEditorFn) (*SendStationFeedbackResponse, error) {
|
||
rsp, err := c.SendStationFeedback(ctx, stationId, params, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseSendStationFeedbackResponse(rsp)
|
||
}
|
||
|
||
// GetStationInfoWithResponse request returning *GetStationInfoResponse
|
||
func (c *ClientWithResponses) GetStationInfoWithResponse(ctx context.Context, stationId string, reqEditors ...RequestEditorFn) (*GetStationInfoResponse, error) {
|
||
rsp, err := c.GetStationInfo(ctx, stationId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetStationInfoResponse(rsp)
|
||
}
|
||
|
||
// GetStationTracksWithResponse request returning *GetStationTracksResponse
|
||
func (c *ClientWithResponses) GetStationTracksWithResponse(ctx context.Context, stationId string, params *GetStationTracksParams, reqEditors ...RequestEditorFn) (*GetStationTracksResponse, error) {
|
||
rsp, err := c.GetStationTracks(ctx, stationId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetStationTracksResponse(rsp)
|
||
}
|
||
|
||
// GetRotorStationsDashboardWithResponse request returning *GetRotorStationsDashboardResponse
|
||
func (c *ClientWithResponses) GetRotorStationsDashboardWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetRotorStationsDashboardResponse, error) {
|
||
rsp, err := c.GetRotorStationsDashboard(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetRotorStationsDashboardResponse(rsp)
|
||
}
|
||
|
||
// GetStationsListWithResponse request returning *GetStationsListResponse
|
||
func (c *ClientWithResponses) GetStationsListWithResponse(ctx context.Context, params *GetStationsListParams, reqEditors ...RequestEditorFn) (*GetStationsListResponse, error) {
|
||
rsp, err := c.GetStationsList(ctx, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetStationsListResponse(rsp)
|
||
}
|
||
|
||
// SearchWithResponse request returning *SearchResponse
|
||
func (c *ClientWithResponses) SearchWithResponse(ctx context.Context, params *SearchParams, reqEditors ...RequestEditorFn) (*SearchResponse, error) {
|
||
rsp, err := c.Search(ctx, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseSearchResponse(rsp)
|
||
}
|
||
|
||
// GetSearchSuggestWithResponse request returning *GetSearchSuggestResponse
|
||
func (c *ClientWithResponses) GetSearchSuggestWithResponse(ctx context.Context, params *GetSearchSuggestParams, reqEditors ...RequestEditorFn) (*GetSearchSuggestResponse, error) {
|
||
rsp, err := c.GetSearchSuggest(ctx, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetSearchSuggestResponse(rsp)
|
||
}
|
||
|
||
// GetSettingsWithResponse request returning *GetSettingsResponse
|
||
func (c *ClientWithResponses) GetSettingsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSettingsResponse, error) {
|
||
rsp, err := c.GetSettings(ctx, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetSettingsResponse(rsp)
|
||
}
|
||
|
||
// GetPlaylistsIdsByTagWithResponse request returning *GetPlaylistsIdsByTagResponse
|
||
func (c *ClientWithResponses) GetPlaylistsIdsByTagWithResponse(ctx context.Context, tagId string, reqEditors ...RequestEditorFn) (*GetPlaylistsIdsByTagResponse, error) {
|
||
rsp, err := c.GetPlaylistsIdsByTag(ctx, tagId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPlaylistsIdsByTagResponse(rsp)
|
||
}
|
||
|
||
// GetTokenWithBodyWithResponse request with arbitrary body returning *GetTokenResponse
|
||
func (c *ClientWithResponses) GetTokenWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTokenResponse, error) {
|
||
rsp, err := c.GetTokenWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetTokenResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) GetTokenWithFormdataBodyWithResponse(ctx context.Context, body GetTokenFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetTokenResponse, error) {
|
||
rsp, err := c.GetTokenWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetTokenResponse(rsp)
|
||
}
|
||
|
||
// GetTracksWithBodyWithResponse request with arbitrary body returning *GetTracksResponse
|
||
func (c *ClientWithResponses) GetTracksWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetTracksResponse, error) {
|
||
rsp, err := c.GetTracksWithBody(ctx, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetTracksResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) GetTracksWithFormdataBodyWithResponse(ctx context.Context, body GetTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*GetTracksResponse, error) {
|
||
rsp, err := c.GetTracksWithFormdataBody(ctx, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetTracksResponse(rsp)
|
||
}
|
||
|
||
// GetDownloadInfoWithResponse request returning *GetDownloadInfoResponse
|
||
func (c *ClientWithResponses) GetDownloadInfoWithResponse(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*GetDownloadInfoResponse, error) {
|
||
rsp, err := c.GetDownloadInfo(ctx, trackId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetDownloadInfoResponse(rsp)
|
||
}
|
||
|
||
// GetTrackLyricsWithResponse request returning *GetTrackLyricsResponse
|
||
func (c *ClientWithResponses) GetTrackLyricsWithResponse(ctx context.Context, trackId string, params *GetTrackLyricsParams, reqEditors ...RequestEditorFn) (*GetTrackLyricsResponse, error) {
|
||
rsp, err := c.GetTrackLyrics(ctx, trackId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetTrackLyricsResponse(rsp)
|
||
}
|
||
|
||
// GetSimilarTracksWithResponse request returning *GetSimilarTracksResponse
|
||
func (c *ClientWithResponses) GetSimilarTracksWithResponse(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*GetSimilarTracksResponse, error) {
|
||
rsp, err := c.GetSimilarTracks(ctx, trackId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetSimilarTracksResponse(rsp)
|
||
}
|
||
|
||
// GetTrackSupplementWithResponse request returning *GetTrackSupplementResponse
|
||
func (c *ClientWithResponses) GetTrackSupplementWithResponse(ctx context.Context, trackId string, reqEditors ...RequestEditorFn) (*GetTrackSupplementResponse, error) {
|
||
rsp, err := c.GetTrackSupplement(ctx, trackId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetTrackSupplementResponse(rsp)
|
||
}
|
||
|
||
// GetDislikedTracksIdsWithResponse request returning *GetDislikedTracksIdsResponse
|
||
func (c *ClientWithResponses) GetDislikedTracksIdsWithResponse(ctx context.Context, userId float32, params *GetDislikedTracksIdsParams, reqEditors ...RequestEditorFn) (*GetDislikedTracksIdsResponse, error) {
|
||
rsp, err := c.GetDislikedTracksIds(ctx, userId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetDislikedTracksIdsResponse(rsp)
|
||
}
|
||
|
||
// GetLikedTracksIdsWithResponse request returning *GetLikedTracksIdsResponse
|
||
func (c *ClientWithResponses) GetLikedTracksIdsWithResponse(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*GetLikedTracksIdsResponse, error) {
|
||
rsp, err := c.GetLikedTracksIds(ctx, userId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetLikedTracksIdsResponse(rsp)
|
||
}
|
||
|
||
// LikeTracksWithBodyWithResponse request with arbitrary body returning *LikeTracksResponse
|
||
func (c *ClientWithResponses) LikeTracksWithBodyWithResponse(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*LikeTracksResponse, error) {
|
||
rsp, err := c.LikeTracksWithBody(ctx, userId, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseLikeTracksResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) LikeTracksWithFormdataBodyWithResponse(ctx context.Context, userId float32, body LikeTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*LikeTracksResponse, error) {
|
||
rsp, err := c.LikeTracksWithFormdataBody(ctx, userId, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseLikeTracksResponse(rsp)
|
||
}
|
||
|
||
// RemoveLikedTracksWithBodyWithResponse request with arbitrary body returning *RemoveLikedTracksResponse
|
||
func (c *ClientWithResponses) RemoveLikedTracksWithBodyWithResponse(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveLikedTracksResponse, error) {
|
||
rsp, err := c.RemoveLikedTracksWithBody(ctx, userId, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseRemoveLikedTracksResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) RemoveLikedTracksWithFormdataBodyWithResponse(ctx context.Context, userId float32, body RemoveLikedTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*RemoveLikedTracksResponse, error) {
|
||
rsp, err := c.RemoveLikedTracksWithFormdataBody(ctx, userId, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseRemoveLikedTracksResponse(rsp)
|
||
}
|
||
|
||
// GetUserPlaylistsByIdsWithResponse request returning *GetUserPlaylistsByIdsResponse
|
||
func (c *ClientWithResponses) GetUserPlaylistsByIdsWithResponse(ctx context.Context, userId float32, params *GetUserPlaylistsByIdsParams, reqEditors ...RequestEditorFn) (*GetUserPlaylistsByIdsResponse, error) {
|
||
rsp, err := c.GetUserPlaylistsByIds(ctx, userId, params, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetUserPlaylistsByIdsResponse(rsp)
|
||
}
|
||
|
||
// CreatePlaylistWithBodyWithResponse request with arbitrary body returning *CreatePlaylistResponse
|
||
func (c *ClientWithResponses) CreatePlaylistWithBodyWithResponse(ctx context.Context, userId float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreatePlaylistResponse, error) {
|
||
rsp, err := c.CreatePlaylistWithBody(ctx, userId, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseCreatePlaylistResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) CreatePlaylistWithFormdataBodyWithResponse(ctx context.Context, userId float32, body CreatePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*CreatePlaylistResponse, error) {
|
||
rsp, err := c.CreatePlaylistWithFormdataBody(ctx, userId, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseCreatePlaylistResponse(rsp)
|
||
}
|
||
|
||
// GetPlayListsWithResponse request returning *GetPlayListsResponse
|
||
func (c *ClientWithResponses) GetPlayListsWithResponse(ctx context.Context, userId float32, reqEditors ...RequestEditorFn) (*GetPlayListsResponse, error) {
|
||
rsp, err := c.GetPlayLists(ctx, userId, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPlayListsResponse(rsp)
|
||
}
|
||
|
||
// GetPlaylistByIdWithResponse request returning *GetPlaylistByIdResponse
|
||
func (c *ClientWithResponses) GetPlaylistByIdWithResponse(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*GetPlaylistByIdResponse, error) {
|
||
rsp, err := c.GetPlaylistById(ctx, userId, kind, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetPlaylistByIdResponse(rsp)
|
||
}
|
||
|
||
// ChangePlaylistTracksWithBodyWithResponse request with arbitrary body returning *ChangePlaylistTracksResponse
|
||
func (c *ClientWithResponses) ChangePlaylistTracksWithBodyWithResponse(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePlaylistTracksResponse, error) {
|
||
rsp, err := c.ChangePlaylistTracksWithBody(ctx, userId, kind, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseChangePlaylistTracksResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) ChangePlaylistTracksWithFormdataBodyWithResponse(ctx context.Context, userId float32, kind float32, body ChangePlaylistTracksFormdataRequestBody, reqEditors ...RequestEditorFn) (*ChangePlaylistTracksResponse, error) {
|
||
rsp, err := c.ChangePlaylistTracksWithFormdataBody(ctx, userId, kind, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseChangePlaylistTracksResponse(rsp)
|
||
}
|
||
|
||
// DeletePlaylistWithResponse request returning *DeletePlaylistResponse
|
||
func (c *ClientWithResponses) DeletePlaylistWithResponse(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*DeletePlaylistResponse, error) {
|
||
rsp, err := c.DeletePlaylist(ctx, userId, kind, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseDeletePlaylistResponse(rsp)
|
||
}
|
||
|
||
// RenamePlaylistWithBodyWithResponse request with arbitrary body returning *RenamePlaylistResponse
|
||
func (c *ClientWithResponses) RenamePlaylistWithBodyWithResponse(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RenamePlaylistResponse, error) {
|
||
rsp, err := c.RenamePlaylistWithBody(ctx, userId, kind, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseRenamePlaylistResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) RenamePlaylistWithFormdataBodyWithResponse(ctx context.Context, userId float32, kind float32, body RenamePlaylistFormdataRequestBody, reqEditors ...RequestEditorFn) (*RenamePlaylistResponse, error) {
|
||
rsp, err := c.RenamePlaylistWithFormdataBody(ctx, userId, kind, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseRenamePlaylistResponse(rsp)
|
||
}
|
||
|
||
// GetRecommendationsWithResponse request returning *GetRecommendationsResponse
|
||
func (c *ClientWithResponses) GetRecommendationsWithResponse(ctx context.Context, userId float32, kind float32, reqEditors ...RequestEditorFn) (*GetRecommendationsResponse, error) {
|
||
rsp, err := c.GetRecommendations(ctx, userId, kind, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseGetRecommendationsResponse(rsp)
|
||
}
|
||
|
||
// ChangePlaylistVisibilityWithBodyWithResponse request with arbitrary body returning *ChangePlaylistVisibilityResponse
|
||
func (c *ClientWithResponses) ChangePlaylistVisibilityWithBodyWithResponse(ctx context.Context, userId float32, kind float32, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ChangePlaylistVisibilityResponse, error) {
|
||
rsp, err := c.ChangePlaylistVisibilityWithBody(ctx, userId, kind, contentType, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseChangePlaylistVisibilityResponse(rsp)
|
||
}
|
||
|
||
func (c *ClientWithResponses) ChangePlaylistVisibilityWithFormdataBodyWithResponse(ctx context.Context, userId float32, kind float32, body ChangePlaylistVisibilityFormdataRequestBody, reqEditors ...RequestEditorFn) (*ChangePlaylistVisibilityResponse, error) {
|
||
rsp, err := c.ChangePlaylistVisibilityWithFormdataBody(ctx, userId, kind, body, reqEditors...)
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
return ParseChangePlaylistVisibilityResponse(rsp)
|
||
}
|
||
|
||
// ParseActivatePromoCodeResponse parses an HTTP response from a ActivatePromoCodeWithResponse call
|
||
func ParseActivatePromoCodeResponse(rsp *http.Response) (*ActivatePromoCodeResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &ActivatePromoCodeResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result статус активации промо-кода
|
||
Result PromoCodeStatus `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetAccountExperimentsResponse parses an HTTP response from a GetAccountExperimentsWithResponse call
|
||
func ParseGetAccountExperimentsResponse(rsp *http.Response) (*GetAccountExperimentsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetAccountExperimentsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result режимы экспериментальных функций
|
||
Result Experiments `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetAccountSettingsResponse parses an HTTP response from a GetAccountSettingsWithResponse call
|
||
func ParseGetAccountSettingsResponse(rsp *http.Response) (*GetAccountSettingsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetAccountSettingsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result UserSettings `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseChangeAccountSettingsResponse parses an HTTP response from a ChangeAccountSettingsWithResponse call
|
||
func ParseChangeAccountSettingsResponse(rsp *http.Response) (*ChangeAccountSettingsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &ChangeAccountSettingsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result ChangeAccountSettings_200_Result `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetAccountStatusResponse parses an HTTP response from a GetAccountStatusWithResponse call
|
||
func ParseGetAccountStatusResponse(rsp *http.Response) (*GetAccountStatusResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetAccountStatusResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result Status `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetAlbumsByIdsResponse parses an HTTP response from a GetAlbumsByIdsWithResponse call
|
||
func ParseGetAlbumsByIdsResponse(rsp *http.Response) (*GetAlbumsByIdsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetAlbumsByIdsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Album `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetAlbumByIdResponse parses an HTTP response from a GetAlbumByIdWithResponse call
|
||
func ParseGetAlbumByIdResponse(rsp *http.Response) (*GetAlbumByIdResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetAlbumByIdResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result Album `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetAlbumsWithTracksResponse parses an HTTP response from a GetAlbumsWithTracksWithResponse call
|
||
func ParseGetAlbumsWithTracksResponse(rsp *http.Response) (*GetAlbumsWithTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetAlbumsWithTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result Album `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetArtistsArtistIdBriefInfoResponse parses an HTTP response from a GetArtistsArtistIdBriefInfoWithResponse call
|
||
func ParseGetArtistsArtistIdBriefInfoResponse(rsp *http.Response) (*GetArtistsArtistIdBriefInfoResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetArtistsArtistIdBriefInfoResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetArtistsArtistIdDirectAlbumsResponse parses an HTTP response from a GetArtistsArtistIdDirectAlbumsWithResponse call
|
||
func ParseGetArtistsArtistIdDirectAlbumsResponse(rsp *http.Response) (*GetArtistsArtistIdDirectAlbumsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetArtistsArtistIdDirectAlbumsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetPopularTracksResponse parses an HTTP response from a GetPopularTracksWithResponse call
|
||
func ParseGetPopularTracksResponse(rsp *http.Response) (*GetPopularTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetPopularTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Artist Artist `json:"artist"`
|
||
Tracks []string `json:"tracks"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetArtistTracksResponse parses an HTTP response from a GetArtistTracksWithResponse call
|
||
func ParseGetArtistTracksResponse(rsp *http.Response) (*GetArtistTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetArtistTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetFeedResponse parses an HTTP response from a GetFeedWithResponse call
|
||
func ParseGetFeedResponse(rsp *http.Response) (*GetFeedResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetFeedResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
CanGetMoreEvents bool `json:"canGetMoreEvents"`
|
||
Days []map[string]interface{} `json:"days"`
|
||
GeneratedPlaylists []GeneratedPlaylistLandingBlock `json:"generatedPlaylists"`
|
||
Headlines []map[string]interface{} `json:"headlines"`
|
||
IsWizardPassed bool `json:"isWizardPassed"`
|
||
Pumpkin bool `json:"pumpkin"`
|
||
Today string `json:"today"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetFeedWizardIsPassedResponse parses an HTTP response from a GetFeedWizardIsPassedWithResponse call
|
||
func ParseGetFeedWizardIsPassedResponse(rsp *http.Response) (*GetFeedWizardIsPassedResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetFeedWizardIsPassedResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
IsWizardPassed *bool `json:"isWizardPassed,omitempty"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetGenresResponse parses an HTTP response from a GetGenresWithResponse call
|
||
func ParseGetGenresResponse(rsp *http.Response) (*GetGenresResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetGenresResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Genre `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetLandingBlocksResponse parses an HTTP response from a GetLandingBlocksWithResponse call
|
||
func ParseGetLandingBlocksResponse(rsp *http.Response) (*GetLandingBlocksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetLandingBlocksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result LandingResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetChartResponse parses an HTTP response from a GetChartWithResponse call
|
||
func ParseGetChartResponse(rsp *http.Response) (*GetChartResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetChartResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result FullChartResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetNewPlaylistsResponse parses an HTTP response from a GetNewPlaylistsWithResponse call
|
||
func ParseGetNewPlaylistsResponse(rsp *http.Response) (*GetNewPlaylistsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetNewPlaylistsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Id string `json:"id"`
|
||
NewPlaylists []NewPlaylistItem `json:"newPlaylists"`
|
||
Title string `json:"title"`
|
||
Type GetNewPlaylists200ResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetNewReleasesResponse parses an HTTP response from a GetNewReleasesWithResponse call
|
||
func ParseGetNewReleasesResponse(rsp *http.Response) (*GetNewReleasesResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetNewReleasesResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Id string `json:"id"`
|
||
NewReleases []float32 `json:"newReleases"`
|
||
Title string `json:"title"`
|
||
Type GetNewReleases200ResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetNewPodcastsResponse parses an HTTP response from a GetNewPodcastsWithResponse call
|
||
func ParseGetNewPodcastsResponse(rsp *http.Response) (*GetNewPodcastsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetNewPodcastsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Podcasts []float32 `json:"podcasts"`
|
||
Title string `json:"title"`
|
||
Type GetNewPodcasts200ResultType `json:"type"`
|
||
TypeForFrom string `json:"typeForFrom"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetLandingBlockResponse parses an HTTP response from a GetLandingBlockWithResponse call
|
||
func ParseGetLandingBlockResponse(rsp *http.Response) (*GetLandingBlockResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetLandingBlockResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result map[string]interface{} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetBooksAndPodcastsResponse parses an HTTP response from a GetBooksAndPodcastsWithResponse call
|
||
func ParseGetBooksAndPodcastsResponse(rsp *http.Response) (*GetBooksAndPodcastsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetBooksAndPodcastsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Блоки главной страницы кнги и подкастов
|
||
Result BooksAndPodcastsResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetPermissionAlertsResponse parses an HTTP response from a GetPermissionAlertsWithResponse call
|
||
func ParseGetPermissionAlertsResponse(rsp *http.Response) (*GetPermissionAlertsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetPermissionAlertsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result оповещения
|
||
Result PermissionAlerts `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParsePlayAudioResponse parses an HTTP response from a PlayAudioWithResponse call
|
||
func ParsePlayAudioResponse(rsp *http.Response) (*PlayAudioResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &PlayAudioResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result string `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetPlaylistsByIdsResponse parses an HTTP response from a GetPlaylistsByIdsWithResponse call
|
||
func ParseGetPlaylistsByIdsResponse(rsp *http.Response) (*GetPlaylistsByIdsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetPlaylistsByIdsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetQueuesResponse parses an HTTP response from a GetQueuesWithResponse call
|
||
func ParseGetQueuesResponse(rsp *http.Response) (*GetQueuesResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetQueuesResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result QueuesResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetQueueByIdResponse parses an HTTP response from a GetQueueByIdWithResponse call
|
||
func ParseGetQueueByIdResponse(rsp *http.Response) (*GetQueueByIdResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetQueueByIdResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Очередь треков в списке очередей устройств
|
||
Result QueueItem `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseUpdateQueuePositionResponse parses an HTTP response from a UpdateQueuePositionWithResponse call
|
||
func ParseUpdateQueuePositionResponse(rsp *http.Response) (*UpdateQueuePositionResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &UpdateQueuePositionResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result UpdateQueueResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetRotorAccountStatusResponse parses an HTTP response from a GetRotorAccountStatusWithResponse call
|
||
func ParseGetRotorAccountStatusResponse(rsp *http.Response) (*GetRotorAccountStatusResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetRotorAccountStatusResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseSendStationFeedbackResponse parses an HTTP response from a SendStationFeedbackWithResponse call
|
||
func ParseSendStationFeedbackResponse(rsp *http.Response) (*SendStationFeedbackResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &SendStationFeedbackResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result ok
|
||
Result string `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetStationInfoResponse parses an HTTP response from a GetStationInfoWithResponse call
|
||
func ParseGetStationInfoResponse(rsp *http.Response) (*GetStationInfoResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetStationInfoResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Station `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetStationTracksResponse parses an HTTP response from a GetStationTracksWithResponse call
|
||
func ParseGetStationTracksResponse(rsp *http.Response) (*GetStationTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetStationTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result StationTracksResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetRotorStationsDashboardResponse parses an HTTP response from a GetRotorStationsDashboardWithResponse call
|
||
func ParseGetRotorStationsDashboardResponse(rsp *http.Response) (*GetRotorStationsDashboardResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetRotorStationsDashboardResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Dashboard `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetStationsListResponse parses an HTTP response from a GetStationsListWithResponse call
|
||
func ParseGetStationsListResponse(rsp *http.Response) (*GetStationsListResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetStationsListResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []StationResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseSearchResponse parses an HTTP response from a SearchWithResponse call
|
||
func ParseSearchResponse(rsp *http.Response) (*SearchResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &SearchResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Результаты поиска
|
||
Result Search `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetSearchSuggestResponse parses an HTTP response from a GetSearchSuggestWithResponse call
|
||
func ParseGetSearchSuggestResponse(rsp *http.Response) (*GetSearchSuggestResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetSearchSuggestResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result подсказки при поиске
|
||
Result Suggestions `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetSettingsResponse parses an HTTP response from a GetSettingsWithResponse call
|
||
func ParseGetSettingsResponse(rsp *http.Response) (*GetSettingsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetSettingsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Предложения по покупке
|
||
Result Settings `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetPlaylistsIdsByTagResponse parses an HTTP response from a GetPlaylistsIdsByTagWithResponse call
|
||
func ParseGetPlaylistsIdsByTagResponse(rsp *http.Response) (*GetPlaylistsIdsByTagResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetPlaylistsIdsByTagResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result Класс, представляющий тег и его плейлисты
|
||
Result TagResult `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetTokenResponse parses an HTTP response from a GetTokenWithResponse call
|
||
func ParseGetTokenResponse(rsp *http.Response) (*GetTokenResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetTokenResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
AccessToken string `json:"access_token"`
|
||
ExpiresIn float32 `json:"expires_in"`
|
||
TokenType string `json:"token_type"`
|
||
Uid float32 `json:"uid"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetTracksResponse parses an HTTP response from a GetTracksWithResponse call
|
||
func ParseGetTracksResponse(rsp *http.Response) (*GetTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Track `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetDownloadInfoResponse parses an HTTP response from a GetDownloadInfoWithResponse call
|
||
func ParseGetDownloadInfoResponse(rsp *http.Response) (*GetDownloadInfoResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetDownloadInfoResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []TrackDownloadInfo `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetTrackLyricsResponse parses an HTTP response from a GetTrackLyricsWithResponse call
|
||
func ParseGetTrackLyricsResponse(rsp *http.Response) (*GetTrackLyricsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetTrackLyricsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result map[string]interface{} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetSimilarTracksResponse parses an HTTP response from a GetSimilarTracksWithResponse call
|
||
func ParseGetSimilarTracksResponse(rsp *http.Response) (*GetSimilarTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetSimilarTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result список похожих треков на другой трек
|
||
Result SimilarTracks `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetTrackSupplementResponse parses an HTTP response from a GetTrackSupplementWithResponse call
|
||
func ParseGetTrackSupplementResponse(rsp *http.Response) (*GetTrackSupplementResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetTrackSupplementResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result дополнительная информация о треке
|
||
Result Supplement `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetDislikedTracksIdsResponse parses an HTTP response from a GetDislikedTracksIdsWithResponse call
|
||
func ParseGetDislikedTracksIdsResponse(rsp *http.Response) (*GetDislikedTracksIdsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetDislikedTracksIdsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result список треков
|
||
Result TracksList `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetLikedTracksIdsResponse parses an HTTP response from a GetLikedTracksIdsWithResponse call
|
||
func ParseGetLikedTracksIdsResponse(rsp *http.Response) (*GetLikedTracksIdsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetLikedTracksIdsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
// Library список треков
|
||
Library TracksList `json:"library"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404:
|
||
var dest struct {
|
||
InvocationInfo *InvocationInfo `json:"invocationInfo,omitempty"`
|
||
Result *struct {
|
||
Message *string `json:"message,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
} `json:"result,omitempty"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON404 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseLikeTracksResponse parses an HTTP response from a LikeTracksWithResponse call
|
||
func ParseLikeTracksResponse(rsp *http.Response) (*LikeTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &LikeTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result struct {
|
||
Revision *float32 `json:"revision,omitempty"`
|
||
} `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseRemoveLikedTracksResponse parses an HTTP response from a RemoveLikedTracksWithResponse call
|
||
func ParseRemoveLikedTracksResponse(rsp *http.Response) (*RemoveLikedTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &RemoveLikedTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetUserPlaylistsByIdsResponse parses an HTTP response from a GetUserPlaylistsByIdsWithResponse call
|
||
func ParseGetUserPlaylistsByIdsResponse(rsp *http.Response) (*GetUserPlaylistsByIdsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetUserPlaylistsByIdsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseCreatePlaylistResponse parses an HTTP response from a CreatePlaylistWithResponse call
|
||
func ParseCreatePlaylistResponse(rsp *http.Response) (*CreatePlaylistResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &CreatePlaylistResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetPlayListsResponse parses an HTTP response from a GetPlayListsWithResponse call
|
||
func ParseGetPlayListsResponse(rsp *http.Response) (*GetPlayListsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetPlayListsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result []Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetPlaylistByIdResponse parses an HTTP response from a GetPlaylistByIdWithResponse call
|
||
func ParseGetPlaylistByIdResponse(rsp *http.Response) (*GetPlaylistByIdResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetPlaylistByIdResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseChangePlaylistTracksResponse parses an HTTP response from a ChangePlaylistTracksWithResponse call
|
||
func ParseChangePlaylistTracksResponse(rsp *http.Response) (*ChangePlaylistTracksResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &ChangePlaylistTracksResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 412:
|
||
var dest struct {
|
||
Message *string `json:"message,omitempty"`
|
||
Name *string `json:"name,omitempty"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON412 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseDeletePlaylistResponse parses an HTTP response from a DeletePlaylistWithResponse call
|
||
func ParseDeletePlaylistResponse(rsp *http.Response) (*DeletePlaylistResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &DeletePlaylistResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
Result string `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseRenamePlaylistResponse parses an HTTP response from a RenamePlaylistWithResponse call
|
||
func ParseRenamePlaylistResponse(rsp *http.Response) (*RenamePlaylistResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &RenamePlaylistResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseGetRecommendationsResponse parses an HTTP response from a GetRecommendationsWithResponse call
|
||
func ParseGetRecommendationsResponse(rsp *http.Response) (*GetRecommendationsResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &GetRecommendationsResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result рекомендации для плейлиста
|
||
Result PlaylistRecommendations `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|
||
|
||
// ParseChangePlaylistVisibilityResponse parses an HTTP response from a ChangePlaylistVisibilityWithResponse call
|
||
func ParseChangePlaylistVisibilityResponse(rsp *http.Response) (*ChangePlaylistVisibilityResponse, error) {
|
||
bodyBytes, err := io.ReadAll(rsp.Body)
|
||
defer func() { _ = rsp.Body.Close() }()
|
||
if err != nil {
|
||
return nil, err
|
||
}
|
||
|
||
response := &ChangePlaylistVisibilityResponse{
|
||
Body: bodyBytes,
|
||
HTTPResponse: rsp,
|
||
}
|
||
|
||
switch {
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200:
|
||
var dest struct {
|
||
InvocationInfo InvocationInfo `json:"invocationInfo"`
|
||
|
||
// Result play list data
|
||
Result Playlist `json:"result"`
|
||
}
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON200 = &dest
|
||
|
||
case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400:
|
||
var dest BadRequest
|
||
if err := json.Unmarshal(bodyBytes, &dest); err != nil {
|
||
return nil, err
|
||
}
|
||
response.JSON400 = &dest
|
||
|
||
}
|
||
|
||
return response, nil
|
||
}
|