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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/openbd/resources/base_resource.rb +3 -3
- data/lib/openbd/resources/onix.rb +6 -6
- data/lib/openbd/resources/onix/collateral_detail.rb +2 -2
- data/lib/openbd/resources/onix/contributor.rb +6 -6
- data/lib/openbd/resources/onix/descriptive_detail.rb +2 -2
- data/lib/openbd/resources/onix/product_supply.rb +2 -2
- data/lib/openbd/resources/onix/publishing_detail.rb +2 -2
- data/lib/openbd/resources/openbd_item.rb +5 -5
- data/lib/openbd/resources/summary.rb +8 -8
- data/lib/openbd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e4ff40d0628496bbcaf76fbe7cdd868dbb10a0d
|
4
|
+
data.tar.gz: 67394ea2fc4eadd6957c77d7a745d2790f55afd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f735c814217650c3fd365c3cd3f96320b62034e04a288ed3f3ebeae0ddd7257ffe331d1f13b6d3ed605fdc27586a0c197fc16402cc0d430d7a3e8e35608165f
|
7
|
+
data.tar.gz: 991afd16c483b4db77122c5943077269a125d079563d28444e47c32cbdaa3b64bd1e53e52faea85552a65123bd9ac87f796147040a3aabda384b94db3d65653a
|
data/CHANGELOG.md
CHANGED
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/
|
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
|
|
@@ -111,9 +111,9 @@ module OpenBD
|
|
111
111
|
"06" => "成人向け(言語)",
|
112
112
|
}
|
113
113
|
|
114
|
-
def initialize(
|
114
|
+
def initialize(src)
|
115
115
|
super
|
116
|
-
@record_reference =
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
29
|
+
def initialize(src)
|
30
30
|
super
|
31
|
-
@role =
|
32
|
-
@name =
|
33
|
-
@name_collationkey =
|
34
|
-
@seqence_number =
|
35
|
-
@biographical_note =
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
5
|
-
@
|
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(
|
12
|
+
@onix ||= ::OpenBD::Resources::Onix.new(src['onix'])
|
13
13
|
end
|
14
14
|
|
15
15
|
def hanmoto
|
16
|
-
@hanmoto ||= ::OpenBD::Resources::Hanmoto.new(
|
16
|
+
@hanmoto ||= ::OpenBD::Resources::Hanmoto.new(src['hanmoto'])
|
17
17
|
end
|
18
18
|
|
19
19
|
def summary
|
20
|
-
@summary ||= ::OpenBD::Resources::Summary.new(
|
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
|
-
|
5
|
+
src['isbn']
|
6
6
|
end
|
7
7
|
|
8
8
|
def title
|
9
|
-
|
9
|
+
src['title']
|
10
10
|
end
|
11
11
|
|
12
12
|
def volume
|
13
|
-
|
13
|
+
src['volume']
|
14
14
|
end
|
15
15
|
|
16
16
|
def series
|
17
|
-
|
17
|
+
src['series']
|
18
18
|
end
|
19
19
|
|
20
20
|
def publisher
|
21
|
-
|
21
|
+
src['publisher']
|
22
22
|
end
|
23
23
|
|
24
24
|
def pubdate
|
25
|
-
|
25
|
+
src['pubdate']
|
26
26
|
end
|
27
27
|
|
28
28
|
def cover
|
29
|
-
|
29
|
+
src['cover']
|
30
30
|
end
|
31
31
|
|
32
32
|
def author
|
33
|
-
|
33
|
+
src['author']
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
data/lib/openbd/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|