module SparkApi
Pagination
for api resource collections¶ ↑
Will paginate adapter for the api client. Utilizes the same interface as will paginate and returns the same WillPaginate::Collection for finder results.
Gem version information
Constants
- VERSION
Public Class Methods
client(opts={})
click to toggle source
:nocov:
# File lib/spark_api.rb, line 40 def self.client(opts={}) Thread.current[:spark_api_client] ||= SparkApi::Client.new(opts) end
logger()
click to toggle source
:nocov:
# File lib/spark_api.rb, line 27 def self.logger if @logger.nil? @logger = Logger.new(STDOUT) @logger.level = Logger::INFO end @logger end
logger=(logger)
click to toggle source
# File lib/spark_api.rb, line 35 def self.logger= logger @logger = logger end
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/spark_api.rb, line 44 def self.method_missing(method, *args, &block) return super unless (client.respond_to?(method)) client.send(method, *args, &block) end
reset()
click to toggle source
# File lib/spark_api.rb, line 49 def self.reset reset_configuration Thread.current[:spark_api_client] = nil end