new OtvAnalyticsAgent()
This class is the main entry point for the OpenTv Analytics Agent.
Note: There is no need for the integrator to call
newon this class as it handled internally to the SDK.
Methods
-
appStart(metadata)
-
Submit the
appStartActivity. Must be the first activity submitted (must be called before any other calls tosubmitActivity). Should not be called again without first submitting anappStopactivity.Name Type Description metadataObject Containing key-value pairs of metadata for the
appStartactivityReturns:
error object -
close()
-
Close the analytics session. After calling this method, do not call any other unless initialise is called again.
Returns:
error object -
initialise(configuration)
-
Initialise the OpenTv Analytics Agent. Call this method once, before calling any other. Do not call again unless
closeis called first.Name Type Description configurationObject Returns:
error object -
submitActivity(activity, metadata)
-
Submit an activity.
appStartactivity should not be submitted using this methodName Type Description activityOtvActivity The activity being submitted
metadataObect Containing key-value pairs of metadata for the submitted activity
Returns:
error object -
updateConfig(configuration)
-
Provide an updated configuration. The configuration object should only contain the updated attributes. Not all attributes may be updated.
Name Type Description configurationobject Returns:
error object