itunes_api 2.2.1 → 2.3.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: 4968e1787495e239562f482f84c6b924c303454b
4
- data.tar.gz: '08631cad8bd39b7284c1aa7130073773f1db561e'
3
+ metadata.gz: b4488018462004ffd7109f8bd25280bf02fb371a
4
+ data.tar.gz: 3e462711ad7c33c6478f1912a223afa9eedb4296
5
5
  SHA512:
6
- metadata.gz: 5cceeb91164a8d6df0d9046c7a44ed694d2d58afd0afd49be1c1dabad94627ea9ec6316161121b9cc95d4e5b83a73f66290154c6dd5ab24dc864783266d732ad
7
- data.tar.gz: 231a24a2780b9b6a33f49ffb7459bba6f7f1a200da38db58a68d3d522dcfef0c9d75533c4d5ab641492ea654411b39cab7b2eccda2f9b2b569bd9ef44525e823
6
+ metadata.gz: c325a70f11d4de6cdb103ca295c7ccb782c49861c294e43d39ab6cb26b23c320f3833f2f878c2b4f58391db3d26acdabf02c2c953b21a50fceac01fb630e6b7a
7
+ data.tar.gz: 8a798b758f268a200b80a9dcc937c5120c1ea3fd8312f99af5e8ae4c74275ce920753154f524fb9fcf1f3297329db8c5547dcc245aa5a797d9a769854a93c748
@@ -25,11 +25,11 @@ module ItunesApi
25
25
 
26
26
  def query
27
27
  {
28
- attribute: 'artistTerm',
28
+ attribute: :artistTerm,
29
29
  country: store.to_s.upcase,
30
- entity: 'musicArtist',
30
+ entity: :musicArtist,
31
31
  limit: LIMIT,
32
- media: 'music',
32
+ media: :music,
33
33
  term: artist_name
34
34
  }
35
35
  end
@@ -22,10 +22,10 @@ module ItunesApi
22
22
  def query
23
23
  {
24
24
  country: store.to_s.upcase,
25
- entity: 'song',
25
+ entity: :song,
26
26
  id: search_id,
27
27
  limit: LIMIT,
28
- sort: 'trackNumber'
28
+ sort: :trackNumber
29
29
  }
30
30
  end
31
31
  end
@@ -15,6 +15,8 @@ module ItunesApi
15
15
 
16
16
  def parsed_response
17
17
  JSON.parse(response.body)
18
+ rescue JSON::ParserError
19
+ { 'results' => [] }
18
20
  end
19
21
 
20
22
  def response
@@ -1,3 +1,3 @@
1
1
  module ItunesApi
2
- VERSION = '2.2.1'.freeze
2
+ VERSION = '2.3.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: 2.2.1
4
+ version: 2.3.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-08-07 00:00:00.000000000 Z
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday