Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.78 KB

File metadata and controls

42 lines (32 loc) · 1.78 KB

Client Class Documentation

The following parameters are configurable for the API Client:

Parameter Type Description
basic_auth_user_name String The username to use with basic authentication
basic_auth_password String The password to use with basic authentication
port String Default: '80'
suites SuiteCodeEnum Default: SuiteCodeEnum::HEARTS
environment Environment The API environment.
Default: Environment.TESTING
http_client_instance HttpClient The Http Client passed from the sdk user for making requests
timeout Float The value to use for connection timeout.
Default: 60
max_retries Integer The number of times to retry an endpoint call if it fails.
Default: 0
retry_interval Float Pause in seconds between retries.
Default: 1
backoff_factor Float The amount to multiply each successive retry's interval amount by in order to provide backoff.
Default: 2
retry_statuses Array A list of HTTP statuses to retry.
Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]
retry_methods Array A list of HTTP methods to retry.
Default: %i[get put]

The API client can be initialized as follows:

client = BaTester::Client.new(
  basic_auth_user_name: 'BasicAuthUserName',
  basic_auth_password: 'BasicAuthPassword',
  environment: Environment::TESTING,
  port: '80',
  suites: SuiteCodeEnum::HEARTS,
)

BATester Client

The gateway for the SDK. This class acts as a factory for the Controllers and also holds the configuration of the SDK.

Controllers

Name Description
api Gets APIController