Documentation ¶
Index ¶
- Constants
- type Album
- type Artist
- type ArtistRankings
- type Database
- func (d *Database) Add(scrobble Scrobble) error
- func (d *Database) AddMultiple(scrobbles []Scrobble) error
- func (d *Database) AlbumPlays(albumArtist, album string) (plays []PlayCount)
- func (d *Database) AlbumTracks(albumArtist, album string) (tracks []Track, err error)
- func (d *Database) ArtistPlays(name string) (plays []PlayCount)
- func (d *Database) ArtistTopAlbums(name string, limit int) (albums []Album, err error)
- func (d *Database) ArtistTopTracks(name string, limit int) (tracks []Track, err error)
- func (d *Database) Close() error
- func (d *Database) GetNowPlaying() (*Playing, bool)
- func (d *Database) GetTrack(albumArtist, album, track string) (*Track, error)
- func (d *Database) NowPlaying(playing Playing) error
- func (d *Database) Played(from time.Time) (scrobbles []Scrobble, err error)
- func (d *Database) RecentlyPlayed() (scrobbles []Scrobble, err error)
- func (d *Database) Scrobble(at string) (scrobble Scrobble, ok bool)
- func (d *Database) TopArtists(limit int) (rankings ArtistRankings, err error)
- func (d *Database) TopTracks(limit int) (rankings TrackRankings, err error)
- func (d *Database) TotalPlays() (count int)
- func (d *Database) TrackPlays(albumArtist, album, track string) (plays []PlayCount)
- type PlayCount
- type Playing
- type Scrobble
- type Track
- type TrackRankings
Constants ¶
View Source
const ( Week = 7 * 24 * time.Hour Month = 4 * Week Year = 52 * Week Forever = 100 * Year )
Simplified constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtistRankings ¶
type ArtistRankings struct {
Overall, Year, Month, Week []Artist
}
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) AddMultiple ¶
func (*Database) AlbumPlays ¶
func (*Database) AlbumTracks ¶
func (*Database) ArtistPlays ¶
func (*Database) ArtistTopAlbums ¶
func (*Database) ArtistTopTracks ¶
func (*Database) GetNowPlaying ¶
func (*Database) NowPlaying ¶
func (*Database) RecentlyPlayed ¶
func (*Database) TopArtists ¶
func (d *Database) TopArtists(limit int) (rankings ArtistRankings, err error)
func (*Database) TopTracks ¶
func (d *Database) TopTracks(limit int) (rankings TrackRankings, err error)
func (*Database) TotalPlays ¶
func (*Database) TrackPlays ¶
type TrackRankings ¶
type TrackRankings struct {
Overall, Year, Month, Week []Track
}
Click to show internal directories.
Click to hide internal directories.