Documentation ¶
Index ¶
- Constants
- Variables
- func ToMap(obj []byte, data interface{}) error
- type Album
- type Artist
- type Config
- type Creator
- type Error
- type Item
- type Login
- type Playlist
- type Search
- type Session
- func (s *Session) DownloadImage(id string) ([]byte, error)
- func (s *Session) Get(what string, id interface{}, obj interface{}) error
- func (s *Session) GetOauth2URL() (authURL string)
- func (s *Session) IsValid() bool
- func (s *Session) LoadSession(fn string) (err error)
- func (s *Session) Login(username, password string) error
- func (s *Session) LoginWithOauth2Code(code string) (err error)
- func (s *Session) SaveSession(fn string) (err error)
- type Track
- type TrackPath
- type Tracks
- type TracksFavorite
- type User
Constants ¶
View Source
const ( LOGIN = "login/username" FAVORITETRACKS = "users/%v/favorites/tracks" TRACK = "tracks/%v" TRACKURL = "tracks/%v/streamUrl" TRACKRADIO = "tracks/%v/radio" ARTIST = "artists/%v" ARTISTTOPTRACKS = "artists/%v/toptracks" ARTISTRADIO = "artists/%v/radio" ALBUM = "albums/%v" ALBUMTRACKS = "albums/%v/tracks" PLAYLIST = "playlists/%v" PLAYLISTTRACKS = "playlists/%v/tracks" USER = "users/%v" SEARCH = "search?query=%v" SESSIONS = "sessions" )
View Source
const ( MASTER = iota LOSSLESS HIGH LOW )
View Source
const ( API_TOKEN = "wc8j_yBJd20zOmx0" CLIENT_ID = "ck3zaWMi8Ka_XdI0" )
Variables ¶
View Source
var (
IMGPATH = "https://resources.tidal.com/images/%s/%dx%d.jpg"
)
View Source
var Quality = map[int]string{MASTER: "HI_RES", LOSSLESS: "LOSSLESS", HIGH: "HIGH", LOW: "LOW"}
View Source
var Types = map[string]interface{}{ LOGIN: new(Login), }
Functions ¶
Types ¶
type Album ¶
type Album struct { Id int `json:"id"` Title string `json:"title"` Cover string `json:"cover"` NumberOfTracks int `json:"numberOfTracks"` Duration int `json:"duration"` Artist Artist `json:"artist"` ReleaseDate string `json:"releaseDate"` Copyright string `json:"copyright"` Upc string `json:"ups"` Tracks *Tracks // contains filtered or unexported fields }
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config stores TIDAL client configuration
type Playlist ¶
type Playlist struct { UUID string `json:"uuid"` Title string `json:"title"` Description string `json:"description"` Creator Creator `json:"creator"` Type string `json:"type"` IsPublic bool `json:"publicPlaylist"` Created string `json:"created"` LastUpdated string `json:"lastUpdated"` NumberOfTracks int `json:"numberOfTracks"` Duration int `json:"duration"` Url string `json:"url"` Image string `json:"image"` SquareImage string `json:"squareImage"` Popularity int `json:"popularity"` Tracks *Tracks }
type Session ¶
type Session struct { ClientUniqueKey string SessionID string `json:"sessionId"` CountryCode string `json:"countryCode"` UserID int `json:"userId"` ChannelID int `json:"channelId"` PartnerID int `json:"partnerId"` Quality string CodeChallenge string CodeVerifier string Token *oauth2.Token // contains filtered or unexported fields }
func NewSession ¶
func (*Session) GetOauth2URL ¶
func (*Session) LoadSession ¶
func (*Session) LoginWithOauth2Code ¶
func (*Session) SaveSession ¶
type Track ¶
type Track struct { Duration int `json:"duration"` ReplayGain float32 `json:"replayGain"` Copyright string `json:"copyright"` Artists []Artist `json:"artists"` URL string `json:"url"` ISRC string `json:"isrc"` Editable bool `json:"editable"` SurroundTypes []interface{} `json:"surroundTypes"` Artist Artist `json:"artist"` Explicit bool `json:"explicit"` AudioQuality string `json:"audioQuality"` ID int `json:"id"` Peak float32 `json:"peak"` StreamReady bool `json:"streamReady"` StreamStartDate string `json:"streamStartDate"` Popularity int `json:"popularity"` Album Album `json:"album"` Title string `json:"title"` AllowStreaming bool `json:"allowStreaming"` TrackNumber int `json:"trackNumber"` VolumeNumber int `json:"volumeNumber"` Version string `json:"version"` Path TrackPath }
type TracksFavorite ¶
Click to show internal directories.
Click to hide internal directories.