openbd_api 0.5.1 → 0.6.0

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: 4e4ff40d0628496bbcaf76fbe7cdd868dbb10a0d
4
- data.tar.gz: 67394ea2fc4eadd6957c77d7a745d2790f55afd9
3
+ metadata.gz: 25cf3c66462e62b32e9e5a813e1075f85c63ff5a
4
+ data.tar.gz: aa874abfafdc8ef382b99922c13459b7ffa37b5c
5
5
  SHA512:
6
- metadata.gz: 8f735c814217650c3fd365c3cd3f96320b62034e04a288ed3f3ebeae0ddd7257ffe331d1f13b6d3ed605fdc27586a0c197fc16402cc0d430d7a3e8e35608165f
7
- data.tar.gz: 991afd16c483b4db77122c5943077269a125d079563d28444e47c32cbdaa3b64bd1e53e52faea85552a65123bd9ac87f796147040a3aabda384b94db3d65653a
6
+ metadata.gz: 7a7b1819a656806274af49c5e093f6ae89319d74ffc27b83561567a64b3ec941eede10240d6f8044adbeca4f4dc432b0a2e5ccb20f08d0ea1d2779d29b91c110
7
+ data.tar.gz: 883a6182d5ba703063d166178dcf13e88c6b8c137a099225e69b3dc5ddcc5d66dd8043d4b9a20eae4ee49a506f3438a9c6157f7a6f7a5f18a230f1db54ec6986
@@ -1,3 +1,9 @@
1
+ ## 0.6.0
2
+
3
+ - Support many methods of OpenBD::Resources::Hanmoto
4
+ - Add `OpenBD::Resources::Hanmoto::Jyuhan`
5
+ - Add `OpenBD::Resources::Hanmoto::Review`
6
+
1
7
  ## 0.5.1
2
8
 
3
9
  - replace BaseResource.source to BaseResource.src
@@ -1,6 +1,221 @@
1
1
  module OpenBD
2
2
  module Resources
3
+
4
+ # 版元独自書誌
3
5
  class Hanmoto < BaseResource
6
+
7
+ def initialize(src)
8
+ super
9
+ @jyuhan = nil
10
+ @reviews = nil
11
+ end
12
+
13
+ def dateshuppan
14
+ src["dateshuppan"]
15
+ end
16
+
17
+ # 類書・競合書
18
+ def ruishokyougousho
19
+ src["ruishokyougousho"]
20
+ end
21
+
22
+ # 重版情報
23
+ def jyuhan
24
+ @jyuhan if @jyuhan
25
+ if src["jyuhan"]
26
+ @jyuhan = src["jyuhan"].map{|item| OpenBD::Resources::Hanmoto::Jyuhan.new(item) }
27
+ end
28
+ @jyuhan
29
+ end
30
+
31
+ # 帯の内容
32
+ def obinaiyou
33
+ src["obinaiyou"]
34
+ end
35
+
36
+ # TRC用備考
37
+ def bikoutrc
38
+ src["bikoutrc"]
39
+ end
40
+
41
+ # 雑誌コード
42
+ def zasshicode
43
+ src["zasshicode"]
44
+ end
45
+
46
+ # TRC用児童ジャンルコード
47
+ def genrecodetrcjidou
48
+ src["genrecodetrcjidou"]
49
+ end
50
+
51
+ # 別称資料?
52
+ def bessoushiryou
53
+ src["bessoushiryou"]
54
+ end
55
+
56
+ # 関連書ISBN
57
+ def kanrenshoisbn
58
+ src["kanrenshoisbn"]
59
+ end
60
+
61
+ # 試し読みフラグ
62
+ # @return [boolean]
63
+ def hastameshiyomi
64
+ src["hastameshiyomi"]
65
+ end
66
+
67
+ # NDC(日本十進分類法)
68
+ def ndccode
69
+ src["ndccode"]
70
+ end
71
+
72
+ # 原書名
73
+ def genshomei
74
+ src["genshomei"]
75
+ end
76
+
77
+ # 105文字程度の解説
78
+ def kaisetsu105w
79
+ src["kaisetsu105w"]
80
+ end
81
+
82
+ # 追記
83
+ def tsuiki
84
+ src["tsuiki"]
85
+ end
86
+
87
+ # 受賞情報
88
+ def jushoujouhou
89
+ src["jushoujouhou"]
90
+ end
91
+
92
+ # 付録その他
93
+ def furokusonota
94
+ src["furokusonota"]
95
+ end
96
+
97
+ # 販売区分
98
+ # @return [Boolean]
99
+ def kubunhanbai
100
+ src["kubunhanbai"]
101
+ end
102
+
103
+ # 付録コード
104
+ # @return [Integer]
105
+ def furoku
106
+ src["furoku"]
107
+ end
108
+
109
+ # 最終更新日
110
+ def datemodified
111
+ src["datemodified"]
112
+ end
113
+
114
+ # 読者書き込み
115
+ def dokushakakikomi
116
+ src["dokushakakikomi"]
117
+ end
118
+
119
+ # 在庫ステータス
120
+ # @return [Integer]
121
+ def zaiko
122
+ src["zaiko"]
123
+ end
124
+
125
+ # ルビの有無
126
+ # @return [Boolean]
127
+ def rubynoumu
128
+ src["rubynoumu"]
129
+ end
130
+
131
+ # 読者書き込みページ数
132
+ # @return [Integer]
133
+ def dokushakakikomipagesuu
134
+ src["dokushakakikomipagesuu"]
135
+ end
136
+
137
+ # 版
138
+ # @return [String]
139
+ def han
140
+ src["han"]
141
+ end
142
+
143
+ # 月号・号数
144
+ # @return [String]
145
+ def gatsugougousuu
146
+ src["gatsugougousuu"]
147
+ end
148
+
149
+ # 版元からひとこと
150
+ def hanmotokarahitokoto
151
+ src["hanmotokarahitokoto"]
152
+ end
153
+
154
+ # 重版予定日
155
+ def datejuuhanyotei
156
+ src["datejuuhanyotei"]
157
+ end
158
+
159
+ # 著者補足情報
160
+ # @return [Array<Hash>]
161
+ def author
162
+ src["author"]
163
+ end
164
+
165
+ # その他の特記事項
166
+ def sonotatokkijikou
167
+ src["sonotatokkijikou"]
168
+ end
169
+
170
+ # 最終作成日
171
+ def datecreated
172
+ src["datecreated"]
173
+ end
174
+
175
+ # 書評情報
176
+ # @return [Array<OpenBD::Resources::Hanmoto::Review>]
177
+ def reviews
178
+ @reviews if @reviews
179
+ if src["reviews"]
180
+ @reviews = src["reviews"].map{|item| OpenBD::Resources::Hanmoto::Review.new(item)}
181
+ end
182
+ @reviews
183
+ end
184
+
185
+ # TRC用ジャンルコード
186
+ def genrecodetrc
187
+ src["genrecodetrc"]
188
+ end
189
+
190
+ # 本の綴じ方
191
+ def toji
192
+ src["toji"]
193
+ end
194
+
195
+ # ラノベフラグ
196
+ def lanove
197
+ src["lanove"]
198
+ end
199
+
200
+ # 関連書
201
+ def kanrensho
202
+ src["kanrensho"]
203
+ end
204
+
205
+ # 絶版日
206
+ def datezeppan
207
+ src["datezeppan"]
208
+ end
209
+
210
+ # 刊行形態
211
+ def kankoukeitai
212
+ src["kankoukeitai"]
213
+ end
214
+
215
+ # まえがきなど
216
+ def maegakinado
217
+ src["maegakinado"]
218
+ end
4
219
  end
