• This repository has been archived on 27/Feb/2019
  • Stars
    star
    122
  • Rank 292,031 (Top 6 %)
  • Language
    Ruby
  • License
    MIT License
  • Created about 14 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Ruby wrapper around the iTunes API that lets you search for any sort of data that is available on the iTunes store.

iTunes Build Status

A Ruby wrapper around the iTunes API that lets you search for any sort of data that is available on the iTunes store.

Example Response

{
  "artist_id" : 954266,
  "artist_name" : "Green Day",
  "artist_view_url" : "http://itunes.apple.com/us/artist/green-day/id954266?uo=4",
  "artwork_url100" : "http://a1.phobos.apple.com/us/r1000/049/Features/1e/17/05/dj.rpihtiig.100x100-75.jpg",
  "artwork_url30" : "http://a1.phobos.apple.com/us/r1000/049/Features/1e/17/05/dj.rpihtiig.30x30-50.jpg",
  "artwork_url60" : "http://a1.phobos.apple.com/us/r1000/049/Features/1e/17/05/dj.rpihtiig.60x60-50.jpg",
  "collection_censored_name" : "Dookie",
  "collection_explicitness" : "explicit",
  "collection_id" : 5132583,
  "collection_name" : "Dookie",
  "collection_price" : 9.99,
  "collection_view_url" : "http://itunes.apple.com/us/album/she/id5132583?i=5132563&uo=4",
  "content_advisory_rating" : null,
  "country" : "USA",
  "currency" : "USD",
  "disc_count" : 1,
  "disc_number" : 1,
  "kind" : "song",
  "preview_url" : "http://a1.phobos.apple.com/us/r1000/027/Music/0e/86/7a/mzm.wchstext.aac.p.m4a",
  "primary_genre_name" : "Alternative",
  "release_date" : "2003-04-22 07:00:00 Etc/GMT",
  "track_censored_name" : "She",
  "track_count" : 15,
  "track_explicitness" : "notExplicit",
  "track_id" : 5132563,
  "track_name" : "She",
  "track_number" : 8,
  "track_price" : 1.29,
  "track_time_millis" : 134293,
  "track_view_url" : "http://itunes.apple.com/us/album/she/id5132583?i=5132563&uo=4",
  "wrapper_type" : "track"
}

Available Methods

  • movie
  • podcast
  • music
  • music_video
  • audiobook
  • short_film
  • tv_show
  • ebook
  • software
  • all

Using the iTunes gem

require 'itunes'

>> itunes = ITunes::Client.new
>> songs = itunes.music('green day she')
=> <#Hashie::Rash result_count=15 results=[...]>
>> songs.results.each do |song|
>>   puts "#{song.track_name} - #{song.artist_name} (#{song.collection_name})"
>> end
=> She - Green Day (Dookie)
=> She - Green Day (Dookie)
=> She - Green Day (Dookie)
=> She - Green Day (Dookie)
=> She - Green Day (Dookie)

Search directly from the class

>> iron_man = ITunes.movie('iron man 2')
=> <#Hashie::Rash result_count=1 results=[...]>

Limit the results:

>> foo_fighters = ITunes.music('foo fighters everlong', :limit => 1)
=> <#Hashie::Rash result_count=1 results=[<#Hashie::Rash ...>]>

What is Hashie::Rash?

If you are familiar with Hashie, Rash is very similar to a Mash. The primary difference is that Rash gives us ruby-friendly keys so instead of artistId, Rash converts that to artist_id.

Copyright

Copyright Β© 2011 Garrett Bjerkhoel, Steve Agalloco. See MIT-LICENSE for details.

More Repositories

1

json_builder

Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. JSON Builder is here to help.
Ruby
244
star
2

kss-rails

A rails engine for @kneath's KSS documentation
JavaScript
152
star
3

cmd-enter

Every textarea should let you submit comments by pressing cmd-enter or ctrl-enter. For every site that doesn't support it, a kitten weeps. Here's to making less kittens weep.
JavaScript
36
star
4

wink

A Ruby wrapper for the Wink Hub API.
Ruby
18
star
5

mail_gate

Ruby
11
star
6

unifi

Collect your Unifi client data every 15 seconds and send it to an InfluxDB instance.
Go
10
star
7

wink-alfred

Alfred workflow for interacting with your Wink Hub
Ruby
4
star
8

serviced

An interface to dealing with the common pain points while dealing with 3rd parties APIs
Ruby
3
star
9

graphql-cursor

Add GraphQL Relay Cursor Pagination with Postgres.
Go
3
star
10

droplet

Droplet is a fully customizable dropdown plugin for jQuery.
JavaScript
3
star
11

html-pipeline-bitly

A HTML Pipeline filter for extracting URLs and making them bit.ly links.
Ruby
2
star
12

tesla_exporter

Go
2
star
13

open-rails-partial-vscode-extension

VS Code extension that supports opening Rails partials found in development from the browser.
TypeScript
2
star
14

dotpath

dotpath gives you utilities to navigate and modify hashes and arrays in Ruby with the JSON path to each value in the hash or array.
Ruby
1
star
15

awair_exporter

Go
1
star
16

garrettb-python

My website in django
Python
1
star
17

garrettb

Personal site
JavaScript
1
star
18

pngdiff

Go tool that will diff images on the fly
Go
1
star
19

textmate-bundle

My TextMate bundle
1
star
20

screenshots

AWS Lambda nodejs functions to generate screenshots and to also compare them.
JavaScript
1
star
21

clientend-python

Python
1
star
22

pagerduty-schedule-cop

Ruby
1
star
23

open-rails-partial-chrome-extension

Chrome extension that supports opening Rails partials found on the page in VS Code
TypeScript
1
star
24

glimpse

1
star
25

pubattlegrounds

Ruby
1
star