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:
MrixsandClaude Code committed 2026-10-18 08:57:43 +03:00
1 parent 7a68ad86cb
commit 0456ca0665
54 files changed
+1097 -652

No files matched your search

+9 -8
View File
@@ -1,10 +1,11 @@
// Package models provides data models for the Yandex Music API.
package models
import (
"encoding/json"
)
// Landing represents a landing page
// Landing represents a landing page from the Yandex Music API.
type Landing struct {
BaseModel
ID string `json:"id"`
@@ -16,7 +17,7 @@ type Landing struct {
Available bool `json:"available"`
}
// DeJSON deserializes a Landing from JSON
// DeJSON deserializes a Landing from JSON data.
func (l *Landing) DeJSON(data []byte, c ClientInterface) (Model, error) {
var raw map[string]json.RawMessage
if err := json.Unmarshal(data, &raw); err != nil {
@@ -53,7 +54,7 @@ func (l *Landing) DeJSON(data []byte, c ClientInterface) (Model, error) {
return landing, nil
}
// DeList deserializes a list of Landings
// DeList deserializes a list of Landings from JSON data.
func (l *Landing) DeList(data []byte, c ClientInterface) ([]Model, error) {
var rawList []json.RawMessage
if err := json.Unmarshal(data, &rawList); err != nil {
@@ -71,7 +72,7 @@ func (l *Landing) DeList(data []byte, c ClientInterface) ([]Model, error) {
return result, nil
}
// LandingBlock represents a block in a landing
// LandingBlock represents a block in a landing.
type LandingBlock struct {
BaseModel
ID string `json:"id"`
@@ -81,7 +82,7 @@ type LandingBlock struct {
Data *LandingBlockData `json:"data"`
}
// LandingBlockData represents data in a landing block
// LandingBlockData represents data in a landing block.
type LandingBlockData struct {
Tracks []Track `json:"tracks"`
Playlists []Playlist `json:"playlists"`
@@ -90,7 +91,7 @@ type LandingBlockData struct {
GeneratedPlaylist *GeneratedPlaylist `json:"generated_playlist"`
}
// LandingList represents a list of landings
// LandingList represents a list of landings.
type LandingList struct {
BaseModel
Landings []Landing `json:"landings"`
@@ -99,7 +100,7 @@ type LandingList struct {
PageSize int `json:"page_size"`
}
// DeJSON deserializes a LandingList from JSON
// DeJSON deserializes a LandingList from JSON data.
func (ll *LandingList) DeJSON(data []byte, c ClientInterface) (Model, error) {
var raw map[string]json.RawMessage
if err := json.Unmarshal(data, &raw); err != nil {
@@ -126,7 +127,7 @@ func (ll *LandingList) DeJSON(data []byte, c ClientInterface) (Model, error) {
return list, nil
}
// DeList deserializes a list of LandingLists
// DeList deserializes a list of LandingLists from JSON data.
func (ll *LandingList) DeList(data []byte, c ClientInterface) ([]Model, error) {
var rawList []json.RawMessage
if err := json.Unmarshal(data, &rawList); err != nil {