Documentation ¶
Index ¶
- Constants
- type Album
- type Artist
- type BaseResult
- type Client
- type DeezerApiBackend
- func (b *DeezerApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, ...)
- func (b *DeezerApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, ...)
- func (b *DeezerApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
- func (b *DeezerApiBackend) Name() string
- func (b *DeezerApiBackend) OAuth2Setup(token oauth2.TokenSource) error
- func (b *DeezerApiBackend) OAuth2Strategy(redirectUrl *url.URL) auth.OAuth2Strategy
- func (b *DeezerApiBackend) Options() []models.BackendOption
- type Error
- type HistoryResult
- type Listen
- type LovedTrack
- type Result
- type Track
- type TracksResult
Constants ¶
View Source
const DefaultRateLimitWaitSeconds = 5
View Source
const MaxItemsPerGet = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResult ¶
type BaseResult struct {
Err *Error `json:"error,omitempty"`
}
func (BaseResult) Error ¶
func (r BaseResult) Error() *Error
type Client ¶
type Client struct { HttpClient *resty.Client // contains filtered or unexported fields }
func NewClient ¶
func NewClient(token oauth2.TokenSource) Client
func (Client) UserHistory ¶
func (c Client) UserHistory(offset int, limit int) (result HistoryResult, err error)
func (Client) UserTracks ¶
func (c Client) UserTracks(offset int, limit int) (TracksResult, error)
type DeezerApiBackend ¶
type DeezerApiBackend struct {
// contains filtered or unexported fields
}
func (*DeezerApiBackend) ExportListens ¶
func (b *DeezerApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.Progress)
func (*DeezerApiBackend) ExportLoves ¶
func (b *DeezerApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, progress chan models.Progress)
func (*DeezerApiBackend) FromConfig ¶
func (b *DeezerApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
func (*DeezerApiBackend) Name ¶
func (b *DeezerApiBackend) Name() string
func (*DeezerApiBackend) OAuth2Setup ¶
func (b *DeezerApiBackend) OAuth2Setup(token oauth2.TokenSource) error
func (*DeezerApiBackend) OAuth2Strategy ¶
func (b *DeezerApiBackend) OAuth2Strategy(redirectUrl *url.URL) auth.OAuth2Strategy
func (*DeezerApiBackend) Options ¶ added in v0.3.0
func (b *DeezerApiBackend) Options() []models.BackendOption
type HistoryResult ¶
type HistoryResult struct { BaseResult Next string `json:"next"` Previous string `json:"prev"` Total int `json:"total"` Tracks []Listen `json:"data"` }
type LovedTrack ¶
func (LovedTrack) AsLove ¶
func (t LovedTrack) AsLove() models.Love
type Track ¶
type Track struct { Id int `json:"id"` Type string `json:"type"` Link string `json:"link"` Title string `json:"title"` TitleVersion string `json:"title_version"` Duration int `json:"duration"` Rank int `json:"rank"` Readable bool `json:"readable"` Explicit bool `json:"explicit_lyrics"` Album Album `json:"album"` Artist Artist `json:"artist"` }
type TracksResult ¶
type TracksResult struct { BaseResult Next string `json:"next"` Previous string `json:"prev"` Total int `json:"total"` Tracks []LovedTrack `json:"data"` }
Click to show internal directories.
Click to hide internal directories.