Class: Evrythng::Client
- Inherits:
-
Object
- Object
- Evrythng::Client
- Includes:
- Collections, Properties, Search, Thngs, Connection, Request
- Defined in:
- lib/evrythng/client.rb,
lib/evrythng/client/thngs.rb,
lib/evrythng/client/search.rb,
lib/evrythng/client/properties.rb,
lib/evrythng/client/collections.rb
Overview
Wrapper for the Evrythng REST API
Defined Under Namespace
Modules: Collections, Properties, Search, Thngs
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Evrythng::Client
constructor
Initializes a new API object.
Methods included from Search
Methods included from Properties
#properties, #property, #property_create, #property_update
Methods included from Collections
#collection_create, #collections
Methods included from Thngs
#thng, #thng_create, #thng_update, #thngs
Methods included from Request
Constructor Details
#initialize(attrs = {}) ⇒ Evrythng::Client
Initializes a new API object
29 30 31 32 33 34 |
# File 'lib/evrythng/client.rb', line 29 def initialize(attrs={}) attrs = Evrythng..merge(attrs) Config::VALID_OPTIONS_KEYS.each do |key| instance_variable_set("@#{key}".to_sym, attrs[key]) end end |