module Goodreads

Constants

VERSION

Attributes

options[RW]

Public Class Methods

configuration() click to toggle source

Returns global configuration hash

# File lib/goodreads.rb, line 33
def self.configuration
  options
end
configure(params = {}) click to toggle source

Define a global configuration

options - Account API key options - Account API secret

# File lib/goodreads.rb, line 23
def self.configure(params = {})
  fail(ArgumentError, "Options hash required.") unless params.is_a?(Hash)

  options[:api_key]    = params[:api_key]
  options[:api_secret] = params[:api_secret]
  options
end
new(params = {}) click to toggle source

Create a new Goodreads::Client instance

# File lib/goodreads.rb, line 14
def self.new(params = {})
  Goodreads::Client.new(params)
end
reset_configuration() click to toggle source

Resets the global configuration

# File lib/goodreads.rb, line 39
def self.reset_configuration
  self.options = {}
end