Class: QuickbloxApi::BaseClient
- Inherits:
-
Object
- Object
- QuickbloxApi::BaseClient
- Defined in:
- lib/quickblox_api/base_client.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ BaseClient
constructor
A new instance of BaseClient.
- #query(type, path, body = {}) ⇒ Object
Methods included from Helpers
Constructor Details
#initialize(opts = {}) ⇒ BaseClient
Returns a new instance of BaseClient.
5 6 7 8 9 10 11 |
# File 'lib/quickblox_api/base_client.rb', line 5 def initialize(opts = {}) raise(ArgumentError, 'secrets not specified') unless opts[:secrets].is_a?(Hash) opts.each do |name, value| instance_variable_set("@#{name}", value) self.class.send(:attr_reader, name) end end |
Instance Method Details
#query(type, path, body = {}) ⇒ Object
13 14 15 |
# File 'lib/quickblox_api/base_client.rb', line 13 def query(type, path, body = {}) _query(type, path, body.merge(token: get_token)) end |