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

+5 -7
View File
@@ -1,3 +1,4 @@
// Package client provides methods for interacting with Yandex Music API endpoints.
package client
import (
@@ -7,7 +8,7 @@ import (
"gitea.mrixs.me/Mrixs/yandex-music-api-go/internal/models"
)
// GetLabels gets all labels
// GetLabels gets all labels (GET /labels).
func (c *Client) GetLabels(ctx context.Context) ([]*models.Label, error) {
var result []models.Label
if err := c.request.Get(ctx, "/labels", nil, &result); err != nil {
@@ -22,8 +23,7 @@ func (c *Client) GetLabels(ctx context.Context) ([]*models.Label, error) {
return labels, nil
}
// GetLabel gets a label by ID
// GET /labels/{labelID}
// GetLabel gets a label by ID (GET /labels/{labelID}).
func (c *Client) GetLabel(ctx context.Context, labelID string) (*models.Label, error) {
var result models.Label
if err := c.request.Get(ctx, fmt.Sprintf("/labels/%s", labelID), nil, &result); err != nil {
@@ -33,8 +33,7 @@ func (c *Client) GetLabel(ctx context.Context, labelID string) (*models.Label, e
return &result, nil
}
// GetLabelAlbums gets albums for a label
// GET /labels/{labelID}/albums
// GetLabelAlbums gets albums for a label (GET /labels/{labelID}/albums).
func (c *Client) GetLabelAlbums(ctx context.Context, labelID string, page, pageSize int) (*models.LabelAlbums, error) {
params := map[string]string{}
if page > 0 {
@@ -51,8 +50,7 @@ func (c *Client) GetLabelAlbums(ctx context.Context, labelID string, page, pageS
return &result, nil
}
// GetLabelArtists gets artists for a label
// GET /labels/{labelID}/artists
// GetLabelArtists gets artists for a label (GET /labels/{labelID}/artists).
func (c *Client) GetLabelArtists(ctx context.Context, labelID string, page, pageSize int) (*models.LabelArtists, error) {
params := map[string]string{}
if page > 0 {