Documentation ¶
Overview ¶
Package gpm is unofficial Google Play Music API client library
Index ¶
- type Album
- type Artist
- type Client
- func (client *Client) AlbumInfo(albumID string, includeTracks bool) (album Album, err error)
- func (client *Client) ArtistInfo(artistID string, includeAlbums bool) (artist Artist, err error)
- func (client *Client) AuthURL() string
- func (client *Client) DoAuth(authCode string) (err error)
- func (client *Client) MP3StreamURL(trackID, deviceID string) (mp3Url string, err error)
- func (client *Client) PlaylistEntries() (playlistEntries []PlaylistEntry, err error)
- func (client *Client) Playlists() ([]Playlist, error)
- func (client *Client) SearchAllAccess(query string, maxResults int) (body []byte, err error)
- func (client *Client) SearchAllAccessAlbums(query string, maxResults int) (albums []Album, err error)
- func (client *Client) SearchAllAccessTracks(query string, maxResults int) (tracks []Track, err error)
- func (client *Client) Settings() (settings Settings, err error)
- func (client *Client) TrackInfo(trackID string) (track Track, err error)
- func (client *Client) TrackList() (tracks TrackList, err error)
- type Playlist
- type PlaylistEntry
- type PlaylistEntryList
- type PlaylistList
- type Settings
- type Track
- type TrackList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a connection to Google Play Music
func New ¶
New allocates a Google Play Music client with the given OAuth auth code. Obtain a new Auth Code https://developers.google.com/oauthplayground/, by entering "https://www.googleapis.com/auth/musicmanager" in the "Input your own scopes" input box. WARN: Do not click "Exchange auth. code for tokens" on Step 2!
func (*Client) ArtistInfo ¶
ArtistInfo returns metadata associated with artist ID
func (*Client) MP3StreamURL ¶
MP3StreamURL returns a streamable URL of the track ID
func (*Client) PlaylistEntries ¶
func (client *Client) PlaylistEntries() (playlistEntries []PlaylistEntry, err error)
func (*Client) SearchAllAccess ¶
SearchAllAccess searches Google Play Music All Access
func (*Client) SearchAllAccessAlbums ¶
func (client *Client) SearchAllAccessAlbums(query string, maxResults int) (albums []Album, err error)
SearchAllAccessAlbums searches Google Play Music All Access for albums matchin query
func (*Client) SearchAllAccessTracks ¶
func (client *Client) SearchAllAccessTracks(query string, maxResults int) (tracks []Track, err error)
SearchAllAccessTracks searches Google Play Music All Access for tracks matching query
type PlaylistEntry ¶
(kind: sj#playlistEntry)
type PlaylistEntryList ¶
type PlaylistEntryList struct { Data struct { Items []PlaylistEntry } }
(kind: sj#playlistEntryList)
type PlaylistList ¶
type PlaylistList struct { Data struct { Items []Playlist } }
(kind: sj#playlistList)
type Settings ¶
type Settings struct { Settings struct { Labs []map[string]string Devices []map[string]interface{} } }
Settings represents user's Google Play Music settings