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 (
|
||||
@@ -6,7 +7,7 @@ import (
|
||||
"gitea.mrixs.me/Mrixs/yandex-music-api-go/internal/models"
|
||||
)
|
||||
|
||||
// GetPins gets user's pins
|
||||
// GetPins gets user's pins (GET /pins).
|
||||
func (c *Client) GetPins(ctx context.Context) (*models.PinsList, error) {
|
||||
var result models.PinsList
|
||||
if err := c.request.Get(ctx, "/pins", nil, &result); err != nil {
|
||||
@@ -15,7 +16,7 @@ func (c *Client) GetPins(ctx context.Context) (*models.PinsList, error) {
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// AddPin adds a pin
|
||||
// AddPin adds a pin (POST /pins).
|
||||
func (c *Client) AddPin(ctx context.Context, pinType, entityID string) (*models.Pin, error) {
|
||||
params := map[string]string{
|
||||
"type": pinType,
|
||||
@@ -29,7 +30,7 @@ func (c *Client) AddPin(ctx context.Context, pinType, entityID string) (*models.
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// RemovePin removes a pin
|
||||
// RemovePin removes a pin by ID (DELETE /pins).
|
||||
func (c *Client) RemovePin(ctx context.Context, pinID string) error {
|
||||
params := map[string]string{
|
||||
"pin_id": pinID,
|
||||
@@ -38,7 +39,7 @@ func (c *Client) RemovePin(ctx context.Context, pinID string) error {
|
||||
return c.request.Delete(ctx, "/pins", params, &result)
|
||||
}
|
||||
|
||||
// GetPresaves gets user's presaves
|
||||
// GetPresaves gets user's presaves (GET /presaves).
|
||||
func (c *Client) GetPresaves(ctx context.Context) (*models.Presaves, error) {
|
||||
var result models.Presaves
|
||||
if err := c.request.Get(ctx, "/presaves", nil, &result); err != nil {
|
||||
|
||||
Reference in new issue
Block a user