func (spotify *Spotify) getEncodedKeys() string {
	data := fmt.Sprintf("%v:%v", spotify.clientID, spotify.clientSecret)
	encoded := base64.StdEncoding.EncodeToString([]byte(data))
	return encoded
}
returns base64 encoded authorization
Keys for Spotify.
package spotify
import (
	"encoding/base64"
	"encoding/json"
	"errors"
	"fmt"
	simplejson "github.com/bitly/go-simplejson"
	"github.com/parnurzeal/gorequest"
)
type Spotify struct {
	clientID     string
	clientSecret string
	accessToken string
}
const (
	BASE_URL     = "https://api.spotify.com"
	ACCOUNTS_URL = "https://accounts.spotify.com/api/token"
	API_VERSION  = "v1"
)
func New(clientID, clientSecret string) Spotify {
	return initialize(clientID, clientSecret)
}
func initialize(clientID, clientSecret string) Spotify {
	spot := Spotify{clientID: clientID, clientSecret: clientSecret}
	return spot
}
func (spotify *Spotify) Authorize() (bool, []error) {
	result := false
	auth := fmt.Sprintf("Basic %s", spotify.getEncodedKeys())
	request := gorequest.New()
	request.Post(ACCOUNTS_URL)
	request.Set("Authorization", auth)
	request.Send("grant_type=client_credentials")
	_, body, errs := request.End()
	js, err := simplejson.NewJson([]byte(body))
	if err != nil {
		fmt.Println("[Authorize] Error parsing Json!")
		errs = []error{err}
	}
	jsToken, exists := js.CheckGet("access_token")
	if exists {
		spotify.accessToken, err = jsToken.String()
		if err != nil {
			fmt.Println("[Authorize] Error Getting Access Token from Json!")
			errs = []error{err}
		}
		result = true
	}
	return result, errs
}
func (spotify *Spotify) Get(format string, data map[string]interface{}, args ...interface{}) ([]byte, []error) {
	return spotify.Request("GET", format, data, args...)
}
func (spotify *Spotify) Post(format string, data map[string]interface{}, args ...interface{}) ([]byte, []error) {
	return spotify.Request("POST", format, data, args...)
}
func (spotify *Spotify) Put(format string, data map[string]interface{}, args ...interface{}) ([]byte, []error) {
	return spotify.Request("PUT", format, data, args...)
}
func (spotify *Spotify) Delete(format string, args ...interface{}) ([]byte, []error) {
	return spotify.Request("DELETE", format, nil, args...)
}
func (spotify *Spotify) Request(method, format string, data map[string]interface{}, args ...interface{}) ([]byte, []error) {
	endpoint := fmt.Sprintf(format, args...)
	targetURL := spotify.createTargetURL(endpoint)
	request := gorequest.New()
	if method == "GET" {
		request.Get(targetURL)
	}
	if method == "POST" {
		request.Post(targetURL)
	}
	if method == "PUT" {
		request.Put(targetURL)
	}
	if method == "DELETE" {
		request.Delete(targetURL)
	}
	request.Set("Authorization", fmt.Sprintf("Bearer %s", spotify.accessToken))
	if data != nil {
		jsonData, _ := getJsonBytesFromMap(data)
		if jsonData != nil {
			request.Send(string(jsonData))
		}
	}
	_, body, errs := request.End()
	result := []byte(body)
	if unauthorizedResponse(result) {
		result = nil
		errs = []error{
			errors.New("Authorization Error. Make sure you called Spotify.Authorize() method!"),
			errors.New(body)}
	}
	return result, errs
}
func unauthorizedResponse(body []byte) bool {
	js, err := simplejson.NewJson(body)
	if err != nil {
		fmt.Println("[unauthorizedResponse] Error parsing Json!")
		return true
	}
	_, exists := js.CheckGet("error")
	if exists {
		return true
	}
	return false
}
func (spotify *Spotify) createTargetURL(endpoint string) string {
	result := fmt.Sprintf("%s/%s/%s", BASE_URL, API_VERSION, endpoint)
	return result
}