itunes_api 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c10c2d0dbe01ffcc5c26faa40f652218ec3608e
4
- data.tar.gz: ae51d3c0ca45dd511a93b644eb6c2c3730b00816
3
+ metadata.gz: bac1927bc2f806bd962d68e87c2d5f67edc0dd96
4
+ data.tar.gz: 1295eef80bccdedab466690b64d118c35ae2f14b
5
5
  SHA512:
6
- metadata.gz: 053c3209b3d52a4f7c39c3ffc5b9c2a0db9626663721cef395e972dd091a1d7f00eecf12191f300ab3c4af6b87054ceb7e90dd7ac47b4eb430f0c392ed302630
7
- data.tar.gz: 81442a4b0a857d8e763626e2a3fc358a2212776a9ea10b8871ea84d7210b0aed25366fd03cafd8c576fe166decea4bd96f31572391c1f01dbf52a5e1ba7aadd7
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
- $ bundle
18
+ bundle
18
19
  ```
19
20
 
20
21
  Or install it yourself as:
21
22
 
22
23
  ```ruby
23
- $ gem install itunes_api
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 a search term.
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 do |result|
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: 'album',
25
- term: @artist_name,
22
+ entity: 'musicArtist',
23
+ term: artist_name,
26
24
  country: store.to_s.upcase,
27
25
  limit: LIMIT,
28
26
  media: 'music',
@@ -1,3 +1,3 @@
1
1
  module ItunesApi
2
- VERSION = '1.3.1'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
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.3.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-07-28 00:00:00.000000000 Z
11
+ date: 2017-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday