Sha256: 060b151d8bec0c5be3e08a6d702b32f36490b3c71457ad5df9d8bc35a677ee8a
Contents?: true
Size: 840 Bytes
Versions: 10
Compression:
Stored size: 840 Bytes
Contents
require 'goodreads/version' require 'goodreads/errors' require 'goodreads/request' require 'goodreads/client' module Goodreads @@options = {} # Create a new Goodreads::Client instance # def self.new(options={}) Goodreads::Client.new(options) end # Define a global configuration # # options[:api_key] - Account API key # options[:api_secret] - Account API secret # def self.configure(options={}) unless options.kind_of?(Hash) raise ArgumentError, "Options hash required." end @@options[:api_key] = options[:api_key] @@options[:api_secret] = options[:api_secret] @@options end # Returns global configuration hash # def self.configuration @@options end # Resets the global configuration # def self.reset_configuration @@options = {} end end
Version data entries
10 entries across 10 versions & 2 rubygems