Skip to main content

Class WebApiOptions

Namespace: SuperOffice.WebApi
Assembly: SuperOffice.WebApi.dll
Configure the WebAPI clients with the right URL, language, timeout, and compression flags. The language and timezones can be overridden per request.

Inheritance

objectRequestOptionsWebApiOptions

Inherited Members

RequestOptions.DefaultTimeout, RequestOptions.LanguageCode, RequestOptions.CultureCode, RequestOptions.Timeout, RequestOptions.TimeZone, RequestOptions.TimeZoneIncludeOffset, RequestOptions.CustomHeaders, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Constructors

WebApiOptions()

Constructor

WebApiOptions(string)

Constructor

Parameters

baseUrl string

WebApiOptions(string, IAuthorization)

Constructor

Parameters

baseUrl string authorization IAuthorization

WebApiOptions(string, IAuthorization, ILogger, string, string, bool)

Constructor

Parameters

baseUrl string SuperOffice WebAPI base URL: “https://example.com/Super/api/ authorization IAuthorization Instance used to set Authorization scheme and value. logger ILogger Optional logger languageCode string ISO Language “en”, “sv” timeZone string Timezone code: “utc”, “NO”. verifyUrl bool Determines whether base url is verified - end with /api, “https://example.com/Super/api/”.

Properties

Authorization

Used to set the Authorization header scheme and value. Use , AuthorizationAccessToken, , AuthorizationSystemUserTicket or .

Property Value

IAuthorization

BaseUrl

SuperOffice WebAPI base URL: “https://example.com/Super/api/” Must be set. “/api/” suffix added if not present.

Property Value

string

Compressed

GZip Compress request?

Property Value

bool

Logger

Logger set via constructor.

Property Value

ILogger

ProgressListener

Callback for progress during downloads. Copied to the agent during initialization - can be overridden on each agent using .

Property Value

IProgressListener

UploadProgressListener

Callback for progress during uploads. Copied to the agent during initialization - can be overridden on each agent using .

Property Value

IProgressListener

UserAgent

User Agent string override.

Property Value

string

Methods

Clone()

Creates a shallow copy of the current WebApiOptions.

Returns

WebApiOptions A shallow copy of the current WebApiOptions.