package module
v0.0.0-...-730e3d6 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2015 License: Unlicense Imports: 11 Imported by: 0



Unofficial Google Play Music API client library. Influenced by Unofficial-Google-Music-API .

Only required methods for gMPD are implemented.



Package gpm is unofficial Google Play Music API client library



This section is empty.


This section is empty.


This section is empty.


type Album

type Album struct {
	ID     string
	Name   string
	Artist string
	Year   uint16
	Tracks []Track

Album represents metadata of an album (kind: sj#album)

type Artist

type Artist struct {
	ID     string
	Name   string
	Albums []Album

Artist represents metadata of an artist (kind: sj#artist)

type Client

type Client struct {
	// contains filtered or unexported fields

Client represents a connection to Google Play Music

func New

func New(clientID, clientSecret string) (client *Client)

New allocates a Google Play Music client with the given OAuth auth code. Obtain a new Auth Code, by entering "" in the "Input your own scopes" input box. WARN: Do not click "Exchange auth. code for tokens" on Step 2!

func (*Client) AlbumInfo

func (client *Client) AlbumInfo(albumID string, includeTracks bool) (album Album, err error)

AlbumInfo returns metadata associated with album ID

func (*Client) ArtistInfo

func (client *Client) ArtistInfo(artistID string, includeAlbums bool) (artist Artist, err error)

ArtistInfo returns metadata associated with artist ID

func (*Client) AuthURL

func (client *Client) AuthURL() string

Login tries to get authorization token from Google Login service

func (*Client) DoAuth

func (client *Client) DoAuth(authCode string) (err error)

func (*Client) MP3StreamURL

func (client *Client) MP3StreamURL(trackID, deviceID string) (mp3Url string, err error)

MP3StreamURL returns a streamable URL of the track ID

func (*Client) PlaylistEntries

func (client *Client) PlaylistEntries() (playlistEntries []PlaylistEntry, err error)

func (*Client) Playlists

func (client *Client) Playlists() ([]Playlist, error)

func (*Client) SearchAllAccess

func (client *Client) SearchAllAccess(query string, maxResults int) (body []byte, err error)

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

func (*Client) Settings

func (client *Client) Settings() (settings Settings, err error)

Settings loads user's Google Play Music service settings

func (*Client) TrackInfo

func (client *Client) TrackInfo(trackID string) (track Track, err error)

TrackInfo returns metadata associated with track ID

func (*Client) TrackList

func (client *Client) TrackList() (tracks TrackList, err error)

TrackList returns list of tracks uploaded by user to Google Play Music

type Playlist

type Playlist struct {
	ID                    string
	Name                  string
	LastModifiedTimestamp string

(kind: sj#playlist)

type PlaylistEntry

type PlaylistEntry struct {
	PlaylistID string
	Track      Track

(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

type Track

type Track struct {
	ID             string
	Nid            string
	Title          string
	Album          string
	AlbumID        string
	Artist         string
	DurationMillis string
	TrackNumber    int64
	Year           int64

Track represents the metadata of a track (kind: sj#track)

type TrackList

type TrackList struct {
	Data struct {
		Items []Track

TrackList represents a list of Tracks (kind: sj#tracklist)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL