class AthenaHealth::Client

Constants

API_VERSION
PREVIEW_BASE_URL
PRODUCTION_BASE_URL

Public Class Methods

base_url(production:) click to toggle source
# File lib/athena_health/client.rb, line 37
def self.base_url(production:)
  production ? PRODUCTION_BASE_URL : PREVIEW_BASE_URL
end
new(client_id:, secret:, production: false, auth_token_hash: nil) click to toggle source
# File lib/athena_health/client.rb, line 7
def initialize(client_id:, secret:, production: false, auth_token_hash: nil)
  base_url = Client.base_url(production: production)
  @token = AthenaHealth::AuthToken.new(
    client_id: client_id,
    secret: secret,
    auth_token_hash: auth_token_hash,
    base_url: base_url,
    api_version: API_VERSION
  )
  @api = AthenaHealth::Connection.new(
    base_url: base_url, api_version: API_VERSION, token: @token
  )
end

Public Instance Methods

serialized_token() click to toggle source
# File lib/athena_health/client.rb, line 21
def serialized_token
  @token.serialized_token
end