openbd_api 0.5.0 → 0.5.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: 9dcca7a82ee9b8b2ba9bfbd76a1b9785a6e4985d
4
- data.tar.gz: bcea664ccbf4800c6f90102bad3e3702bf4d7c99
3
+ metadata.gz: 4e4ff40d0628496bbcaf76fbe7cdd868dbb10a0d
4
+ data.tar.gz: 67394ea2fc4eadd6957c77d7a745d2790f55afd9
5
5
  SHA512:
6
- metadata.gz: e19d7bf8991ecbf94338e68094010305f1174a0073cc8dbbc435bde64d0ebf2d01c33a0c83e84486ab5de0b606dcc14f32532de390b84e4d2e997ca95bc24b2d
7
- data.tar.gz: a884e6c12e3bc1baaec2f9c6be240e127e4904c104442a5517c8b7b7509b5b1d1ed2e5602b09eea65b44007d6b756881a7c881810d1fcf00ffbf38a0c3853566
6
+ metadata.gz: 8f735c814217650c3fd365c3cd3f96320b62034e04a288ed3f3ebeae0ddd7257ffe331d1f13b6d3ed605fdc27586a0c197fc16402cc0d430d7a3e8e35608165f
7
+ data.tar.gz: 991afd16c483b4db77122c5943077269a125d079563d28444e47c32cbdaa3b64bd1e53e52faea85552a65123bd9ac87f796147040a3aabda384b94db3d65653a
@@ -1,3 +1,7 @@
1
+ ## 0.5.1
2
+
3
+ - replace BaseResource.source to BaseResource.src
4
+
1
5
  ## 0.5.0
2
6
 
