Module: Goodreads
- Defined in:
- lib/goodreads.rb,
lib/goodreads/client.rb,
lib/goodreads/errors.rb,
lib/goodreads/request.rb,
lib/goodreads/version.rb,
lib/goodreads/client/books.rb,
lib/goodreads/client/users.rb,
lib/goodreads/client/groups.rb,
lib/goodreads/client/authors.rb,
lib/goodreads/client/friends.rb,
lib/goodreads/client/reviews.rb,
lib/goodreads/client/shelves.rb,
lib/goodreads/client/authorized.rb
Defined Under Namespace
Modules: Authorized, Authors, Books, Friends, Groups, Request, Reviews, Shelves, Users Classes: Client, ConfigurationError, Error, Forbidden, NotFound, ServerError, Unauthorized, UnknownError
Constant Summary collapse
- VERSION =
"0.8.0"
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
-
.configuration ⇒ Object
Returns global configuration hash.
-
.configure(params = {}) ⇒ Object
Define a global configuration.
-
.new(params = {}) ⇒ Object
Create a new Goodreads::Client instance.
-
.reset_configuration ⇒ Object
Resets the global configuration.
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/goodreads.rb', line 8 def @options end |
Class Method Details
.configuration ⇒ Object
Returns global configuration hash
33 34 35 |
# File 'lib/goodreads.rb', line 33 def self.configuration end |
.configure(params = {}) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/goodreads.rb', line 23 def self.configure(params = {}) fail(ArgumentError, "Options hash required.") unless params.is_a?(Hash) [:api_key] = params[:api_key] [:api_secret] = params[:api_secret] end |
.new(params = {}) ⇒ Object
Create a new Goodreads::Client instance
14 15 16 |
# File 'lib/goodreads.rb', line 14 def self.new(params = {}) Goodreads::Client.new(params) end |
.reset_configuration ⇒ Object
Resets the global configuration
39 40 41 |
# File 'lib/goodreads.rb', line 39 def self.reset_configuration self. = {} end |