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 -5
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"
)
// GetClips gets clips
// GetClips gets clips with pagination (GET /clips).
func (c *Client) GetClips(ctx context.Context, page, pageSize int) ([]*models.Clip, error) {
params := map[string]string{
"page": "1",
@@ -33,7 +34,7 @@ func (c *Client) GetClips(ctx context.Context, page, pageSize int) ([]*models.Cl
return clips, nil
}
// GetClipsWillLike gets clips the user might like
// GetClipsWillLike gets clips the user might like (GET /clips/will/like).
func (c *Client) GetClipsWillLike(ctx context.Context) (*models.ClipsWillLike, error) {
var result models.ClipsWillLike
if err := c.request.Get(ctx, "/clips/will/like", nil, &result); err != nil {
@@ -42,8 +43,7 @@ func (c *Client) GetClipsWillLike(ctx context.Context) (*models.ClipsWillLike, e
return &result, nil
}
// GetArtistClips gets clips by an artist
// GET /artists/{artistID}/blocks/artist-clips
// GetArtistClips gets clips by an artist (GET /artists/{artistID}/blocks/artist-clips).
func (c *Client) GetArtistClips(ctx context.Context, artistID string) (*models.ArtistClipData, error) {
var result models.ArtistClipData
if err := c.request.Get(ctx, fmt.Sprintf("/artists/%s/blocks/artist-clips", artistID), nil, &result); err != nil {
@@ -52,7 +52,7 @@ func (c *Client) GetArtistClips(ctx context.Context, artistID string) (*models.A
return &result, nil
}
// GetShots gets shots
// GetShots gets shots with pagination (GET /shots).
func (c *Client) GetShots(ctx context.Context, page, pageSize int) ([]*models.Shot, error) {
params := map[string]string{
"page": "1",