5
220
  end
6
221
  end
@@ -0,0 +1,28 @@
1
+ module OpenBD
2
+ module Resources
3
+ class Hanmoto
4
+ class Jyuhan < BaseResource
5
+ def initialize(src)
6
+ super
7
+ end
8
+
9
+ def date
10
+ src["date"]
11
+ end
12
+
13
+ def comment
14
+ src["comment"]
15
+ end
16
+
17
+ def ctime
18
+ src["ctime"]
19
+ end
20
+
21
+ def suri
22
+ src["suri"]
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
28
+
@@ -0,0 +1,60 @@
1
+ module OpenBD
2
+ module Resources
3
+ class Hanmoto
4
+
5
+ # Review
6
+ #
7
+ # 書評
8
+ class Review < BaseResource
9
+
10
+ # 情報源
11
+ def source
12
+ src["source"]
13
+ end
14
+
15
+ # 朝刊・夕刊
16
+ def choyukan
17
+ src["choyukan"]
18
+ end
19
+
20
+ # 版
21
+ def han
22
+ src["han"]
23
+ end
24
+
25
+ # 情報源ID
26
+ # @return [Integer]
27
+ def source_id
28
+ src["source_id"]
29
+ end
30
+
31
+ # 評者
32
+ def reviewer
33
+ src["reviewer"]
34
+ end
35
+
36
+ # 書評掲載日
37
+ def appearance
38
+ src["appearance"]
39
+ end
40
+
41
+ # 投稿ユーザー
42
+ def post_user
43
+ src["post_user"]
44
+ end
45
+
46
+ # リンク(URL)
47
+ # @return [String]
48
+ def link
49
+ src["link"]
50
+ end
51
+
52
+ # 区分ID
53
+ # @return [Integer]
54
+ def kubun_id
55
+ src["kubun_id"]
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -1,3 +1,3 @@
1
1
  module OpenBD
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -4,6 +4,8 @@ require 'slop'
4
4
 
5
5
  require 'openbd/resources/base_resource'
6
6
  require 'openbd/resources/hanmoto'
7
+ require 'openbd/resources/hanmoto/jyuhan'
8
+ require 'openbd/resources/hanmoto/review'
7
9
  require 'openbd/resources/onix'
8
10
  require 'openbd/resources/onix/contributor'
9
11
  require 'openbd/resources/onix/collateral_detail'
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.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nasum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-04 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -117,6 +117,8 @@ files:
117
117
  - lib/openbd/openbd_cli.rb
118
118
  - lib/openbd/resources/base_resource.rb
119
119
  - lib/openbd/resources/hanmoto.rb
120
+ - lib/openbd/resources/hanmoto/jyuhan.rb
121
+ - lib/openbd/resources/hanmoto/review.rb
120
122
  - lib/openbd/resources/onix.rb
121
123
  - lib/openbd/resources/onix/collateral_detail.rb
122
124
  - lib/openbd/resources/onix/contributor.rb