Class: BetfairApiNgRails::Api::SessionManager

Inherits:
Struct
  • Object
show all
Includes:
Concerns::Errorable, Constants
Defined in:
lib/betfair_api_ng_rails/api/session_manager.rb

Defined Under Namespace

Classes: SsoidRequester

Constant Summary

Constants included from Constants

Constants::ALLOWED_FORMATTING, Constants::ALLOWED_RESOURCES, Constants::API_REQUEST_HEADERS, Constants::JSON_METHOD, Constants::KEEP_ALIVE_URL, Constants::LOADABLE_CONFIG_OPTIONS, Constants::SESSION_REQUEST_HEADERS, Constants::SIMPLE_LISTING_FILTERED, Constants::SUCCESS_LOGIN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Errorable

#error_info, #has_errors?

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint

Returns:

  • (Object)

    the current value of endpoint



6
7
8
# File 'lib/betfair_api_ng_rails/api/session_manager.rb', line 6

def endpoint
  @endpoint
end

Instance Method Details

#expire_ssoid(account) ⇒ Object



16
17
18
19
# File 'lib/betfair_api_ng_rails/api/session_manager.rb', line 16

def expire_ssoid()
  username = .username
  BetfairApiNgRails..expire username
end

#get_ssoid(account) ⇒ Object



10
11
12
13
14
# File 'lib/betfair_api_ng_rails/api/session_manager.rb', line 10

def get_ssoid()
  username = .username
  ssoid = BetfairApiNgRails..get username
  ssoid || SsoidRequester.new(, endpoint).get
end