Class: RMeetup::Client
- Inherits:
-
Object
- Object
- RMeetup::Client
- Defined in:
- lib/rmeetup/client.rb
Overview
RMeetup::Client
Essentially a simple wrapper to delegate requests to different fetcher classes who are responsible for fetching and parsing their own responses.
Instance Method Summary collapse
-
#fetch(type, options = {}) ⇒ Object
Delegates to appropriate RMeetup::Fetcher.
-
#initialize(opts = {}) {|Configuration| ... } ⇒ RMeetup::Client
constructor
Initializes a new Client object.
-
#post(type, options = {}) ⇒ Object
Delegates to appropriate RMeetup::Poster.
Constructor Details
#initialize(opts = {}) {|Configuration| ... } ⇒ RMeetup::Client
Initializes a new Client object
30 31 32 33 34 35 36 37 38 |
# File 'lib/rmeetup/client.rb', line 30 def initialize(opts = {}) if not(opts.empty?) configuration.api_key = opts[:api_key] if opts.has_key?(:api_key) configuration.access_token = opts[:access_token] if opts.has_key?(:access_token) else yield(configuration) if block_given? end check_configuration! end |