rdmm 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: a98d46defda3eadf067187d2ed36c66011a4969c
4
- data.tar.gz: e5e0f5665647578e2eb3beb620841f17e6f0d617
3
+ metadata.gz: 2762873c0d2e3fc9b63d73710b2493facdd3cdc0
4
+ data.tar.gz: 538014a90c8ee425c38c001540bb97c8b42b6ca0
5
5
  SHA512:
6
- metadata.gz: d2c9517b6cbcbb39e41e53b50a55bb9fe84f28867c09027abea0d6753a522db3e5ae2489e81eb2bdb4fef0a66964095f3c97c2eaa74b0b51c4b29c306153b86e
7
- data.tar.gz: 0e0bb2b5ba4be165a802a6adcd9d0e5f0eb570e9486d2844d3f9af3d43da05a446a8c0c644408671055c0188c957c635723db5fba1913577865d6e2d31d78c5d
6
+ metadata.gz: 4873108d052a80f6c8411f345eda02868a4900b857e9b6525b3b4551aa04d2f1d96b6ed4d705ef3e79f1e7a12b00396209656f304379db430ebdd539457a36e1
7
+ data.tar.gz: df156b94ced0ee386b430320344b611b0a5c29e8ef22d87a218e5922d42cdaa8a12f3706d72c9e59a4c3424a946b40aabf2fc67c601273dd372c08fc1d33916d
@@ -1,3 +1,11 @@
1
+ ## 0.2.1
2
+
3
+ - Fix bug on `Rdmm::Resources::ItemResource#affiliate_url`
4
+ - Fix bug on `Rdmm::Resources::ItemResource#url`
5
+ - Rename `#affiliate_url` to `#url_affiliate` on `Rdmm::Resources::ItemResource`
6
+ - Remove `#prices` on `Rdmm::Resources::ItemResource`
7
+ - Add more methods on `Rdmm::Resources::ItemResource`
8
+
1
9
  ## 0.2.0
2
10
 
3
11
  - Add some methods to `Rdmm::Responses::BaseResponse` for error handling
data/README.md CHANGED
@@ -238,17 +238,26 @@ Available attributes:
238
238
 
239
239
  - `#actors`
240
240
  - `#actresses`
241
- - `#affiliate_url`
242
241
  - `#authors`
242
+ - `#bandai_title_code`
243
243
  - `#category_name`
244
+ - `#cd_kind`
245
+ - `#compatible_with_pc?`
246
+ - `#compatible_with_sp?`
244
247
  - `#content_id`
245
248
  - `#directors`
246
249
  - `#floor_code`
247
250
  - `#floor_name`
248
251
  - `#genres`
252
+ - `#isbn`
253
+ - `#jancode`
249
254
  - `#labels`
255
+ - `#maker_product`
250
256
  - `#makers`
251
- - `#prices`
257
+ - `#number`
258
+ - `#price`
259
+ - `#price`
260
+ - `#price_deliveries`
252
261
  - `#product_id`
253
262
  - `#released_at`
254
263
  - `#review_average`
@@ -256,8 +265,23 @@ Available attributes:
256
265
  - `#series`
257
266
  - `#service_code`
258
267
  - `#service_name`
268
+ - `#stock`
269
+ - `#stock`
259
270
  - `#title`
260
271
  - `#url`
272
+ - `#url_affiliate`
273
+ - `#url_image_large`
274
+ - `#url_image_list`
275
+ - `#url_image_samples`
276
+ - `#url_image_small`
277
+ - `#url_movie_sample_size_476_306`
278
+ - `#url_movie_sample_size_560_360`
279
+ - `#url_movie_sample_size_644_414`
280
+ - `#url_movie_sample_size_720_480`
281
+ - `#url_sp`
282
+ - `#url_sp_affiliate`
283
+ - `#url_tachiyomi`
284
+ - `#url_tachiyomi_affiliate`
261
285
  - `#volume`
262
286
 
263
287
  ### Rdmm::Resources::MakerResource
@@ -13,21 +13,44 @@ module Rdmm
13
13
  Array(source["iteminfo"]["actor"])
14
14
  end
15
15
 
16
- # @return [String, nil]
17
- def affiliate_url
18
- source["affiliate_url"]
19
- end
20
-
21
16
  # @return [Array]
22
17
  def authors
23
18
  Array(source["iteminfo"]["author"])
24
19
  end
25
20
 
21
+ # @return [String, nil]
22
+ def bandai_title_code
23
+ if source["bandaiinfo"]
24
+ source["bandaiinfo"]["titlecode"]
25
+ end
26
+ end
27
+
26
28
  # @return [String, nil]
27
29
  def category_name
28
30
  source["category_name"]
29
31
  end
30
32
 
33
+ # @return [String, nil]
34
+ def cd_kind
35
+ if source["cdinfo"]
36
+ source["cdinfo"]["kind"]
37
+ end
38
+ end
39
+
40
+ # @return [Boolean, nil]
41
+ def compatible_with_pc?
42
+ if source["sampleMovieURL"]
43
+ source["sampleMovieURL"]["pc_flag"]
44
+ end
45
+ end
46
+
47
+ # @return [Boolean, nil]
48
+ def compatible_with_sp?
49
+ if source["sampleMovieURL"]
50
+ source["sampleMovieURL"]["sp_flag"]
51
+ end
52
+ end
53
+
31
54
  # @return [String, nil]
