Documentation ¶
Index ¶
- Constants
- type Album
- type Artist
- type Client
- type Cursors
- type ExternalIds
- type ExternalUrls
- type Image
- type Listen
- type RecentlyPlayedResult
- type SavedTrack
- type SpotifyApiBackend
- func (b *SpotifyApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, ...)
- func (b *SpotifyApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, ...)
- func (b *SpotifyApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
- func (b *SpotifyApiBackend) Name() string
- func (b *SpotifyApiBackend) OAuth2Config(redirectUrl *url.URL) oauth2.Config
- func (b *SpotifyApiBackend) OAuth2Setup(token oauth2.TokenSource) error
- func (b *SpotifyApiBackend) OAuth2Strategy(redirectUrl *url.URL) auth.OAuth2Strategy
- func (b *SpotifyApiBackend) Options() []models.BackendOption
- type Track
- type TracksResult
Constants ¶
View Source
const (
MaxItemsPerGet = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Album ¶
type Album struct { Id string `json:"id"` Name string `json:"name"` Href string `json:"href"` Uri string `json:"uri"` Type string `json:"type"` TotalTracks int `json:"total_tracks"` ReleaseDate string `json:"release_date"` ReleaseDatePrecision string `json:"release_date_precision"` AlbumType string `json:"album_type"` ExternalUrls ExternalUrls `json:"external_urls"` Artists []Artist `json:"artists"` Images []Image `json:"images"` }
type Client ¶
type Client struct {
HttpClient *resty.Client
}
func NewClient ¶
func NewClient(token oauth2.TokenSource) Client
func (Client) RecentlyPlayedAfter ¶
func (Client) RecentlyPlayedBefore ¶
func (Client) UserTracks ¶
func (c Client) UserTracks(offset int, limit int) (result TracksResult, err error)
type ExternalIds ¶
type ExternalUrls ¶
type ExternalUrls struct {
Spotify string `json:"spotify"`
}
type RecentlyPlayedResult ¶
type SavedTrack ¶
func (SavedTrack) AsLove ¶
func (t SavedTrack) AsLove() models.Love
type SpotifyApiBackend ¶
type SpotifyApiBackend struct {
// contains filtered or unexported fields
}
func (*SpotifyApiBackend) ExportListens ¶
func (b *SpotifyApiBackend) ExportListens(oldestTimestamp time.Time, results chan models.ListensResult, progress chan models.Progress)
func (*SpotifyApiBackend) ExportLoves ¶
func (b *SpotifyApiBackend) ExportLoves(oldestTimestamp time.Time, results chan models.LovesResult, progress chan models.Progress)
func (*SpotifyApiBackend) FromConfig ¶
func (b *SpotifyApiBackend) FromConfig(config *config.ServiceConfig) models.Backend
func (*SpotifyApiBackend) Name ¶
func (b *SpotifyApiBackend) Name() string
func (*SpotifyApiBackend) OAuth2Config ¶
func (b *SpotifyApiBackend) OAuth2Config(redirectUrl *url.URL) oauth2.Config
func (*SpotifyApiBackend) OAuth2Setup ¶
func (b *SpotifyApiBackend) OAuth2Setup(token oauth2.TokenSource) error
func (*SpotifyApiBackend) OAuth2Strategy ¶
func (b *SpotifyApiBackend) OAuth2Strategy(redirectUrl *url.URL) auth.OAuth2Strategy
func (*SpotifyApiBackend) Options ¶ added in v0.3.0
func (b *SpotifyApiBackend) Options() []models.BackendOption
type Track ¶
type Track struct { Id string `json:"id"` Name string `json:"name"` Href string `json:"href"` Uri string `json:"uri"` Type string `json:"type"` DiscNumber int `json:"disc_number"` TrackNumber int `json:"track_number"` DurationMs int `json:"duration_ms"` Explicit bool `json:"explicit"` IsLocal bool `json:"is_local"` Popularity int `json:"popularity"` ExternalIds ExternalIds `json:"external_ids"` ExternalUrls ExternalUrls `json:"external_urls"` Album Album `json:"album"` Artists []Artist `json:"artists"` }
type TracksResult ¶
Click to show internal directories.
Click to hide internal directories.