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,10 +1,11 @@
|
||||
// Package models provides data models for the Yandex Music API.
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// Label represents a label
|
||||
// Label represents a label from the Yandex Music API.
|
||||
type Label struct {
|
||||
BaseModel
|
||||
ID string `json:"id"`
|
||||
@@ -17,7 +18,7 @@ type Label struct {
|
||||
Owner *User `json:"owner"`
|
||||
}
|
||||
|
||||
// DeJSON deserializes a Label from JSON
|
||||
// DeJSON deserializes a Label from JSON data.
|
||||
func (l *Label) DeJSON(data []byte, client ClientInterface) (Model, error) {
|
||||
var raw map[string]json.RawMessage
|
||||
if err := json.Unmarshal(data, &raw); err != nil {
|
||||
@@ -58,7 +59,7 @@ func (l *Label) DeJSON(data []byte, client ClientInterface) (Model, error) {
|
||||
return label, nil
|
||||
}
|
||||
|
||||
// DeList deserializes a list of Labels
|
||||
// DeList deserializes a list of Labels from JSON data.
|
||||
func (l *Label) DeList(data []byte, client ClientInterface) ([]Model, error) {
|
||||
var rawList []json.RawMessage
|
||||
if err := json.Unmarshal(data, &rawList); err != nil {
|
||||
@@ -76,7 +77,7 @@ func (l *Label) DeList(data []byte, client ClientInterface) ([]Model, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// LabelAlbums represents label albums
|
||||
// LabelAlbums represents label albums.
|
||||
type LabelAlbums struct {
|
||||
BaseModel
|
||||
Albums []Album `json:"albums"`
|
||||
@@ -85,7 +86,7 @@ type LabelAlbums struct {
|
||||
PageSize int `json:"page_size"`
|
||||
}
|
||||
|
||||
// LabelArtists represents label artists
|
||||
// LabelArtists represents label artists.
|
||||
type LabelArtists struct {
|
||||
BaseModel
|
||||
Artists []Artist `json:"artists"`
|
||||
|
||||
Reference in new issue
Block a user