lastFm

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

README

last-fm-go

  • last.fm Wrapped API

Usage

  • How to import?
go get -u github.com/Cellularhacker/last-fm-go

※ Important

package name is just lastFm. so you have to use like lastFm.Client not last-fm-go.Client.

Documentation

Index

Constants

View Source
const (
	KeyMethod = "method"
	KeyApiKey = "api_key"
)

Variables

View Source
var ErrNoMethodSpecified = errors.New("no method supplied for lastFm")
View Source
var ErrNotInitialized = errors.New("not initialized")

Functions

func IsInitialized

func IsInitialized() bool

func MakeRequest

func MakeRequest(method string, p url.Values, body io.Reader) ([]byte, error)

func SetVariables

func SetVariables(lastFmApiKey, lastFmAPISecret string, lastFmAPIEndpoint ...string)

SetVariables - Mark: You should have to call this function while initializing step or before run main.

Types

type Client

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

func GetClient

func GetClient() *Client

func (*Client) Do

func (dc *Client) Do(req *http.Request) (*http.Response, error)

func (*Client) GetMaxRetriesCount

func (dc *Client) GetMaxRetriesCount() int

func (*Client) GetRetryDelay

func (dc *Client) GetRetryDelay() time.Duration

func (*Client) SetMaxRetries

func (dc *Client) SetMaxRetries(maxRetries int) *Client

func (*Client) SetRetryDelay

func (dc *Client) SetRetryDelay(retryDelay time.Duration) *Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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