lastfm

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

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

Go to latest
Published: Jun 25, 2013 License: Unlicense Imports: 4 Imported by: 0

README

lastfm

Go package for using the Last.fm API

Installation

Simply run

go get github.com/iand/lastfm

Documentation is at http://godoc.org/github.com/iand/lastfm

Authors

Contributors

Contributing

  • Do submit your changes as a pull request
  • Do your best to adhere to the existing coding conventions and idioms.
  • Do run go fmt on the code before committing
  • Do feel free to add yourself to the CREDITS file and the corresponding Contributors list in the the README.md. Alphabetical order applies.
  • Don't touch the AUTHORS file. An existing author will add you if your contributions are significant enough.
  • Do note that in order for any non-trivial changes to be merged (as a rule of thumb, additions larger than about 15 lines of code), an explicit Public Domain Dedication needs to be on record from you. Please include a copy of the statement found in the WAIVER file with your pull request

License

This is free and unencumbered software released into the public domain. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.

Documentation

Overview

Client for the Last.fm API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	Artist string  `json:"artist"`
	Title  string  `json:"title"`
	MBID   string  `json:"mbid"`
	URL    string  `json:"url"`
	Image  []Image `json:"image"`
}

type Artist

type Artist struct {
	Name       string           `json:"name"`
	MBID       string           `json:"mbid"`
	URL        string           `json:"url"`
	Image      []Image          `json:"image"`
	Stats      ArtistStats      `json:"stats"`
	Streamable string           `json:"streamable"`
	OnTour     string           `json:"ontour"`
	Similar    SimilarContainer `json:"similar"`
	Tags       TagContainer     `json:"tags"`
	Bio        ArtistBio        `json:"bio"`
}

type ArtistBio

type ArtistBio struct {
	Links      LinkContainer `'json:"links"`
	YearFormed string        `json:"yearformed"`
	WikiInfo
}

type ArtistStats

type ArtistStats struct {
	Listeners string `json:"listeners"`
	Playcount string `json:"playcount"`
}

type Client

type Client struct {
	APIKey string
}

func New

func New(apikey string) *Client

func (*Client) ArtistInfoByName

func (client *Client) ArtistInfoByName(artist string, lang string, username string) (*Artist, error)

func (*Client) TrackInfoByName

func (client *Client) TrackInfoByName(track string, artist string, username string) (*Track, error)

type Image

type Image struct {
	URL  string `json:"#text"`
	Size string `json:"size"`
}
type Link struct {
	Text string `json:"#text"`
	Rel  string `json:"rel"`
	URL  string `json:"href"`
}
type LinkContainer struct {
	Link Link `'json:"link"`
}

type SimilarContainer

type SimilarContainer struct {
	Artist []Artist `'json:"artist"`
}

type Streamable

type Streamable struct {
	Text      string `json:"#text"`
	Fulltrack string `json:"fulltrack"`
}

type Tag

type Tag struct {
	Name string `'json:"name"`
	URL  string `'json:"url"`
}

type TagContainer

type TagContainer struct {
	Tag []Tag `'json:"tag"`
}

type Track

type Track struct {
	ID         string       `json:"id"`
	Name       string       `json:"name"`
	MBID       string       `json:"mbid"`
	URL        string       `json:"url"`
	Duration   string       `json:"duration"`
	Listeners  string       `json:"listeners"`
	Playcount  string       `json:"playcount"`
	Streamable Streamable   `json:"streamable"`
	Artist     Artist       `json:"artist"`
	Album      Album        `json:"album"`
	TopTags    TagContainer `json:"toptags"`
	Wiki       WikiInfo     `json:"wiki"`
}

type WikiInfo

type WikiInfo struct {
	Published string `json:"published"`
	Summary   string `json:"summary"`
	Content   string `json:"content"`
}

Jump to

Keyboard shortcuts

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