Platform Extensions
Geo Location
The Quickplay Platform determines user's 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 below extension API by passing the following info:
Name | Type | Required | Description |
---|---|---|---|
deviceId | String | Required | Unique device identifier. Refer to Secure Playback for generating a unique device id. |
deviceInfo | String | Required | Base64 encoded Device Info. Refer Adobe Primetime docs for the device info spec. |
userId | String | Required | Adobe user identifier. |
profileId | String | Optional | Unique 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 tenent specific APIs might not be available as direct API on the client library. In such cases, application could use the authorizeRequest
API to communicate with the specific Platform API.
Create HTTP Client
Create an HTTPClient
from FLFoundation
library.
let http = FLFoundationFactory.httpClient()
Initiate Request
Initiate an authorized request using the authorizeRequest
APIs on the HTTPClient
instance. This API allows initiating 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
}
}
Refer the Secure Playback section for creating platform authorizer instance.