Skip to main content

keyPlaysData(forEventID:)

Introduction

The keyPlaysData(forEventID:) method enables the SDK to retrieve key plays data from your app. This method requires the unique identifier of the event for which the key plays data is needed and returns a MaestroKeyPlaysResponse object.

Your implementation should retain a copy of the response, ensuring that both the SDK and your app remain in sync regarding the currently-cached key plays data. Note that keyPlaysData(forEventID:) makes use of async/await. See the code example below.

Parameters

ParameterTypeDescriptionExample
eventIDStringThe unique identifier for the event whose key plays data is being requested."event123"

Code Example

// Retrieve key plays data for the specified event.
let keyPlaysResponse = await delegate.keyPlaysData(forEventID: "event123")

// Use keyPlaysResponse as needed to update your app's state or UI.