Class: Sessions
Overview
Dashboard session endpoints
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
#base_delete, #base_get, #base_post, #base_put, #base_request, #initialize, #merge_options
Constructor Details
This class inherits a constructor from Resource
Instance Method Details
#delete(dashboard_id) ⇒ Object
11 12 13 |
# File 'lib/onvo/sessions.rb', line 11 def delete(dashboard_id) base_delete('/sessions', query: { dashboard: dashboard_id }) end |
#list(dashboard_id) ⇒ Object
7 8 9 |
# File 'lib/onvo/sessions.rb', line 7 def list(dashboard_id) base_get('/sessions', query: { dashboard: dashboard_id }) end |
#upsert(dashboard_id, user_id) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/onvo/sessions.rb', line 15 def upsert(dashboard_id, user_id) session_data = base_post( '/sessions', body: { dashboard: dashboard_id, user: user_id } ) session_data.merge({ 'url': "#{@endpoint}#{session_data['url']}" }) end |