Files
yandex-music-api-go/internal/models/search.go
T
MrixsandClaude Code 0456ca0665 Add comprehensive godoc documentation to all exported symbols
- Document all exported types, functions, methods, and constants across 52 files
- Add package-level doc comments to client, models, utils, and ynison packages
- Document HTTP method and endpoint path for each API client method
- Document model struct fields and DeJSON/DeList/ToJSON/ToMap methods
- Fix duplicate package doc comment in internal/models/base.go

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-18 08:57:43 +03:00

84 lines
2.4 KiB
Go

// Package models provides data models for the Yandex Music API.
package models
// SearchResult represents search results from the Yandex Music API.
type SearchResult struct {
Tracks *SearchTracksResult `json:"tracks"`
Albums *SearchAlbumsResult `json:"albums"`
Artists *SearchArtistsResult `json:"artists"`
Playlists *SearchPlaylistsResult `json:"playlists"`
Videos *SearchVideosResult `json:"videos"`
Users *SearchUsersResult `json:"users"`
}
// SearchTracksResult represents track search results.
type SearchTracksResult struct {
Total int `json:"total"`
Results []Track `json:"results"`
}
// SearchAlbumsResult represents album search results.
type SearchAlbumsResult struct {
Total int `json:"total"`
Results []Album `json:"results"`
}
// SearchArtistsResult represents artist search results.
type SearchArtistsResult struct {
Total int `json:"total"`
Results []Artist `json:"results"`
}
// SearchPlaylistsResult represents playlist search results.
type SearchPlaylistsResult struct {
Total int `json:"total"`
Results []Playlist `json:"results"`
}
// SearchVideosResult represents video search results.
type SearchVideosResult struct {
Total int `json:"total"`
Results []Video `json:"results"`
}
// SearchUsersResult represents user search results.
type SearchUsersResult struct {
Total int `json:"total"`
Results []User `json:"results"`
}
// SearchBanner represents a search banner.
type SearchBanner struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Image string `json:"image"`
URL string `json:"url"`
Action string `json:"action"`
Type string `json:"type"`
}
// Tag represents a search tag.
type Tag struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Count int `json:"count"`
Type string `json:"type"`
}
// Video represents a video (minimal).
type Video struct {
BaseModel
ID string `json:"id"`
Title string `json:"title"`
Duration int `json:"duration"`
CoverURI string `json:"cover_uri"`
PreviewURI string `json:"preview_uri"`
Available bool `json:"available"`
Views int `json:"views"`
Likes int `json:"likes"`
CreatedAt string `json:"created_at"`
Owner *User `json:"owner"`
}