Class: OSTSdk::Saas::Sessions
- Defined in:
- lib/ost-sdk-ruby/saas/sessions.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#get(params = {}) ⇒ Object
Get session of a user.
-
#get_list(params = {}) ⇒ Object
List sessions of a user.
-
#initialize(params) ⇒ Sessions
constructor
Initialize.
Methods included from Util::ServicesHelper
#current_time, #current_timestamp, #perform_and_handle_exceptions
Constructor Details
#initialize(params) ⇒ Sessions
Initialize
Arguments:
api_base_url: (String)
api_key: (String)
api_secret: (String)
api_spec: (Boolean)
config: (Hash)
16 17 18 19 20 |
# File 'lib/ost-sdk-ruby/saas/sessions.rb', line 16 def initialize(params) super @url_prefix = '/users' @url_suffix = '/sessions' end |
Instance Method Details
#get(params = {}) ⇒ Object
Get session of a user
Returns:
response: (Hash)
27 28 29 |
# File 'lib/ost-sdk-ruby/saas/sessions.rb', line 27 def get(params = {}) http_helper.send_get_request("#{@url_prefix}/#{get_user_id!(params)}#{@url_suffix}/#{get_session_address!(params)}", params) end |
#get_list(params = {}) ⇒ Object
List sessions of a user
Returns:
response: (Hash)
36 37 38 |
# File 'lib/ost-sdk-ruby/saas/sessions.rb', line 36 def get_list(params = {}) http_helper.send_get_request("#{@url_prefix}/#{get_user_id!(params)}#{@url_suffix}", params) end |