paapi 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac9634d240fe32902142162f6e582bb97e408b2ba57f6170de9b4381eed0b9a3
4
- data.tar.gz: 50fe91ed557e4f1afc052ec56805cb8975889da8340c69bef0ad2aa7e3eca3e0
3
+ metadata.gz: 259e83f7564df1078faa89b5c4c284bb732c4ef4d325bbf5148cac06943469a7
4
+ data.tar.gz: 07fd0a94307184a443a86821d40ee3c9e8f9a25c2343e09e321828f90701e50d
5
5
  SHA512:
6
- metadata.gz: 5d464a9fe20bf19d209f8161fbd5b76111d3f8c10dc4993ad98110c2dc9236d658ebf0fca9f8d47a0aa359b408dcc543ace65b2e2d4ce01f61465fe6756b30ef
7
- data.tar.gz: '08ad01e0bc82c144169699e753ad204a7afe2fb010ececcad97309aeb4b6e6f6bfedff41ae2b44281d4957fc8f1f2acf12bd0977ce56f3f9f07d3148e8e14043'
6
+ metadata.gz: e5e1cd4cc02383c8b6b3d6a3da997e847cb103e8e0a4abfaea50300c43a429dec2695269fa5c02ecbcf978c78020b08358c0804db03434f8981de761a30ce548
7
+ data.tar.gz: cdf7e41cd53b99b4402348ea17dd32e092d67d05144358dfcc87c8ac1ed79b130133be27a754421b392b8be10ba9dcbbe702571071ee4095aea7b4e6c323fd84
@@ -1,3 +1,6 @@
1
+ ## 0.1.2
2
+ - Use Contributor RoleType, rather than Role. RoleType uses lowercase, rather than capitalised.
3
+
1
4
  ## 0.1.0
2
5
  - Remove Nameable dependancy and return the data as the API returns it.
3
6
 
@@ -54,32 +54,36 @@ module Paapi
54
54
  end
55
55
 
56
56
  def contributors_of(kind)
57
- kind = kind.to_s.gsub(/([[:alpha:]]+)/) { |w| w.capitalize }
58
- contributors.select { |e| e['Role'] == kind }&.map { |e| e.dig('Name') }&.reject {|n| n.to_s.empty?}
57
+ kind = kind.to_s.gsub(/([[:alpha:]]+)/) { |w| w.downcase }
58
+ contributors.select { |e| e['RoleType'] == kind }&.map { |e| e.dig('Name') }&.reject {|n| n.to_s.empty?}
59
59
  end
60
60
 
61
61
  def actors
62
- contributors_of 'Actor'
62
+ contributors_of 'actor'
63
63
  end
64
64
 
65
65
  def artists
66
- contributors_of 'Artist'
66
+ contributors_of 'artist'
67
67
  end
68
68
 
69
69
  def authors
70
- contributors_of 'Author'
70
+ contributors_of 'author'
71
+ end
72
+
73
+ def director
74
+ contributors_of 'director'
71
75
  end
72
76
 
73
77
  def illustrators
74
- contributors_of 'Illustrator'
78
+ contributors_of 'illustrator'
75
79
  end
76
80
 
77
81
  def narrators
78
- contributors_of 'Narrator'
82
+ contributors_of 'narrator'
79
83
  end
80
84
 
81
85
  def publishers
82
- contributors_of 'Publisher'
86
+ contributors_of 'publisher'
83
87
  end
84
88
 
85
89
  def languages
@@ -1,3 +1,3 @@
1
1
  module Paapi
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Milne
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-01 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1'
111
- description:
111
+ description:
112
112
  email:
113
113
  - d@nmilne.com
114
114
  executables: []
@@ -137,7 +137,7 @@ licenses:
137
137
  metadata:
138
138
  homepage_uri: https://github.com/dkam/paapi
139
139
  source_code_uri: https://github.com/dkam/paapi
140
- post_install_message:
140
+ post_install_message:
141
141
  rdoc_options: []
142
142
  require_paths:
143
143
  - lib
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubygems_version: 3.1.2
156
- signing_key:
156
+ signing_key:
157
157
  specification_version: 4
158
158
  summary: Client library for Amazon's Product Advertising API v5
159
159
  test_files: []