refactor: use methods instead of functions

This commit is contained in:
Mathis Maquenne
2024-10-14 16:21:21 +02:00
parent ea9fcead7e
commit 142dcfa30a
6 changed files with 49 additions and 47 deletions
+27
View File
@@ -0,0 +1,27 @@
package deezer
type Media struct {
Errors []MediaError `json:"errors"`
Data []struct {
Media []struct {
Type string `json:"media_type"`
Cipher Cipher `json:"cipher"`
Format string `json:"format"`
Sources []Source `json:"sources"`
}
} `json:"data"`
}
type MediaError struct {
Code int `json:"code"`
Message string `json:"message"`
}
type Cipher struct {
Type string `json:"type"`
}
type Source struct {
URL string `json:"url"`
Provider string `json:"provider"`
}