GamificationRemoteRepository

The GamificationRemoteRepository class invokes and manages gamification-related REST API requests. Use this class to interact with the Salesforce gamification APIs and retrieve member games, and play a game.

The Gamification Mobile Android SDK requires a valid access token to interact with the Salesforce gamification APIs. To provide a valid access token, implement the GameAuthenticator interface in your GamificationRemoteRepository class at the time of initialization. This class manages authentication using the provided instance of GameAuthenticator.

Use this constructor to initialize the GamificationRemoteRepository class.

ParameterTypeDescriptionRequired or Optional
authGameAuthenticatorAn instance of the GameAuthenticator interface.Required
instanceUrlStringThe URL of your Salesforce org.Required
gameClientNetworkClientAn instance of the GameAPIClient class.Required

Retrieve games for the specified participant ID.

ParameterTypeDescriptionRequired or Optional
participantIdStringThe ID of a loyalty program member, an account, or a contact whose eligible games are to be retrieved.Required
gameParticipantRewardIdStringThe ID of the participant’s game reward associated with the game whose details are to be fetched.Optional
mockResponseBooleanIndicates whether to include a sample response (true) or not (false).Optional

Retrieve the details of the reward that’s provided to a participant after the game play.

ParameterTypeDescriptionRequired or Optional
gameParticipantRewardIdStringThe ID of the participant’s game reward won by the participant whose details are to be fetched.Required
mockResponseBooleanIndicates whether to include a sample response (true) or not (false).Optional