Class: Semantics3::Base
- Inherits:
-
Object
- Object
- Semantics3::Base
- Defined in:
- lib/semantics3.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(api_key, api_secret) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(api_key, api_secret) ⇒ Base
Returns a new instance of Base.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/semantics3.rb', line 18 def initialize(api_key,api_secret) @api_key = api_key @api_secret = api_secret raise Error.new('API Credentials Missing','You did not supply an api_key. Please sign up at https://semantics3.com/ to obtain your api_key.','api_key') if api_key == '' raise Error.new('API Credentials Missing','You did not supply an api_secret. Please sign up at https://semantics3.com/ to obtain your api_secret.','api_secret') if api_secret == '' @consumer = OAuth::Consumer.new(@api_key, @api_secret) @auth = OAuth::AccessToken.new(@consumer) end |