docs: document packages, exported API and non-obvious logic

This commit is contained in:
Mathis Maquenne
2026-08-06 13:04:10 +02:00
parent 5dfd832d0d
commit b1ad9b4904
41 changed files with 757 additions and 7 deletions
+5
View File
@@ -18,6 +18,11 @@ type mediaError struct {
Message string `json:"message"`
}
// URL and Format read the first source Deezer offered, which is the best one
// available for the requested quality. Both index without checking because
// FetchMedia has already rejected empty and error responses; do not call them
// on a Media obtained any other way.
func (m *Media) URL() string {
return m.Data[0].Media[0].Sources[0].URL
}