services

package
v0.0.0-...-ad53ec8 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLastFMService

func NewLastFMService() interfaces.LastFMService

NewLastFMService returns a implementation of a LastFMService

func NewSongService

func NewSongService(lastFMService interfaces.LastFMService) interfaces.SongService

NewSongService returns a implementation of a SongService

Types

type Container

type Container struct {
	SongService interfaces.SongService
}

Container is the container for services

func Register

func Register() *Container

Register registers services on a container

type LastFMResponse

type LastFMResponse struct {
	Track struct {
		Name       string `json:"name"`
		Mbid       string `json:"mbid"`
		URL        string `json:"url"`
		Duration   string `json:"duration"`
		Streamable struct {
			Text      string `json:"#text"`
			Fulltrack string `json:"fulltrack"`
		} `json:"streamable"`
		Listeners string `json:"listeners"`
		Playcount string `json:"playcount"`
		Artist    struct {
			Name string `json:"name"`
			Mbid string `json:"mbid"`
			URL  string `json:"url"`
		} `json:"artist"`
		Album struct {
			Artist string `json:"artist"`
			Title  string `json:"title"`
			Mbid   string `json:"mbid"`
			URL    string `json:"url"`
			Image  []struct {
				Text string `json:"#text"`
				Size string `json:"size"`
			} `json:"image"`
			Attr struct {
				Position string `json:"position"`
			} `json:"@attr"`
		} `json:"album"`
		Toptags struct {
			Tag []struct {
				Name string `json:"name"`
				URL  string `json:"url"`
			} `json:"tag"`
		} `json:"toptags"`
		Wiki struct {
			Published string `json:"published"`
			Summary   string `json:"summary"`
			Content   string `json:"content"`
		} `json:"wiki"`
	} `json:"track"`
}

LastFMResponse defines the response of a last fm track

Jump to

Keyboard shortcuts

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