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
@@ -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"
|
||||
)
|
||||
|
||||
// GetConcerts gets concerts
|
||||
// GetConcerts gets concerts with pagination (GET /concerts).
|
||||
func (c *Client) GetConcerts(ctx context.Context, page, pageSize int) (*models.ConcertFeed, error) {
|
||||
params := map[string]string{
|
||||
"page": "1",
|
||||
@@ -27,7 +28,7 @@ func (c *Client) GetConcerts(ctx context.Context, page, pageSize int) (*models.C
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// GetConcertFeed gets concert feed
|
||||
// GetConcertFeed gets the concert feed (GET /concerts/feed).
|
||||
func (c *Client) GetConcertFeed(ctx context.Context) (*models.ConcertFeed, error) {
|
||||
var result models.ConcertFeed
|
||||
if err := c.request.Get(ctx, "/concerts/feed", nil, &result); err != nil {
|
||||
@@ -36,8 +37,7 @@ func (c *Client) GetConcertFeed(ctx context.Context) (*models.ConcertFeed, error
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// GetConcertInfo gets concert info
|
||||
// GET /concerts/{concertID}/info
|
||||
// GetConcertInfo gets concert info by ID (GET /concerts/{concertID}/info).
|
||||
func (c *Client) GetConcertInfo(ctx context.Context, concertID string) (*models.ConcertInfo, error) {
|
||||
var result models.ConcertInfo
|
||||
if err := c.request.Get(ctx, fmt.Sprintf("/concerts/%s/info", concertID), nil, &result); err != nil {
|
||||
@@ -46,7 +46,7 @@ func (c *Client) GetConcertInfo(ctx context.Context, concertID string) (*models.
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// GetConcertLocations gets concert locations
|
||||
// GetConcertLocations gets concert locations (GET /concerts/locations).
|
||||
func (c *Client) GetConcertLocations(ctx context.Context) (*models.ConcertLocations, error) {
|
||||
var result models.ConcertLocations
|
||||
if err := c.request.Get(ctx, "/concerts/locations", nil, &result); err != nil {
|
||||
@@ -55,8 +55,7 @@ func (c *Client) GetConcertLocations(ctx context.Context) (*models.ConcertLocati
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// GetConcertTabs gets concert tabs
|
||||
// GET /concerts/tab-config
|
||||
// GetConcertTabs gets concert tab configuration (GET /concerts/tab-config).
|
||||
func (c *Client) GetConcertTabs(ctx context.Context) (*models.ConcertTabConfig, error) {
|
||||
var result models.ConcertTabConfig
|
||||
if err := c.request.Get(ctx, "/concerts/tab-config", nil, &result); err != nil {
|
||||
|
||||
Reference in new issue
Block a user