Event Management
Overview
The SDK supports two primary event types:
Normal Events: Standard quest-based events focusing on task completion
Score-Based Events: Competitive events with point-based leaderboards
Normal Events
Normal Events are standard events where users can complete one or more quests to earn rewards. These events do not track a cumulative score for participants but focus on task completion.
Type Definition
Score-Based Events
Score-Based Events involve quests where participants earn points to compete on a leaderboard. These events are commonly used for competitive scenarios where scoring determines ranking or rewards.
Type Definition
The type
field identifies the event as a SCORE quest event, while the quests
array contains ScoreQuest
objects that define tasks contributing to the participant's total score.
Event Data Structure
All event types inherit from the BasicEventType
, which provides the foundation for handling event data in the UI. This includes essential information like dates, participation status, requirements, and rewards.
Type Definition
Key Fields Explained
General Information
containerId
: Identifies the hosting community or grouptitle
: The name of the eventdescription
: Detailed information about the event, either as plain text or parsed content
Timelines
startDate
andendDate
: Define the active period of the eventregistrationStartDate
andregistrationEndDate
: Define when users can register for the event
Participants and Capacity
maxParticipants
: Maximum number of users allowed to jointotalParticipants
: Current number of registered users
Rewards
rewards
: Defines the rewards available for participating or completing quests in the event
Participation Details
participation
: Includes fields to track whether the current user is participating, their status, and the synchronization status with the backend
Requirements
requirements
: Specifies any conditions that users must meet to join the event (e.g., completed quests or prior achievements)
Visuals
images
: Contains optional media assets such as a cover image for the event
Metadata
createdAt
,createdBy
,updatedAt
,updatedBy
: Provide audit information about the event's creation and last modification
Deep Dive: BasicEventType Options
Status
The status
field of BasicEventType
reflects the current state of the event. Common statuses include:
DRAFT
: The event has been created but isn't published yet (not visible in community UI)PUBLISHED
: The event has been created and is visible in the UIRESOLVING
: The event is currently activeCOMPLETED
: The event has concludedCANCELLED
: The event has been canceled
Rewards
The rewards
field is an optional array of rewards associated with the event:
Participation
The participation
object tracks the user's involvement in the event. Example usage:
Requirements
The requirements
field defines prerequisites for event participation. Example:
Last updated