openlibrary 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +15 -16
  3. data/lib/openlibrary/version.rb +1 -1
  4. metadata +87 -99
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8204a4437b6ce0b1b0198625a3dd4c42b44b32bd
4
+ data.tar.gz: b1d6384573f03db78992d188428d0f917fbe344a
5
+ SHA512:
6
+ metadata.gz: 32fc739a36b65205382db5f402133dc97f387a0419c38e2e8fd4dd3da926a8c5429376bfae14fdc0ce61a4326a02f411898a573d69f2382b3978167b439e8887
7
+ data.tar.gz: 9523122d82a6c31ab8f5e1bb95d13f9e09c3d9f6156f0d5b6e6ef8bc715e72b3591f3066b125852a1e972c3bf75fe578cc55600b770635b702474af5ce41a589
@@ -1,4 +1,6 @@
1
- == Openlibrary 2.1.0
1
+ == Openlibrary
2
+
3
+ {<img src="https://badge.fury.io/rb/openlibrary.png" alt="Gem Version" />}[http://badge.fury.io/rb/openlibrary]
2
4
 
3
5
  The openlibrary gem provides Ruby clients for the {Open Library REST API}[http://openlibrary.org/dev/docs/restful_api] and {Books API}[http://openlibrary.org/dev/docs/api/books].
4
6
 
@@ -9,7 +11,7 @@ For more information about Open Library development, visit the {Open Library Dev
9
11
 
10
12
  The gem is tested against Ruby 2.0.0 and runs smoothly with Rails 4.
11
13
 
12
- gem install openlibrary
14
+ gem install openlibrary
13
15
 
14
16
  or in your Gemfile:
15
17
 
@@ -22,15 +24,15 @@ You can use the Books client to retrieve a book's Open Library listing informati
22
24
  # just require
23
25
  require 'openlibrary'
24
26
 
25
- == REST Client
27
+ == REST Client
26
28
 
27
- You can use the REST client to look up books, authors, the revision history of any Open Library object, and recent changes to Open Library.
29
+ You can use the REST client to look up books, authors, the revision history of any Open Library object, and recent changes to Open Library.
28
30
 
29
31
  You can also use the REST client to log in and save changes to Open Library, after you register your profile (or your bot's profile) with the {API Usergroup}[http://openlibrary.org/usergroup/api]. Send a message to the {ol-tech mailing list}[http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech] to learn how!
30
32
 
31
33
  === Getting Started
32
34
 
33
- Before anything else, create a new client:
35
+ Before anything else, create a new client:
34
36
 
35
37
  client = Openlibrary::Client.new
36
38
 
@@ -41,7 +43,7 @@ Since Open Library has varying amounts of information about the books in its dat
41
43
  Find a book by its OLID:
42
44
 
43
45
  book = client.book('olid')
44
-
46
+
45
47
  book.contributors # array of book contributors
46
48
  book.covers # array of book cover ids
47
49
  book.works # array of works associated with the book
@@ -135,7 +137,7 @@ Set the other parameters for the object you want to change:
135
137
  key = '/type/OLID' # e.g., '/books/OL9220552M'
136
138
  update = full_object_with_changes # must be JSON format
137
139
  comment = 'changed X, Y, and Z'
138
-
140
+
139
141
  Save your changes and receive the updated object as a response:
140
142
 
141
143
  object = client.save(key, cookie, update, comment)
@@ -159,11 +161,11 @@ Look up a book by its ISBN-10 or ISBN-13:
159
161
  book.info_url # book's URL on Open Library
160
162
  book.preview # book's preview state, either 'noview' or 'full'
161
163
  book.thumbnail_url # url of thumbnail cover of the book, if available
162
-
163
- book.preview_url
164
- # Links to an archive.org page with a readable version of the book,
165
- # if one is available. If not, links to the book's Open Library
166
- # page. `book.preview` should be used first to test if a readable
164
+
165
+ book.preview_url
166
+ # Links to an archive.org page with a readable version of the book,
167
+ # if one is available. If not, links to the book's Open Library
168
+ # page. `book.preview` should be used first to test if a readable
167
169
  # preview of the book exists.
168
170
 
169
171
  Other built-in finder methods:
@@ -182,7 +184,7 @@ Instantiate the class:
182
184
  Look up a book by its ISBN-10 or ISBN-13:
183
185
 
184
186
  book_details = data.find_by_isbn("0451526538")
185
-
187
+
186
188
  book_details.title # book's title
187
189
  book_details.authors # array of authors
188
190
 
@@ -200,12 +202,9 @@ Other built-in finder methods:
200
202
  * Eric Larson https://github.com/ewlarson
201
203
  * Charles Horn https://github.com/hornc
202
204
  * Alex Grant https://github.com/grantovich
203
- <<<<<<< HEAD
204
205
  * Bryan L. Fordham https://github.com/bfordham
205
206
  * Kyle Corbitt https://github.com/kcorbitt
206
- =======
207
207
 
208
208
  == LICENSE
209
209
 
210
210
  This code is released under the {CC0 License}[http://creativecommons.org/publicdomain/zero/1.0/], and may be used for any purpose without restrictions.
211
- >>>>>>> 3e3db18144f8faad94b5c0353424e4207a795c88
@@ -1,3 +1,3 @@
1
1
  module Openlibrary
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,111 +1,106 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: openlibrary
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 2
7
- - 1
8
- - 0
9
- version: 2.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.1
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Jay Fajardo
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2013-07-17 00:00:00 +08:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
25
17
  - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 13
30
- version: "2.13"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.13'
31
20
  type: :development
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: webmock
35
21
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
38
24
  - - ~>
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 1
42
- - 11
43
- version: "1.11"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: webmock
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.11'
44
34
  type: :development
45
- version_requirements: *id002
46
- - !ruby/object:Gem::Dependency
47
- name: json
48
35
  prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
50
- requirements:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
51
38
  - - ~>
52
- - !ruby/object:Gem::Version
53
- segments:
54
- - 1
55
- - 7
56
- - 7
39
+ - !ruby/object:Gem::Version
40
+ version: '1.11'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
57
47
  version: 1.7.7
58
48
  type: :runtime
59
- version_requirements: *id003
60
- - !ruby/object:Gem::Dependency
61
- name: rest-client
62
49
  prerelease: false
63
- requirement: &id004 !ruby/object:Gem::Requirement
64
- requirements:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
65
52
  - - ~>
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 1
69
- - 6
70
- version: "1.6"
53
+ - !ruby/object:Gem::Version
54
+ version: 1.7.7
55
+ - !ruby/object:Gem::Dependency
56
+ name: rest-client
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.6'
71
62
  type: :runtime
72
- version_requirements: *id004
73
- - !ruby/object:Gem::Dependency
74
- name: hashie
75
63
  prerelease: false
76
- requirement: &id005 !ruby/object:Gem::Requirement
77
- requirements:
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
78
66
  - - ~>
79
- - !ruby/object:Gem::Version
80
- segments:
81
- - 2
82
- - 0
83
- - 2
67
+ - !ruby/object:Gem::Version
68
+ version: '1.6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: hashie
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
84
75
  version: 2.0.2
85
76
  type: :runtime
86
- version_requirements: *id005
87
- - !ruby/object:Gem::Dependency
88
- name: activesupport
89
77
  prerelease: false
90
- requirement: &id006 !ruby/object:Gem::Requirement
91
- requirements:
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
92
80
  - - ~>
93
- - !ruby/object:Gem::Version
94
- segments:
95
- - 4
96
- version: "4"
81
+ - !ruby/object:Gem::Version
82
+ version: 2.0.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: activesupport
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '4'
97
90
  type: :runtime
98
- version_requirements: *id006
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '4'
99
97
  description: Openlibrary.org API Interface
100
- email:
98
+ email:
101
99
  - jmrfajardo@gmail.com
102
100
  executables: []
103
-
104
101
  extensions: []
105
-
106
102
  extra_rdoc_files: []
107
-
108
- files:
103
+ files:
109
104
  - .gitignore
110
105
  - .ruby-gemset
111
106
  - .ruby-version
@@ -144,37 +139,30 @@ files:
144
139
  - spec/fixtures/search.json
145
140
  - spec/openlibrary_spec.rb
146
141
  - spec/spec_helper.rb
147
- has_rdoc: true
148
142
  homepage: http://www.proudcloud.net
149
143
  licenses: []
150
-
144
+ metadata: {}
151
145
  post_install_message:
152
146
  rdoc_options: []
153
-
154
- require_paths:
147
+ require_paths:
155
148
  - lib
156
- required_ruby_version: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- segments:
161
- - 0
162
- version: "0"
163
- required_rubygems_version: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- segments:
168
- - 0
169
- version: "0"
149
+ required_ruby_version: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - '>='
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ required_rubygems_version: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
170
159
  requirements: []
171
-
172
160
  rubyforge_project: openlibrary
173
- rubygems_version: 1.3.6
161
+ rubygems_version: 2.0.3
174
162
  signing_key:
175
- specification_version: 3
163
+ specification_version: 4
176
164
  summary: Ruby Interface for the Openlibrary.org API
177
- test_files:
165
+ test_files:
178
166
  - spec/client_spec.rb
179
167
  - spec/fixtures/author.json
180
168
  - spec/fixtures/book.json