WatchEvents
Returns all events relative to the current identity.
Query Parameters
- watch_index string
A query parameter denoting the requests watch index.
- 200
- 400
- 403
- 404
- 408
- 429
- 500
WatchEvents 200 response
Schema
events object[] required
A list of global events. Ordered old to new.
- ts date-time required
RFC3339 timestamp.
- kind required
Kind of event that occured.
notification object
Notifications represent information that should be presented to the user immediately.
At the moment, only chat message events have associated notifications.
Display
Notifications should be displayed in an unobtrusive manner throughout the entire game. Notifications should disappear after a few seconds if not interacted with.
Interactions
If your platform supports it, notifications should be able to be clicked or tapped in order to open the relevant context for the event.
For a simple implementation of notification interactions, open
urlin a web browser to present the relevant context. For example, a chat message notification will open the thread the chat message was sent in.For advanced implementations that implement a custom chat UI, use
rivet.api.identity.common#GlobalEvent$kindto determine what action to take when the notification is interacted with. For example, if the global event kind isrivet.api.identity.common#GlobalEventChatMessage, then open the chat UI for the given thread.- title string required
- description string required
- thumbnail_url string required
URL to an image thumbnail that should be shown for this notification.
- url string required
Rivet Hub URL that holds the relevant context for this notification.
watch object required
Provided by watchable endpoints used in blocking loops.
- index string required
Index indicating the version of the data responded.
Pas this to
rivet.common#WatchQueryto block and wait for the next response.
BadRequestError 400 response
Schema
- code string required
- message string required
- metadata
Unstructured metadata relating to an error. Must be manually parsed.
ForbiddenError 403 response
Schema
- code string required
- message string required
- metadata
Unstructured metadata relating to an error. Must be manually parsed.
NotFoundError 404 response
Schema
- code string required
- message string required
- metadata
Unstructured metadata relating to an error. Must be manually parsed.
UnauthorizedError 408 response
Schema
- code string required
- message string required
- metadata
Unstructured metadata relating to an error. Must be manually parsed.
RateLimitError 429 response
Schema
- code string required
- message string required
- metadata
Unstructured metadata relating to an error. Must be manually parsed.
InternalError 500 response
Schema
- code string required
- message string required
- metadata
Unstructured metadata relating to an error. Must be manually parsed.