3
7
  - Add `OpenBD::Resources::Onix::CollateralDetail`
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OpenBD
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/openbd_api.svg)](https://badge.fury.io/rb/openbd_api)
4
- [![Build Status](https://travis-ci.org/nasum/openbd.svg?branch=master)](https://travis-ci.org/nasum/openbd)
4
+ [![Build Status](https://travis-ci.org/nasum/openbd_api.svg?branch=master)](https://travis-ci.org/nasum/openbd_api)
5
5
 
6
6
  This gem wraps [openBD](https://openbd.jp/) Web API.
7
7
 
@@ -1,10 +1,10 @@
1
1
  module OpenBD
2
2
  module Resources
3
3
  class BaseResource
4
- attr_reader :source
4
+ attr_reader :src
5
5
 
6
- def initialize(source)
7
- @source = source
6
+ def initialize(src)
7
+ @src = src
8
8
  end
9
9
  end
10
10
  end
@@ -111,9 +111,9 @@ module OpenBD
111
111
  "06" => "成人向け(言語)",
112
112
  }
113
113
 
114
- def initialize(source)
114
+ def initialize(src)
115
115
  super
116
- @record_reference = source["RecordReference"] ## ISBN
116
+ @record_reference = src["RecordReference"] ## ISBN
117
117
  @descriptive_detail = nil
118
118
  @collateral_detail = nil
119
119
  @publishing_detail = nil
@@ -121,19 +121,19 @@ module OpenBD
121
121
  end
122
122
 
123
123
  def descriptive_detail
124
- @descriptive_detail ||= OpenBD::Resources::Onix::DescriptiveDetail.new(source["DescriptiveDetail"])
124
+ @descriptive_detail ||= OpenBD::Resources::Onix::DescriptiveDetail.new(src["DescriptiveDetail"])
125
125
  end
126
126
 
127
127
  def collateral_detail
128
- @collateral_detail ||= OpenBD::Resources::Onix::CollateralDetail.new(source["CollateralDetail"])
128
+ @collateral_detail ||= OpenBD::Resources::Onix::CollateralDetail.new(src["CollateralDetail"])
129
129
  end
130
130
 
131
131
  def publishing_detail
132
- @publishing_detail ||= OpenBD::Resources::Onix::PublishingDetail.new(source["PublishingDetail"])
132
+ @publishing_detail ||= OpenBD::Resources::Onix::PublishingDetail.new(src["PublishingDetail"])
133
133
  end
134
134
 
135
135
  def product_supply
136
- @product_supply ||= OpenBD::Resources::Onix::ProductSupply.new(source["ProductSupply"])
136
+ @product_supply ||= OpenBD::Resources::Onix::ProductSupply.new(src["ProductSupply"])
137
137
  end
138
138
  end
139
139
  end
@@ -24,14 +24,14 @@ module OpenBD
24
24
  # Product image / Artwork (付録、商品イメージ)
25
25
  attr_reader :image
26
26
 
27
- def initialize(source)
27
+ def initialize(src)
28
28
  super
29
29
  @short_description = nil
30
30
  @description = nil
31
31
  @toc = nil
32
32
  @cover = []
33
33
  @image = []
34
- parse(source)
34
+ parse(src)
35
35
  end
36
36
 
37
37
  def parse(cd)
@@ -26,13 +26,13 @@ module OpenBD
26
26
  # Biographical Note (著者略歴)
27
27
  attr_reader :biographical_note
28
28
 
29
- def initialize(source)
29
+ def initialize(src)
30
30
  super
31
- @role = source["ContributorRole"]
32
- @name = source["PersonName"]["content"] rescue nil
33
- @name_collationkey = source["PersonName"]["collationkey"] rescue nil
34
- @seqence_number = source["SequenceNumber"]
35
- @biographical_note = source["BiographicalNote"]
31
+ @role = src["ContributorRole"]
32
+ @name = src["PersonName"]["content"] rescue nil
33
+ @name_collationkey = src["PersonName"]["collationkey"] rescue nil
34
+ @seqence_number = src["SequenceNumber"]
35
+ @biographical_note = src["BiographicalNote"]
36
36
  end
37
37
  end
38
38
  end
@@ -95,7 +95,7 @@ module OpenBD
95
95
  # https://onix-codelists.io/codelist/203
96
96
  attr_reader :onix_adult_audience_rating
97
97
 
98
- def initialize(source)
98
+ def initialize(src)
99
99
  super
100
100
  @product_composition = nil
101
101
  @product_form = nil
@@ -121,7 +121,7 @@ module OpenBD
121
121
  @genre_code = nil
122
122
  @jp_childrens_audience_code = nil
123
123
  @onix_adult_audience_rating = nil
124
- parse(source)
124
+ parse(src)
125
125
  end
126
126
 
127
127
  def parse(dd)
@@ -27,14 +27,14 @@ module OpenBD
27
27
  # Special Price Until Date (特価終了日)
28
28
  attr_reader :special_price_until_date
29
29
 
30
- def initialize(source)
30
+ def initialize(src)
31
31
  super
32
32
  @returns_conditions_code = nil
33
33
  @price = nil
34
34
  @special_price = nil
35
35
  @special_price_from_date = nil
36
36
  @special_price_until_date = nil
37
- parse(source)
37
+ parse(src)
38
38
  end
39
39
 
40
40
  def parse(ps)
@@ -33,7 +33,7 @@ module OpenBD
33
33
  # @return [String]
34
34
  attr_reader :publishers_reservation_order_deadline
35
35
 
36
- def initialize(source)
36
+ def initialize(src)
37
37
  super
38
38
  @imprint = nil
39
39
  @publisher = nil
@@ -41,7 +41,7 @@ module OpenBD
41
41
  @publishing_embargo_date = nil
42
42
  @public_announcement_date = nil
43
43
  @publishers_reservation_order_deadline = nil
44
- parse(source)
44
+ parse(src)
45
45
  end
46
46
 
47
47
  def parse(pd)
@@ -1,23 +1,23 @@
1
1
  module OpenBD
2
2
  module Resources
3
3
  class OpenbdItem < BaseResource
4
- def initialize(source)
5
- @source = source
4
+ def initialize(src)
5
+ @src = src
6
6
  @hanmoto = nil
7
7
  @onix = nil
8
8
  @summary = nil
9
9
  end
10
10
 
11
11
  def onix
12
- @onix ||= ::OpenBD::Resources::Onix.new(source['onix'])
12
+ @onix ||= ::OpenBD::Resources::Onix.new(src['onix'])
13
13
  end
14
14
 
15
15
  def hanmoto
16
- @hanmoto ||= ::OpenBD::Resources::Hanmoto.new(source['hanmoto'])
16
+ @hanmoto ||= ::OpenBD::Resources::Hanmoto.new(src['hanmoto'])
17
17
  end
18
18
 
19
19
  def summary
20
- @summary ||= ::OpenBD::Resources::Summary.new(source['summary'])
20
+ @summary ||= ::OpenBD::Resources::Summary.new(src['summary'])
21
21
  end
22
22
  end
23
23
  end
@@ -2,35 +2,35 @@ module OpenBD
2
2
  module Resources
3
3
  class Summary < BaseResource
4
4
  def isbn
5
- source['isbn']
5
+ src['isbn']
6
6
  end
7
7
 
8
8
  def title
9
- source['title']
9
+ src['title']
10
10
  end
11
11
 
12
12
  def volume
13
- source['volume']
13
+ src['volume']
14
14
  end
15
15
 
16
16
  def series
17
- source['series']
17
+ src['series']
18
18
  end
19
19
 
20
20
  def publisher
21
- source['publisher']
21
+ src['publisher']
22
22
  end
23
23
 
24
24
  def pubdate
25
- source['pubdate']
25
+ src['pubdate']
26
26
  end
27
27
 
28
28
  def cover
29
- source['cover']
29
+ src['cover']
30
30
  end
31
31
 
32
32
  def author
33
- source['author']
33
+ src['author']
34
34
  end
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module OpenBD
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openbd_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nasum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-19 00:00:00.000000000 Z
11
+ date: 2017-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler