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

+9 -7
View File
@@ -1,3 +1,4 @@
// Package ynison provides a Ynison WebSocket client for player synchronization.
package ynison
import (
@@ -6,7 +7,8 @@ import (
"gitea.mrixs.me/Mrixs/yandex-music-api-go/internal/ynison/proto"
)
// CreatePlayingStatus creates a playing status
// CreatePlayingStatus creates a playing status with the given parameters.
// The version timestamp is set to the current time.
func CreatePlayingStatus(progressMs, durationMs int64, paused bool, playbackSpeed float64, deviceID string) *proto.PlayingStatus {
return &proto.PlayingStatus{
ProgressMs: progressMs,
@@ -21,7 +23,7 @@ func CreatePlayingStatus(progressMs, durationMs int64, paused bool, playbackSpee
}
}
// CreatePlayable creates a playable entity
// CreatePlayable creates a playable entity with the given parameters.
func CreatePlayable(playableID, albumID, from, title, coverURL string, playableType proto.PlayablePlayableType) *proto.Playable {
return &proto.Playable{
PlayableId: playableID,
@@ -33,7 +35,7 @@ func CreatePlayable(playableID, albumID, from, title, coverURL string, playableT
}
}
// CreateTrackPlayable creates a track playable
// CreateTrackPlayable creates a track playable with the given parameters.
func CreateTrackPlayable(playableID, albumID, from, title, coverURL string, trackSourceKey uint32, batchID string) *proto.Playable {
return &proto.Playable{
PlayableId: playableID,
@@ -49,7 +51,7 @@ func CreateTrackPlayable(playableID, albumID, from, title, coverURL string, trac
}
}
// CreateVideoClipPlayable creates a video clip playable
// CreateVideoClipPlayable creates a video clip playable with the given parameters.
func CreateVideoClipPlayable(playableID, from, title, coverURL string, recommendationType proto.VideoClipInfoRecommendationType) *proto.Playable {
return &proto.Playable{
PlayableId: playableID,
@@ -63,7 +65,7 @@ func CreateVideoClipPlayable(playableID, from, title, coverURL string, recommend
}
}
// CreatePlayerQueue creates a player queue
// CreatePlayerQueue creates a player queue with the given parameters.
func CreatePlayerQueue(entityID string, entityType proto.PlayerQueueEntityType, playables []*proto.Playable, currentIndex int32, deviceID string) *proto.PlayerQueue {
return &proto.PlayerQueue{
EntityId: entityID,
@@ -82,7 +84,7 @@ func CreatePlayerQueue(entityID string, entityType proto.PlayerQueueEntityType,
}
}
// CreateWaveQueue creates a wave queue
// CreateWaveQueue creates a wave queue with the given parameters.
func CreateWaveQueue(recommended []*proto.Playable, liveIndex int32, sessionID string, deviceID string) *proto.PlayerQueueQueue {
// Build track sources from playables
var trackSources []*proto.PlayerQueueQueueWaveQueueEntityOptionsTrackSourceWithKey
@@ -111,7 +113,7 @@ func CreateWaveQueue(recommended []*proto.Playable, liveIndex int32, sessionID s
}
}
// CreateGenerativeQueue creates a generative queue
// CreateGenerativeQueue creates a generative queue with the given ID.
func CreateGenerativeQueue(id string) *proto.PlayerQueueQueue {
return &proto.PlayerQueueQueue{
GenerativeQueue: &proto.PlayerQueueQueueGenerativeQueue{