datatypes

package module
v0.0.0-...-bdc5518 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 0 Imported by: 0

README

Audigo

A Go Wrapper for Music APIs - Last.fm, Spotify, Apple Music, Soundcloud, Tidal, Discogs

Under construction, check back later!

Docs

Spotify

spotify.SpotifyClient{ClientId string, ApiSecret string, AccessToken string)

  • ClientId: Spotify API Client Id
  • ApiSecret: Spotify API Secret
  • AccessToken: Spotify API Access Token if you have a valid one, otherwise pass empty string

SpotifyClient.Authenticate() error

  • Uses SpotifyClient's ClientId and ApiSecret to generate a new API Access Token.
  • IMPORTANT:This Must Be Run Before Any Other SpotifyClient method if you did not pass a valid AccessToken to the constructor
Albums

SpotifyClient.GetAlbum(id string) (album SpotifyAlbum, e error)

  • id: Spotify Album Id

SpotifyClient.GetAlbumTracks(id string, options map[string]string) (tracks SpotifyTracks, e error)

  • id: Spotify Album Id
  • options: Query string options

SpotifyClient.GetAlbums(ids []string) (album SpotifyAlbums, e error)

  • ids: Slice of Spotify Album Ids
Artists

SpotifyClient.GetArtistAlbums(id string) (albums ArtistAlbums, e error)

  • id: Spotify Artist Id

SpotifyClient.Search(term string, catagory string) (results SpotifySearchResults, e error)

  • term: The Search Term
  • catagory: "artist" or "album"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	AlbumType string `json:"album_type"`
	Artists   []struct {
		ExternalUrls struct {
			Spotify string `json:"spotify"`
		} `json:"external_urls"`
		Href string `json:"href"`
		ID   string `json:"id"`
		Name string `json:"name"`
		Type string `json:"type"`
		URI  string `json:"uri"`
	} `json:"artists"`
	AvailableMarkets []string `json:"available_markets"`
	Copyrights       []struct {
		Text string `json:"text"`
		Type string `json:"type"`
	} `json:"copyrights"`
	ExternalIds struct {
		Upc string `json:"upc"`
	} `json:"external_ids"`
	ExternalUrls struct {
		Spotify string `json:"spotify"`
	} `json:"external_urls"`
	Genres []interface{} `json:"genres"`
	Href   string        `json:"href"`
	ID     string        `json:"id"`
	Images []struct {
		Height int64  `json:"height"`
		URL    string `json:"url"`
		Width  int64  `json:"width"`
	} `json:"images"`
	Label                string `json:"label"`
	Name                 string `json:"name"`
	Popularity           int64  `json:"popularity"`
	ReleaseDate          string `json:"release_date"`
	ReleaseDatePrecision string `json:"release_date_precision"`
	TotalTracks          int64  `json:"total_tracks"`
	Tracks               struct {
		Href  string `json:"href"`
		Items []struct {
			Artists []struct {
				ExternalUrls struct {
					Spotify string `json:"spotify"`
				} `json:"external_urls"`
				Href string `json:"href"`
				ID   string `json:"id"`
				Name string `json:"name"`
				Type string `json:"type"`
				URI  string `json:"uri"`
			} `json:"artists"`
			AvailableMarkets []string `json:"available_markets"`
			DiscNumber       int64    `json:"disc_number"`
			DurationMs       int64    `json:"duration_ms"`
			Explicit         bool     `json:"explicit"`
			ExternalUrls     struct {
				Spotify string `json:"spotify"`
			} `json:"external_urls"`
			Href        string `json:"href"`
			ID          string `json:"id"`
			IsLocal     bool   `json:"is_local"`
			Name        string `json:"name"`
			PreviewURL  string `json:"preview_url"`
			TrackNumber int64  `json:"track_number"`
			Type        string `json:"type"`
			URI         string `json:"uri"`
		} `json:"items"`
		Limit    int64       `json:"limit"`
		Next     interface{} `json:"next"`
		Offset   int64       `json:"offset"`
		Previous interface{} `json:"previous"`
		Total    int64       `json:"total"`
	} `json:"tracks"`
	Type string `json:"type"`
	URI  string `json:"uri"`
}

type Track

type Track struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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