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>
This commit is contained in:
1 parent
7a68ad86cb
commit
0456ca0665
54 files changed
+1097
-652
No files matched your search
+103
-101
@@ -1,3 +1,5 @@
|
||||
// Package yandexmusic provides the public API for the Yandex Music Go client.
|
||||
// It re-exports types and functions from the internal packages for convenient use.
|
||||
package yandexmusic
|
||||
|
||||
import (
|
||||
@@ -7,313 +9,313 @@ import (
|
||||
"gitea.mrixs.me/Mrixs/yandex-music-api-go/internal/ynison"
|
||||
)
|
||||
|
||||
// ClientConfig holds configuration for the Client
|
||||
// ClientConfig holds configuration for the Client.
|
||||
type ClientConfig = client.ClientConfig
|
||||
|
||||
// Client is the main Yandex Music API client
|
||||
// Client is the main Yandex Music API client.
|
||||
type Client = client.Client
|
||||
|
||||
// NewClient creates a new Yandex Music client
|
||||
// NewClient creates a new Yandex Music client with the given configuration.
|
||||
func NewClient(config ClientConfig) *Client {
|
||||
return client.NewClient(config)
|
||||
}
|
||||
|
||||
// Request is the HTTP request handler
|
||||
// Request is the HTTP request handler.
|
||||
type Request = client.Request
|
||||
|
||||
// DeviceCode represents the device authorization response
|
||||
// DeviceCode represents the device authorization response.
|
||||
type DeviceCode = client.DeviceCode
|
||||
|
||||
// OAuthToken represents an OAuth token response
|
||||
// OAuthToken represents an OAuth token response.
|
||||
type OAuthToken = client.OAuthToken
|
||||
|
||||
// Status represents account status
|
||||
// Status represents account status.
|
||||
type Status = client.Status
|
||||
|
||||
// Account represents a user account
|
||||
// Account represents a user account.
|
||||
type Account = client.Account
|
||||
|
||||
// Track represents a music track
|
||||
// Track represents a music track.
|
||||
type Track = models.Track
|
||||
|
||||
// Artist represents an artist
|
||||
// Artist represents an artist.
|
||||
type Artist = models.Artist
|
||||
|
||||
// Album represents an album
|
||||
// Album represents an album.
|
||||
type Album = models.Album
|
||||
|
||||
// Playlist represents a playlist
|
||||
// Playlist represents a playlist.
|
||||
type Playlist = models.Playlist
|
||||
|
||||
// User represents a user
|
||||
// User represents a user.
|
||||
type User = models.User
|
||||
|
||||
// DownloadInfo represents file download info
|
||||
// DownloadInfo represents file download info.
|
||||
type DownloadInfo = models.DownloadInfo
|
||||
|
||||
// SupplementLyrics represents lyrics content from supplement
|
||||
// SupplementLyrics represents lyrics content from supplement.
|
||||
type SupplementLyrics = models.SupplementLyrics
|
||||
|
||||
// Major represents major label info
|
||||
// Major represents major label info.
|
||||
type Major = models.Major
|
||||
|
||||
// Label represents a label
|
||||
// Label represents a label.
|
||||
type Label = models.Label
|
||||
|
||||
// Availability represents availability info
|
||||
// Availability represents availability info.
|
||||
type Availability = models.Availability
|
||||
|
||||
// Upsell represents upsell info
|
||||
// Upsell represents upsell info.
|
||||
type Upsell = models.Upsell
|
||||
|
||||
// AlbumMeta represents album metadata
|
||||
// AlbumMeta represents album metadata.
|
||||
type AlbumMeta = models.AlbumMeta
|
||||
|
||||
// Best represents best tracks info
|
||||
// Best represents best tracks info.
|
||||
type Best = models.Best
|
||||
|
||||
// Ratings represents artist ratings
|
||||
// Ratings represents artist ratings.
|
||||
type Ratings = models.Ratings
|
||||
|
||||
// Counts represents artist counts
|
||||
// Counts represents artist counts.
|
||||
type Counts = models.Counts
|
||||
|
||||
// TrackShort represents a lightweight track
|
||||
// TrackShort represents a lightweight track.
|
||||
type TrackShort = models.TrackShort
|
||||
|
||||
// TracksList represents a list of tracks with metadata
|
||||
// TracksList represents a list of tracks with metadata.
|
||||
type TracksList = models.TracksList
|
||||
|
||||
// Pager represents pagination info
|
||||
// Pager represents pagination info.
|
||||
type Pager = models.Pager
|
||||
|
||||
// TrackPosition represents track position
|
||||
// TrackPosition represents track position.
|
||||
type TrackPosition = models.TrackPosition
|
||||
|
||||
// TrailerInfo represents trailer info
|
||||
// TrailerInfo represents trailer info.
|
||||
type TrailerInfo = models.TrailerInfo
|
||||
|
||||
// Cover represents cover image info
|
||||
// Cover represents cover image info.
|
||||
type Cover = models.Cover
|
||||
|
||||
// ArtistBriefInfo represents brief artist info
|
||||
// ArtistBriefInfo represents brief artist info.
|
||||
type ArtistBriefInfo = models.ArtistBriefInfo
|
||||
|
||||
// ArtistDonations represents artist donations info
|
||||
// ArtistDonations represents artist donations info.
|
||||
type ArtistDonations = models.ArtistDonations
|
||||
|
||||
// DonationItem represents a donation item
|
||||
// DonationItem represents a donation item.
|
||||
type DonationItem = models.DonationItem
|
||||
|
||||
// Concert represents a concert (minimal)
|
||||
// Concert represents a concert (minimal).
|
||||
type Concert = models.Concert
|
||||
|
||||
// Clip represents a clip (short video)
|
||||
// Clip represents a clip (short video).
|
||||
type Clip = models.Clip
|
||||
|
||||
// SearchResult represents search results
|
||||
// SearchResult represents search results.
|
||||
type SearchResult = models.SearchResult
|
||||
|
||||
// SearchTracksResult represents track search results
|
||||
// SearchTracksResult represents track search results.
|
||||
type SearchTracksResult = models.SearchTracksResult
|
||||
|
||||
// SearchAlbumsResult represents album search results
|
||||
// SearchAlbumsResult represents album search results.
|
||||
type SearchAlbumsResult = models.SearchAlbumsResult
|
||||
|
||||
// SearchArtistsResult represents artist search results
|
||||
// SearchArtistsResult represents artist search results.
|
||||
type SearchArtistsResult = models.SearchArtistsResult
|
||||
|
||||
// SearchPlaylistsResult represents playlist search results
|
||||
// SearchPlaylistsResult represents playlist search results.
|
||||
type SearchPlaylistsResult = models.SearchPlaylistsResult
|
||||
|
||||
// SearchVideosResult represents video search results
|
||||
// SearchVideosResult represents video search results.
|
||||
type SearchVideosResult = models.SearchVideosResult
|
||||
|
||||
// SearchUsersResult represents user search results
|
||||
// SearchUsersResult represents user search results.
|
||||
type SearchUsersResult = models.SearchUsersResult
|
||||
|
||||
// SearchBanner represents a search banner
|
||||
// SearchBanner represents a search banner.
|
||||
type SearchBanner = models.SearchBanner
|
||||
|
||||
// Tag represents a search tag
|
||||
// Tag represents a search tag.
|
||||
type Tag = models.Tag
|
||||
|
||||
// Video represents a video
|
||||
// Video represents a video.
|
||||
type Video = models.Video
|
||||
|
||||
// ChartInfoMenu represents a chart info menu
|
||||
// ChartInfoMenu represents a chart info menu.
|
||||
type ChartInfoMenu = models.ChartInfoMenu
|
||||
|
||||
// ChartInfoMenuItem represents a chart info menu item
|
||||
// ChartInfoMenuItem represents a chart info menu item.
|
||||
type ChartInfoMenuItem = models.ChartInfoMenuItem
|
||||
|
||||
// ChartItems represents chart items response
|
||||
// ChartItems represents chart items response.
|
||||
type ChartItems = models.ChartItems
|
||||
|
||||
// AccountSettings represents account settings
|
||||
// AccountSettings represents account settings.
|
||||
type AccountSettings = models.AccountSettings
|
||||
|
||||
// Subscription represents subscription info
|
||||
// Subscription represents subscription info.
|
||||
type Subscription = models.Subscription
|
||||
|
||||
// PlusInfo represents Plus subscription info
|
||||
// PlusInfo represents Plus subscription info.
|
||||
type PlusInfo = models.PlusInfo
|
||||
|
||||
// PromoCodeStatus represents promo code status
|
||||
// PromoCodeStatus represents promo code status.
|
||||
type PromoCodeStatus = models.PromoCodeStatus
|
||||
|
||||
// Queue represents a playback queue
|
||||
// Queue represents a playback queue.
|
||||
type Queue = models.Queue
|
||||
|
||||
// QueueItem represents a queue item
|
||||
// QueueItem represents a queue item.
|
||||
type QueueItem = models.QueueItem
|
||||
|
||||
// PlayContext represents a play context
|
||||
// PlayContext represents a play context.
|
||||
type PlayContext = models.PlayContext
|
||||
|
||||
// PlayContextsData represents play contexts data
|
||||
// PlayContextsData represents play contexts data.
|
||||
type PlayContextsData = models.PlayContextsData
|
||||
|
||||
// Feed represents the main feed
|
||||
// Feed represents the main feed.
|
||||
type Feed = models.Feed
|
||||
|
||||
// Day represents a day in the feed
|
||||
// Day represents a day in the feed.
|
||||
type Day = models.Day
|
||||
|
||||
// DayBlock represents a block in a day
|
||||
// DayBlock represents a block in a day.
|
||||
type DayBlock = models.DayBlock
|
||||
|
||||
// DayBlockData represents data in a day block
|
||||
// DayBlockData represents data in a day block.
|
||||
type DayBlockData = models.DayBlockData
|
||||
|
||||
// GeneratedPlaylist represents a generated playlist
|
||||
// GeneratedPlaylist represents a generated playlist.
|
||||
type GeneratedPlaylist = models.GeneratedPlaylist
|
||||
|
||||
// Event represents a feed event
|
||||
// Event represents a feed event.
|
||||
type Event = models.Event
|
||||
|
||||
// AlbumEvent represents an album event
|
||||
// AlbumEvent represents an album event.
|
||||
type AlbumEvent = models.AlbumEvent
|
||||
|
||||
// ArtistEvent represents an artist event
|
||||
// ArtistEvent represents an artist event.
|
||||
type ArtistEvent = models.ArtistEvent
|
||||
|
||||
// TrackWithAds represents a track with ads
|
||||
// TrackWithAds represents a track with ads.
|
||||
type TrackWithAds = models.TrackWithAds
|
||||
|
||||
// Ad represents an ad
|
||||
// Ad represents an ad.
|
||||
type Ad = models.Ad
|
||||
|
||||
// AdParams represents ad parameters
|
||||
// AdParams represents ad parameters.
|
||||
type AdParams = models.AdParams
|
||||
|
||||
// Landing represents a landing page
|
||||
// Landing represents a landing page.
|
||||
type Landing = models.Landing
|
||||
|
||||
// LandingBlock represents a block in a landing
|
||||
// LandingBlock represents a block in a landing.
|
||||
type LandingBlock = models.LandingBlock
|
||||
|
||||
// LandingBlockData represents data in a landing block
|
||||
// LandingBlockData represents data in a landing block.
|
||||
type LandingBlockData = models.LandingBlockData
|
||||
|
||||
// LandingList represents a list of landings
|
||||
// LandingList represents a list of landings.
|
||||
type LandingList = models.LandingList
|
||||
|
||||
// LyricsInfo represents lyrics information
|
||||
// LyricsInfo represents lyrics information.
|
||||
type LyricsInfo = models.LyricsInfo
|
||||
|
||||
// VideoSupplement represents video supplement
|
||||
// VideoSupplement represents video supplement.
|
||||
type VideoSupplement = models.VideoSupplement
|
||||
|
||||
// Supplement represents track supplement
|
||||
// Supplement represents track supplement.
|
||||
type Supplement = models.Supplement
|
||||
|
||||
// LyricsMajor represents a lyrics provider (e.g., Genius, Musixmatch)
|
||||
// LyricsMajor represents a lyrics provider (e.g., Genius, Musixmatch).
|
||||
type LyricsMajor = models.LyricsMajor
|
||||
|
||||
// TrackLyrics represents lyrics information from /tracks/{id}/lyrics endpoint
|
||||
// TrackLyrics represents lyrics information from /tracks/{id}/lyrics endpoint.
|
||||
type TrackLyrics = models.TrackLyrics
|
||||
|
||||
// Credits represents track credits
|
||||
// Credits represents track credits.
|
||||
type Credits = models.Credits
|
||||
|
||||
// Credit represents a credit item
|
||||
// Credit represents a credit item.
|
||||
type Credit = models.Credit
|
||||
|
||||
// ArtistTracks represents a page of tracks by an artist
|
||||
// ArtistTracks represents a page of tracks by an artist.
|
||||
type ArtistTracks = models.ArtistTracks
|
||||
|
||||
// ArtistAlbums represents a page of albums by an artist
|
||||
// ArtistAlbums represents a page of albums by an artist.
|
||||
type ArtistAlbums = models.ArtistAlbums
|
||||
|
||||
// RadioStation represents a radio station
|
||||
// RadioStation represents a radio station.
|
||||
type RadioStation = models.RadioStation
|
||||
|
||||
// StationTracksResult represents station tracks result
|
||||
// StationTracksResult represents station tracks result.
|
||||
type StationTracksResult = models.StationTracksResult
|
||||
|
||||
// RotorStation represents a rotor (generative) station
|
||||
// RotorStation represents a rotor (generative) station.
|
||||
type RotorStation = models.RotorStation
|
||||
|
||||
// RotorSettings represents rotor station settings
|
||||
// RotorSettings represents rotor station settings.
|
||||
type RotorSettings = models.RotorSettings
|
||||
|
||||
// RotorStationTracksResult represents rotor station tracks result
|
||||
// RotorStationTracksResult represents rotor station tracks result.
|
||||
type RotorStationTracksResult = models.RotorStationTracksResult
|
||||
|
||||
// RotorSession represents a rotor session
|
||||
// RotorSession represents a rotor session.
|
||||
type RotorSession = models.RotorSession
|
||||
|
||||
// SessionFeedback represents session feedback
|
||||
// SessionFeedback represents session feedback.
|
||||
type SessionFeedback = models.SessionFeedback
|
||||
|
||||
// SessionFeedbacks represents multiple session feedbacks
|
||||
// SessionFeedbacks represents multiple session feedbacks.
|
||||
type SessionFeedbacks = models.SessionFeedbacks
|
||||
|
||||
// Experiments represents experiments
|
||||
// Experiments represents experiments.
|
||||
type Experiments = models.Experiments
|
||||
|
||||
// ExperimentDetail represents experiment details
|
||||
// ExperimentDetail represents experiment details.
|
||||
type ExperimentDetail = models.ExperimentDetail
|
||||
|
||||
// Permissions represents user permissions
|
||||
// Permissions represents user permissions.
|
||||
type Permissions = models.Permissions
|
||||
|
||||
// PermissionAlerts represents permission alerts
|
||||
// PermissionAlerts represents permission alerts.
|
||||
type PermissionAlerts = models.PermissionAlerts
|
||||
|
||||
// PermissionAlert represents a permission alert
|
||||
// PermissionAlert represents a permission alert.
|
||||
type PermissionAlert = models.PermissionAlert
|
||||
|
||||
// ContentRestrictions represents content restrictions
|
||||
// ContentRestrictions represents content restrictions.
|
||||
type ContentRestrictions = models.ContentRestrictions
|
||||
|
||||
// JSONBackend defines the interface for JSON encoding/decoding
|
||||
// JSONBackend defines the interface for JSON encoding/decoding.
|
||||
type JSONBackend = utils.JSONBackend
|
||||
|
||||
// GetDefaultJSONBackend returns the default JSON backend
|
||||
// GetDefaultJSONBackend returns the default JSON backend.
|
||||
func GetDefaultJSONBackend() JSONBackend {
|
||||
return utils.GetDefaultJSONBackend()
|
||||
}
|
||||
|
||||
// SchemaMismatchConfig holds configuration for schema mismatch handling
|
||||
// SchemaMismatchConfig holds configuration for schema mismatch handling.
|
||||
type SchemaMismatchConfig = utils.SchemaMismatchConfig
|
||||
|
||||
// DefaultSchemaMismatchConfig returns the default configuration
|
||||
// DefaultSchemaMismatchConfig returns the default configuration.
|
||||
func DefaultSchemaMismatchConfig() SchemaMismatchConfig {
|
||||
return utils.DefaultSchemaMismatchConfig()
|
||||
}
|
||||
|
||||
// SchemaMismatchHandler is a callback for handling schema mismatches
|
||||
// SchemaMismatchHandler is a callback for handling schema mismatches.
|
||||
type SchemaMismatchHandler = utils.SchemaMismatchHandler
|
||||
|
||||
// SchemaMismatch represents a mismatch between expected and actual API response
|
||||
// SchemaMismatch represents a mismatch between expected and actual API response.
|
||||
type SchemaMismatch = utils.SchemaMismatch
|
||||
|
||||
// YnisonClient represents a Ynison WebSocket client
|
||||
// YnisonClient represents a Ynison WebSocket client.
|
||||
type YnisonClient = ynison.YnisonClient
|
||||
|
||||
// DeviceConfig holds device configuration for Ynison
|
||||
// DeviceConfig holds device configuration for Ynison.
|
||||
type DeviceConfig = ynison.DeviceConfig
|
||||
|
||||
// Example usage:
|
||||
|
||||
Reference in new issue
Block a user