Asset
final class Asset
Class providing Asset related actions.
-
Gets details about given asset id
Declaration
Swift
public static func getAsset(id: Int, success: @escaping (InPlayerItem) -> Void, failure: @escaping (InPlayerError) -> Void)
Parameters
id
Asset ID
success
A closure to be executed once the request has finished successfully.
asset
Contains item info.
failure
A closure to be executed once the request has finished with error.
error
Containing information about the error that occurred.
-
Returns a collection of fees for a specific asset
Declaration
Swift
public static func getAssetAccessFees(id: Int, voucherId: Int? = nil, success: @escaping ([InPlayerAccessFee]) -> Void, failure: @escaping (InPlayerError) -> Void)
Parameters
id
Asset ID.
voucherId
Voucher ID
success
A closure to be executed once the request has finished successfully.
accessFees
Collection of access fees for specific asset.
failure
A closure to be executed once the request has finished with error.
error
Containing information about the error that occurred.
-
This method checks and retrieves a customer’s entitlement to an asset
Declaration
Swift
public static func checkAccessForAsset(id: Int, entryId: String?, success: @escaping (InPlayerItemAccess) -> Void, failure: @escaping (InPlayerError) -> Void)
Parameters
id
Asset ID
entryId
Optional string specifying external video id
success
A closure to be executed once the request has finished successfully.
itemAccess
Object containing info about the item plus additional info.
failure
A closure to be executed once the request has finished with error.
error
Containing information about the error that occurred.
-
Get an external assets info
Declaration
Swift
public static func getExternalAsset(type: String, externalID: String, merchantUUID: String?, success: @escaping (InPlayerItem) -> Void, failure: @escaping (InPlayerError) -> Void)
Parameters
type
The type ID of the asset
externalID
The ID of the external asset
merchantUUID
The merchant uuid
success
A closure to be executed once the request has finished successfully.
asset
Contains item info.
failure
A closure to be executed once the request has finished with error.
error
Containing information about the error that occurred.