Class: Crowdkit::Client
Overview
The top level client, all API access starts here. It’s unlike the other subclasses of API as it overrides the initialize method and sets us up for chaining.
Defined Under Namespace
Classes: Account, Jobs, Judgments, Poll, Statuses, Units, Workers, Worksets
Instance Attribute Summary collapse
-
#last_response ⇒ Object
Returns the value of attribute last_response.
Attributes inherited from API
#auto_pagination, #client, #config, #stored_params
Instance Method Summary collapse
-
#initialize(overrides, &block) ⇒ Client
constructor
Accepts a hash of configuration overrides or a Config object.
- #root ⇒ Object
Methods inherited from API
#arguments, extract_class_name, #id_key, namespace, #set, #with
Methods included from API::RequestMethods
Constructor Details
#initialize(overrides, &block) ⇒ Client
Accepts a hash of configuration overrides or a Config object
9 10 11 12 13 |
# File 'lib/crowdkit/client.rb', line 9 def initialize(overrides, &block) @config = overrides.is_a?(Config) ? overrides : Config.new(overrides, &block) @client = self @stored_params = {} end |
Instance Attribute Details
#last_response ⇒ Object
Returns the value of attribute last_response.
6 7 8 |
# File 'lib/crowdkit/client.rb', line 6 def last_response @last_response end |
Instance Method Details
#root ⇒ Object
15 16 17 |
# File 'lib/crowdkit/client.rb', line 15 def root do_get("") end |