OtvSdkConfig

data class OtvSdkConfig(val tenantId: String, val host: String = "opentv.com", val port: Int = 443, val prefix: String = "api", val useTls: Boolean = true, val iasTenantId: String = DEFAULT_IAS_TENANT_ID)

Configuration for the OpenTV SDK. This class is used to configure the SDK with the necessary parameters for connecting to the OpenTV services. Through these parameters, APIs of the OpenTV service can be derived, in this style http(s)://{prefix}.{tenantId}.{host}:{port}/..., e.g. https://api.sales.opentv.com/...

Parameters

tenantId

The tenant ID for the OpenTV service. Required

host

The host for the OpenTV service. Default is "opentv.com".

port

The port for the OpenTV service. Default is 443.

prefix

The prefix for the OpenTV service. Default is "api".

useTls

Whether to use TLS for the connection. Default is true.

iasTenantId

The ID of the tenant to which the request is being targeted and sent in IAS tenant headers. Default is "nagra".

Constructors

Link copied to clipboard
constructor(tenantId: String, host: String, port: Int, prefix: String, useTls: Boolean)

Java-compatible constructor using the default IAS tenant ID.

constructor(baseUrl: URI)

Creates a configuration from a URI base URL in the style https://api.sales.opentv.com.

constructor(baseUrl: URL)

Creates a configuration from a URL base URL in the style https://api.sales.opentv.com.

constructor(tenantId: String, host: String = "opentv.com", port: Int = 443, prefix: String = "api", useTls: Boolean = true, iasTenantId: String = DEFAULT_IAS_TENANT_ID)

Creates a configuration from individual OpenTV service parameters in the style http(s)://{prefix}.{tenantId}.{host}:{port}.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val port: Int = 443
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val useTls: Boolean = true

Functions

Link copied to clipboard

Builds the base URL for the OpenTV service from this configuration's fields.

Link copied to clipboard

Builds IAS request headers for legacy v2 endpoints.

Link copied to clipboard

Builds IAS request headers for v3 endpoints.

Link copied to clipboard

Sets the v2 authorizer key. Defaults to "nagra".

Link copied to clipboard

Sets IAS headers appended to both v2 and v3 IAS requests. Headers from this map override default SDK headers on key collisions.

Link copied to clipboard

Sets the optional v2 country-code header, or null to omit it.

Link copied to clipboard

Sets the optional v3 MAC address header, or null to omit it.

Link copied to clipboard

Sets the optional v2 type header, or null to omit it.

Link copied to clipboard

Sets IAS headers appended only to v2 IAS requests. Headers from this map override both default and common IAS headers on key collisions.

Link copied to clipboard

Sets IAS headers appended only to v3 IAS requests. Headers from this map override both default and common IAS headers on key collisions.