Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client int
func (*Client) Search ¶
Example ¶
package main import ( "context" "encoding/json" "fmt" "log" "github.com/orijtech/itunes" ) func main() { client := new(itunes.Client) sres, err := client.Search(context.Background(), &itunes.Search{ Term: "Clubbin'", Limit: 12, Entity: "movie,musicVideo", }) if err != nil { log.Fatal(err) } for i, result := range sres.Results { blob, _ := json.MarshalIndent(result, "", " ") fmt.Printf("#%d: result: %s\n", i, blob) } }
Output:
func (*Client) SearchById ¶
Example ¶
package main import ( "context" "encoding/json" "fmt" "log" "github.com/orijtech/itunes" ) func main() { client := new(itunes.Client) sres, err := client.SearchById(context.Background(), "263058648") if err != nil { log.Fatal(err) } for i, result := range sres.Results { blob, _ := json.MarshalIndent(result, "", " ") fmt.Printf("#%d: result: %s\n", i, blob) } }
Output:
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 Result ¶
type Result struct { Kind string `json:"kind"` TrackId uint64 `json:"trackId"` CollectionId uint64 `json:"collectionId"` ArtistName string `json:"artistName"` LongDescription string `json:"longDescription"` ShortDescription string `json:"shortDescription"` 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 ¶
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"` Id string `json:"id"` }
type SearchResult ¶
Click to show internal directories.
Click to hide internal directories.