google_book 0.3.0.1 → 0.3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -1
- data/lib/google_book/book_item.rb +4 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -51,7 +51,8 @@
|
|
51
51
|
<code> b.search("keyword or book name",1)</code> <br/>
|
52
52
|
<code>b.book_info.get_all_titles #to get the all titles of your search book</code> <br/>
|
53
53
|
<code>b.book_info.get_all_subtitles # to get all the subtitles of your search book</code>
|
54
|
-
<code>b.total_count #get the search results count</code
|
54
|
+
<code>b.total_count #get the search results count</code><br/>
|
55
|
+
<code><b>b.price #get the book price with currency</b></code>
|
55
56
|
</p>
|
56
57
|
|
57
58
|
|
@@ -68,6 +68,10 @@ class BookItem
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
def price
|
72
|
+
@item[:item]["saleInfo"]["listPrice"]["amount"].to_s + ' ' + @item[:item]["saleInfo"]["listPrice"]["currencyCode"] unless @item[:item]["saleInfo"]["listPrice"].nil?
|
73
|
+
end
|
74
|
+
|
71
75
|
def downloadable?
|
72
76
|
unless @item[:item]["accessInfo"]["pdf"].nil? || @item[:item]["accessInfo"]["pdf"]["downloadLink"].nil?
|
73
77
|
true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_book
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: rdasarminus@gmail.com
|