itunes

package module
v0.0.0-...-0d89a80 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

README

itunes

iTunes search API client

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute string

type Client

type Client int

func (*Client) Search

func (c *Client) Search(ctx context.Context, s *Search) (*SearchResult, error)

type Country

type Country string

type Entity

type Entity string
const (
	EntityMovie           Entity = "movie"
	EntityMovieArtist     Entity = "movieArtist"
	EntityPodcast         Entity = "podcast"
	EntityPodcastAuthor   Entity = "podcastAuthor"
	EntityMusic           Entity = "music"
	EntityMusicVideo      Entity = "musicVideo"
	EntityMusicArtist     Entity = "musicArtist"
	EntityAudioBook       Entity = "audiobook"
	EntityAudioBookAuthor Entity = "audiobookAuthor"
	EntityShortFilm       Entity = "shortFilm"
	EntityShortFilmArtist Entity = "shortFilmArtist"
	EntityTVShow          Entity = "tvShow"
	EntityTVEpisode       Entity = "tvEpisode"
	EntityTVSeason        Entity = "tvSeason"
	EntitySoftware        Entity = "software"
	EntityIPadSoftware    Entity = "iPadSoftware"
	EntityMacSoftware     Entity = "macSoftware"
	EntityEBook           Entity = "ebook"
	EntityAll             Entity = "all"
	EntityAllTrack        Entity = "allTrack"
)

type Language

type Language string

type Media

type Media string

type Result

type Result struct {
	Kind              string  `json:"kind"`
	TrackId           uint64  `json:"trackId"`
	CollectionId      uint64  `json:"collectionId"`
	ArtistName        string  `json:"artistName"`
	TrackPrice        float64 `json:"trackPrice"`
	Country           string  `json:"country"`
	Currency          string  `josn:"currency"`
	CollectionName    string  `json:"collectionName"`
	PrimaryGenreName  string  `json:"primaryGenreName"`
	TrackName         string  `json:"trackName"`
	TrackCensoredName string  `json:"trackCensoredName"`
	TrackNumber       uint    `json:"trackNumber"`
	TrackTimeMillis   uint64  `json:"trackTimeMillis"`
	TrackViewURL      string  `json:"trackViewUrl"`
	CollectionPrice   float64 `json:"collectionPrice"`
	CollectionViewURL string  `json:"collectionViewUrl"`
	ArtistViewURL     string  `json:"artistViewUrl"`
	PreviewURL        string  `json:"previewUrl"`
	Streamable        bool    `json:"isStreamable"`
	ArtworkURL100Px   string  `json:"artworkUrl100"`
	ArtworkURL60Px    string  `json:"artworkUrl60"`
	ArtworkURL30Px    string  `json:"artworkUrl30"`
}
type Search struct {
	Term            string    `json:"term"`
	Country         Country   `json:"country"`
	Media           Media     `json:"media"`
	Entity          Entity    `json:"entity"`
	Attribute       Attribute `json:"attribute"`
	Language        Language  `json:"lang"`
	Limit           uint      `json:"limit"`
	Version         string    `json:"version"`
	ExplicitContent bool      `json:"explicit"`
}

type SearchResult

type SearchResult struct {
	ResultCount uint64    `json:"resultCount"`
	Results     []*Result `json:"results"`
}

Jump to

Keyboard shortcuts

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