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,19 +1,28 @@
|
||||
// Package models provides data models for the Yandex Music API.
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// ClientInterface defines the minimal client interface needed by models
|
||||
// ClientInterface defines the minimal client interface needed by models.
|
||||
// Models use this to access the underlying request handler.
|
||||
type ClientInterface interface {
|
||||
// GetRequest returns the underlying request handler.
|
||||
GetRequest() RequestInterface
|
||||
}
|
||||
|
||||
// RequestInterface defines the minimal request interface needed by models
|
||||
// RequestInterface defines the minimal request interface needed by models.
|
||||
// It provides methods for making HTTP requests to the Yandex Music API.
|
||||
type RequestInterface interface {
|
||||
// Get performs a GET request to the given path with query parameters.
|
||||
Get(ctx context.Context, path string, params map[string]string, result any) error
|
||||
// Post performs a POST request to the given path with a JSON body.
|
||||
Post(ctx context.Context, path string, body any, result any) error
|
||||
// Put performs a PUT request to the given path with a JSON body.
|
||||
Put(ctx context.Context, path string, body any, result any) error
|
||||
// Delete performs a DELETE request to the given path with an optional JSON body.
|
||||
Delete(ctx context.Context, path string, body any, result any) error
|
||||
// Download downloads a file from the given URL and returns the raw response body.
|
||||
Download(ctx context.Context, url string) ([]byte, error)
|
||||
}
|
||||
Reference in new issue
Block a user