Get Discovery Results for iOS Native

The getResults method allows you to get Discovery results for a specific asset.

Table 1. getResults
Parameter Description
options Input parameter of type OODiscoveryOptions. An instance of OODiscoveryOptions encapsulates an OODiscoveryType, a limit of how many Discovery results are desired, and a timeout time interval for http connections. The OODiscoveryType is an enum that can be set to either OODiscoveryTypeSimilarAssets, OODiscoveryTypePopular, or OODiscoveryTypeMomentum. By default, OODiscoveryOptions are instantiated with similar assets.
embedCode Input parameter of type NSString. The embed code for the Discovery type similar assets. Ignored for other Discovery types.
pcode Input parameter of type NSString. The pcode.
parameters Input parameter of type NSDictionary. The parameters as key-value pairs. For a detailed list and examples of parameters, please refer to the Summary of Ooyala Discovery REST API Requests.
callback Input parameter of block type (analogous to a function pointer). It takes output parameters results (an NSArray pointer) and error (an OOOyalaError pointer). It returns void. This callback function handles Discovery results. The callback might not be called on the main thread.

This method is static.

The error parameter taken by callback might be populated with one among various enums associated with Discovery. For a list of discovery-related enums, see Dealing with iOS Mobile Errors. They are prefixed with OOOoyalaErrorCodeDiscovery.