API reference
API reference
Select your platform
No SDKs available
No versions available

Challenges Class

The Challenges API enhances social interactions in your app, which use com.meta.horizon.platform.ovr.requests.GroupPresence#setDestination(String apiName) to create shareable links for score-based competition. Players can repeatedly challenge others, get to know them, and compete asynchronously. Challenges can be ranked by highest/lowest scores within a time period. Leaderboard-integrated apps get Challenges for free, accessible through the Scoreboards UI. Players can create and invite others to Challenges via the Challenges app.

Static Member Functions

Parameters
leaderboardName
- A string represents the name of the leaderboard.
challengeOptions
- This indicates the options of the challenge and it can be retrieved by com.meta.horizon.platform.ovr.options.ChallengeOptions#ChallengeOptions().
Deprecated
Use server-to-server API call instead.
If the current user has the necessary permissions, they can decline a challenge by providing the challenge ID, which can be obtained using com.meta.horizon.platform.ovr.models.Challenge#getID().
Parameters
challengeID
- The ID of challenge that the user is going to decline. It can be retrieved by com.meta.horizon.platform.ovr.models.Challenge#getID().
Parameters
challengeID
- The uuid of the challenge.
Deprecated
Use server-to-server API call instead.
Gets detailed information for a single challenge by providing the challenge ID, which can be retrieved by calling com.meta.horizon.platform.ovr.models.Challenge#getID().
Parameters
challengeID
- The id of the challenge whose entries to return, which can be retrieved by calling com.meta.horizon.platform.ovr.models.Challenge#getID().
Retrieves a list of entries for a specific challenge, with options to filter and limit the results. By providing the challengeID, you can specify which challenge's entries you want to retrieve. The limit parameter allows you to control the number of entries returned. The filter parameter enables you to refine the results to only include entries from users who are bidirectional followers. The startAt parameter allows you to define whether to center the query on the user or start at the top of the challenge.
Parameters
challengeID
- The id of the challenge whose entries to return, which can be retrieved by calling com.meta.horizon.platform.ovr.models.Challenge#getID().
limit
- Sets a limit on the maximum number of challenges to be fetched, which can be useful for pagination or performance reasons.
filter
- By using the LeaderboardFilterType, you can refine the results to only include entries from users who are bidirectional followers.
startAt
- Defines whether to center the query on the user or start at the top of the challenge. If this is com.meta.horizon.platform.ovr.enums.LeaderboardStartAt#CenteredOnViewer or com.meta.horizon.platform.ovr.enums.LeaderboardStartAt#CenteredOnViewerOrTop, then the current user's ID will be automatically added to the query.
Returns a list of entries for a specific challenge, starting from a specified rank. By providing the challengeID and rank, you can specify which challenge's entries you want to retrieve and where to start the query. The limit parameter allows you to control the number of entries returned.
Parameters
challengeID
- The id of the challenge whose entries to return, which can be retrieved by calling com.meta.horizon.platform.ovr.models.Challenge#getID().
limit
- Sets a limit on the maximum number of challenges to be fetched, which can be useful for pagination or performance reasons.
afterRank
- The position after which to start. For example, 10 returns challenge results starting with the 11th user.
Retrieves a list of challenge entries for a specific set of user IDs, with options to filter and limit the results. This method is useful for retrieving a list of challenge entries for a specific set of users, allowing you to display their progress and rankings within the challenge.
Parameters
challengeID
- The id of the challenge whose entries to return, which can be retrieved by calling com.meta.horizon.platform.ovr.models.Challenge#getID().
limit
- Sets a limit on the maximum number of challenges to be fetched, which can be useful for pagination or performance reasons.
startAt
- Defines whether to center the query on the user or start at the top of the challenge. If this is com.meta.horizon.platform.ovr.enums.LeaderboardStartAt#CenteredOnViewer or com.meta.horizon.platform.ovr.enums.LeaderboardStartAt#CenteredOnViewerOrTop, then the current user's ID will be automatically added to the query.
userIDs
- Defines a list of user ids to get entries for.
Returns a list of challenges that match the specified options. The com.meta.horizon.platform.ovr.options.ChallengeOptions#ChallengeOptions() parameter allows you to specify the criteria for the challenges you want to retrieve. The limit parameter allows you to control the number of challenges returned.
Parameters
challengeOptions
- This indicates the options of the challenge and it can be retrieved by com.meta.horizon.platform.ovr.options.ChallengeOptions#ChallengeOptions().
limit
- Sets a limit on the maximum number of challenges to be fetched, which can be useful for pagination or performance reasons.
If the current user has the necessary permissions to join, participate in a challenge by providing the challenge ID, which can be retrieved using com.meta.horizon.platform.ovr.models.Challenge#getID().
Parameters
challengeID
- The ID of challenge that the user is going to join. It can be retrieved by com.meta.horizon.platform.ovr.models.Challenge#getID().
If the current user has the necessary permissions, they can leave a challenge by providing the challenge ID, which can be obtained using com.meta.horizon.platform.ovr.models.Challenge#getID().
Parameters
challengeID
- The ID of challenge that the user is going to leave. It can be retrieved by com.meta.horizon.platform.ovr.models.Challenge#getID().
Parameters
challengeID
- The uuid of the challenge.
challengeOptions
- This indicates the options of the challenge and it can be retrieved by com.meta.horizon.platform.ovr.options.ChallengeOptions#ChallengeOptions().
Deprecated
Use server-to-server API call instead.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon