Class: Onvo

Inherits:
Object
  • Object
show all
Defined in:
lib/onvo.rb

Overview

The Onvo Ruby SDK

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(endpoint = ENV['ONVO_API_ENDPOINT'], api_key = ENV['ONVO_API_KEY']) ⇒ Onvo

Returns a new instance of Onvo.



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/onvo.rb', line 17

def initialize(endpoint = ENV['ONVO_API_ENDPOINT'], api_key = ENV['ONVO_API_KEY'])
  @endpoint = endpoint
  @api_key = api_key
  params = [@endpoint, @api_key]

  @accounts = Accounts.new(*params)
  @teams = Teams.new(*params)
  @embed_users = EmbedUsers.new(*params)
  @datasources = Datasources.new(*params)
  @automations = Automations.new(*params)
  @dashboards = Dashboards.new(*params)
end

Instance Attribute Details

#accountsObject (readonly)

Returns the value of attribute accounts.



14
15
16
# File 'lib/onvo.rb', line 14

def accounts
  @accounts
end

#api_keyObject

Returns the value of attribute api_key.



15
16
17
# File 'lib/onvo.rb', line 15

def api_key
  @api_key
end

#automationsObject (readonly)

Returns the value of attribute automations.



14
15
16
# File 'lib/onvo.rb', line 14

def automations
  @automations
end

#dashboardsObject (readonly)

Returns the value of attribute dashboards.



14
15
16
# File 'lib/onvo.rb', line 14

def dashboards
  @dashboards
end

#datasourcesObject (readonly)

Returns the value of attribute datasources.



14
15
16
# File 'lib/onvo.rb', line 14

def datasources
  @datasources
end

#embed_usersObject (readonly)

Returns the value of attribute embed_users.



14
15
16
# File 'lib/onvo.rb', line 14

def embed_users
  @embed_users
end

#endpointObject

Returns the value of attribute endpoint.



15
16
17
# File 'lib/onvo.rb', line 15

def endpoint
  @endpoint
end

#teamsObject (readonly)

Returns the value of attribute teams.



14
15
16
# File 'lib/onvo.rb', line 14

def teams
  @teams
end

Instance Method Details

#dashboard(dashboard_id) ⇒ Object



30
31
32
# File 'lib/onvo.rb', line 30

def dashboard(dashboard_id)
  Dashboard.new(dashboard_id, @endpoint, @api_key)
end