Skip to main content

Platform Extensions

Geo location

The Quickplay Platform determines your geo-location based on incoming client IP. To access the platform-determined geo location info, use the following extension API:

PlatformCoreExtensions.getGeoLocation(
endPoint: "https://<host>",
queryParameters: nil,
platformAuthorizer: authorizer) { (result: Result<GeoLocation, Error>) in
...
}

Adobe Primetime - FLAT Token

To generate a Quickplay Access Token (FLAT) for TVE flows via Adobe Primetime, use the following extension API by passing the information listed in the table below:

NameTypeRequiredDescription
deviceIdStringRequiredUnique device identifier. Refer to Secure Playback for generating a unique device ID
deviceInfoStringRequiredBase64 encoded Device Info. Refer to Adobe Primetime docs for the device info spec
userIdStringRequiredAdobe user identifier
profileIdStringOptionalUnique identifier of the user profile. This is applicable only for multi-profile user accounts
PlatformCoreExtensions.getAdobePrimeTimeToken(
endPoint: "https://<host>",
deviceId: deviceId,
deviceInfo: deviceInfo,
userId: userId,
profileId: profileId,
platformAuthorizer: authorizer) { (result: Result<PrimetimeToken, Error>) in
...
}

Generic Platform API

All Quickplay Platform APIs are zero-trust protected and require OAuth token. The Platform Core client library manages the OAuth token and abstracts the ability to securely communicate with the Quickplay Platform. While many of the Platform APIs are exposed as direct APIs, some tenant-specific APIs might not be available as direct API on the client library. In such cases, your application can use the authorizeRequest API to communicate with the specific Platform API.

Create HTTP Client

Create an HTTPClient from the FLFoundation library.


let http = FLFoundationFactory.httpClient()

Initiate request

Initiate an authorized request using the authorizeRequest APIs on the HTTPClient instance. This API lets you initiate all standard HTTP requests and automatically injects the required Authentication headers to securely communicate with the Quickplay Platform.


struct APIResponse: Codable {
public let data: APIData?
}

struct APIData: Codable {
}

http.authorizeRequest("https://<host>/path", with: authorizer).responseDecodable { (response: Response<APIResponse>) in
switch response.result {
case let .success(response):
if let data = response.data {
print("data: \(data)")
}
default:
break
}
}
note

Refer the Secure Playback section for creating platform authorizer instance.