itunes_api 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/lib/itunes_api/requests/search.rb +3 -5
- data/lib/itunes_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bac1927bc2f806bd962d68e87c2d5f67edc0dd96
|
4
|
+
data.tar.gz: 1295eef80bccdedab466690b64d118c35ae2f14b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f24da821677baad0f71baa44fe7448c98c8186222271f7b1f89ede95c00a894efe7794cef6b6b35f1a557761316d6342cc36da32f0001259248f73c6c4aba4e5
|
7
|
+
data.tar.gz: 5bac42c39b9b2726d1ee685c6d3ea235de7221ed1c848c2f3dae84465bde52e7947251d8a31761fd350a682de52a54565a9ae7acb285d69762b964a050055139
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# ItunesApi
|
2
|
+
|
2
3
|
[![Gem Version](https://badge.fury.io/rb/itunes_api.svg)](https://badge.fury.io/rb/itunes_api) [![Dependency Status](https://gemnasium.com/badges/github.com/mariodarco/itunes-api.svg)](https://gemnasium.com/github.com/mariodarco/itunes-api) [![CircleCI](https://circleci.com/gh/mariodarco/itunes-api/tree/master.svg?style=shield)](https://circleci.com/gh/mariodarco/itunes-api/tree/master) [![Coverage Status](https://coveralls.io/repos/github/mariodarco/itunes-api/badge.svg?branch=master)](https://coveralls.io/github/mariodarco/itunes-api?branch=master)
|
3
4
|
|
4
5
|
A simple interface for the Itunes Api.
|
@@ -14,18 +15,19 @@ gem 'itunes_api'
|
|
14
15
|
And then execute:
|
15
16
|
|
16
17
|
```ruby
|
17
|
-
|
18
|
+
bundle
|
18
19
|
```
|
19
20
|
|
20
21
|
Or install it yourself as:
|
21
22
|
|
22
23
|
```ruby
|
23
|
-
|
24
|
+
gem install itunes_api
|
24
25
|
```
|
25
26
|
|
26
27
|
## Configuration
|
27
28
|
|
28
29
|
Add an initializer to your app to set the country for the Store:
|
30
|
+
|
29
31
|
```ruby
|
30
32
|
# config/initializers/itunes_api.rb
|
31
33
|
ItunesApi.configure do |config|
|
@@ -35,22 +37,26 @@ end
|
|
35
37
|
|
36
38
|
## Usage
|
37
39
|
|
38
|
-
To return all the Apple ids associated with
|
40
|
+
To return all the Apple ids associated with the search for a Artist name.
|
41
|
+
|
39
42
|
```ruby
|
40
43
|
ItunesApi.artist_ids('Pink Floyd')
|
41
44
|
```
|
42
45
|
|
43
46
|
To get all artists returning from a search term, and their albums.
|
47
|
+
|
44
48
|
```ruby
|
45
49
|
ItunesApi.artist_search('Led Zeppelin')
|
46
50
|
```
|
47
51
|
|
48
52
|
To return a specific artist with albums, based on the Apple id.
|
53
|
+
|
49
54
|
```ruby
|
50
55
|
ItunesApi.artist_lookup(265766061)
|
51
56
|
```
|
52
57
|
|
53
58
|
To return the tracklist for a specific albums, based on the Apple collection id.
|
59
|
+
|
54
60
|
```ruby
|
55
61
|
ItunesApi.album_lookup(286930912)
|
56
62
|
```
|
@@ -7,9 +7,7 @@ module ItunesApi
|
|
7
7
|
selfie :artist_ids
|
8
8
|
|
9
9
|
def artist_ids
|
10
|
-
results.collect
|
11
|
-
result['artistId']
|
12
|
-
end.compact.uniq.sort
|
10
|
+
results.collect { |result| result['artistId'] }.compact.uniq
|
13
11
|
end
|
14
12
|
|
15
13
|
private
|
@@ -21,8 +19,8 @@ module ItunesApi
|
|
21
19
|
def query
|
22
20
|
{
|
23
21
|
attribute: 'artistTerm',
|
24
|
-
entity: '
|
25
|
-
term:
|
22
|
+
entity: 'musicArtist',
|
23
|
+
term: artist_name,
|
26
24
|
country: store.to_s.upcase,
|
27
25
|
limit: LIMIT,
|
28
26
|
media: 'music',
|
data/lib/itunes_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itunes_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario D’Arco
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|