32
55
  def content_id
33
56
  source["content_id"]
@@ -53,19 +76,58 @@ module Rdmm
53
76
  Array(source["iteminfo"]["genre"])
54
77
  end
55
78
 
79
+ # @return [String, nil]
80
+ def isbn
81
+ source["isbn"]
82
+ end
83
+
84
+ # @return [String, nil]
85
+ def jancode
86
+ source["jancode"]
87
+ end
88
+
56
89
  # @return [Array]
57
90
  def labels
58
91
  Array(source["iteminfo"]["label"])
59
92
  end
60
93
 
94
+ # @return [String, nil]
95
+ def maker_product
96
+ source["maker_product"]
97
+ end
98
+
61
99
  # @return [Array]
62
100
  def makers
63
101
  Array(source["iteminfo"]["maker"])
64
102
  end
65
103
 
66
- # @return [Hash, nil]
67
- def prices
68
- source["prices"]
104
+ # @return [Integer, nil]
105
+ def number
106
+ source["number"]
107
+ end
108
+
109
+ # @return [String, nil]
110
+ def price
111
+ if source["prices"]
112
+ source["prices"]["price"]
113
+ end
114
+ end
115
+
116
+ # @return [Array<Hash>]
117
+ def price_deliveries
118
+ if source["prices"] && source["prices"]["deliveries"] && source["prices"]["deliveries"]["delivery"]
119
+ source["prices"]["deliveries"]["delivery"]
120
+ else
121
+ []
122
+ end
123
+ end
124
+
125
+ # @note May not be a Integer
126
+ # @return [Integer, nil]
127
+ def price
128
+ if source["prices"]
129
+ source["prices"]["proper"]
130
+ end
69
131
  end
70
132
 
71
133
  # @return [String, nil]
@@ -73,6 +135,11 @@ module Rdmm
73
135
  source["product_id"]
74
136
  end
75
137
 
138
+ # @return [String, nil]
139
+ def stock
140
+ source["stock"]
141
+ end
142
+
76
143
  # @return [Time, nil]
77
144
  def released_at
78
145
  if source["date"]
@@ -105,6 +172,11 @@ module Rdmm
105
172
  source["service_name"]
106
173
  end
107
174
 
175
+ # @return [Object]
176
+ def stock
177
+ source["stock"]
178
+ end
179
+
108
180
  # @return [String, nil]
109
181
  def title
110
182
  source["title"]
@@ -112,7 +184,94 @@ module Rdmm
112
184
 
113
185
  # @return [String, nil]
114
186
  def url
115
- source["url"]
187
+ source["URL"]
188
+ end
189
+
190
+ # @return [String, nil]
191
+ def url_affiliate
192
+ source["affiliateURL"]
193
+ end
194
+
195
+ # @return [String, nil]
196
+ def url_image_large
197
+ if source["imageURL"]
198
+ source["imageURL"]["large"]
199
+ end
200
+ end
201
+
202
+ # @return [String, nil]
203
+ def url_image_list
204
+ if source["imageURL"]
205
+ source["imageURL"]["list"]
206
+ end
207
+ end
208
+
209
+ # @return [String, nil]
210
+ def url_image_small
211
+ if source["imageURL"]
212
+ source["imageURL"]["small"]
213
+ end
214
+ end
215
+
216
+ # @return [Array<String>]
217
+ def url_image_samples
218
+ if source["sampleImageURL"] && source["sampleImageURL"]["sample_s"] && source["sampleImageURL"]["sample_s"]["image"]
219
+ source["sampleImageURL"]["sample_s"]["image"]
220
+ else
221
+ []
222
+ end
223
+ end
224
+
225
+ # @return [String, nil]
226
+ def url_movie_sample_size_476_306
227
+ if source["sampleMovieURL"]
228
+ source["sampleMovieURL"]["size_476_306"]
229
+ end
230
+ end
231
+
232
+ # @return [String, nil]
233
+ def url_movie_sample_size_560_360
234
+ if source["sampleMovieURL"]
235
+ source["sampleMovieURL"]["size_560_360"]
236
+ end
237
+ end
238
+
239
+ # @return [String, nil]
240
+ def url_movie_sample_size_644_414
241
+ if source["sampleMovieURL"]
242
+ source["sampleMovieURL"]["size_644_414"]
243
+ end
244
+ end
245
+
246
+ # @return [String, nil]
247
+ def url_movie_sample_size_720_480
248
+ if source["sampleMovieURL"]
249
+ source["sampleMovieURL"]["size_720_480"]
250
+ end
251
+ end
252
+
253
+ # @return [String, nil]
254
+ def url_sp
255
+ source["URLsp"]
256
+ end
257
+
258
+ # @return [String, nil]
259
+ def url_sp_affiliate
260
+ source["affiliateURLsp"]
261
+ end
262
+
263
+ # @return [String, nil]
264
+ def url_tachiyomi
265
+ if source["tachiyomi"]
266
+ source["tachiyomi"]["URL"]
267
+ end
268
+ end
269
+
270
+ # @return [String, nil]
271
+ def url_tachiyomi_affiliate
272
+ if source["tachiyomi"]
273
+ source["tachiyomi"]["affilaiteURL"]
274
+ end
116
275
  end
117
276
 
118
277
  # @return [Integer, nil]
@@ -1,3 +1,3 @@
1
1
  module Rdmm
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdmm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura