Elixir wrapper for the iTunes affiliate search API.
Add itunes
to your list of dependencies in mix.exs
:
def deps do
[{:itunes, "~> 0.1.0"}]
end
Ensure itunes
is started before your application:
def application do
[applications: [:itunes]]
end
iex(1)> Itunes.search_artists "Taylor", 1
{:ok,
[%Itunes.Artist{amgArtistId: 816977, artistId: 159260351,
artistLinkUrl: "https://itunes.apple.com/us/artist/taylor-swift/id159260351?uo=4",
artistName: "Taylor Swift", artistType: "Artist", primaryGenreId: 14,
primaryGenreName: "Pop", wrapperType: "artist"}]}
Check out the API Docs for more examples on how to use this.
MIT