Class: Gosquared::RubyLibrary
- Inherits:
-
Object
- Object
- Gosquared::RubyLibrary
- Defined in:
- lib/gosquared.rb
Instance Method Summary collapse
- #account ⇒ Object
-
#initialize(api_key, site_id) ⇒ RubyLibrary
constructor
A new instance of RubyLibrary.
- #now ⇒ Object
- #people ⇒ Object
- #tracking ⇒ Object
- #trends ⇒ Object
Constructor Details
#initialize(api_key, site_id) ⇒ RubyLibrary
Returns a new instance of RubyLibrary.
11 12 13 14 15 16 |
# File 'lib/gosquared.rb', line 11 def initialize api_key, site_id @api_key = api_key @site_id = site_id raise 'api key cannot be empty/nil' if api_key.nil? || api_key.empty? raise 'site_token cannot be empty/nil' if site_id.nil? || site_id.empty? end |
Instance Method Details
#account ⇒ Object
34 35 36 |
# File 'lib/gosquared.rb', line 34 def account @account ||= Gosquared::Account.new(@api_key, @site_id) end |
#now ⇒ Object
30 31 32 |
# File 'lib/gosquared.rb', line 30 def now @now ||= Gosquared::Now.new(@api_key, @site_id) end |
#people ⇒ Object
26 27 28 |
# File 'lib/gosquared.rb', line 26 def people @people ||= Gosquared::People.new(@api_key, @site_id) end |