class Client::Settings

Class to define the client instance settings.

Attributes

auto_server_ranking[RW]

Auto host ranking. If true then server preference is decided by the API (faster server is preferred) If false then server preference is :servers sort order (top server is preferred)

auto_server_ranking_lifetime[RW]

Server preferred list will be updated when older than this amount of minutes.

auto_server_ranking_max_failures[RW]

When ranking servers, if a server fails more than this number phase it out.

auto_server_ranking_num_requests[RW]

Number of requests to use when testing a server latency.

cache[R]
cloud_service_timeout[RW]

Time (seconds) to wait for each cloud server to give service.

debug_mode[RW]

Mode. If true, raise exceptions with errors. Otherwise, just add the exception message to the error field.

latency_useragent[RW]

User agent for latency checking.

licence_key[RW]

Your licence key.

send_extra_headers[RW]

Send extra headers. If true then extra headers are sent with each request to the service. If false then only select headers essential for detection are sent.

server_phaseout_lifetime[RW]

If auto ranking = false, then if top server fails it will be phased out for this number of minutes.

servers[RW]

List of cloud service provider end points. Server preference is decided from this list.

test_useragent[RW]

Build in test user agent.

use_cache[RW]

If #use_cache = true, device properties will be saved in cache to speed up subsequent requests with the same user-agent.

Public Class Methods

new() click to toggle source

Constructor. It initializes all settings with the default values.