Event Retrieval
Pre-requisite: The user has to be signed in to perform the following operations.
Get Event Tokens
To get the event token, The following method can be used:
spaceId(required): The space id for which the tokens is to be fetched.
InstaVision.eventServices.getEventTokens(
spaceId = spaceId, // The space id for which the tokens is to be fetched
onSuccess = { eventTokens ->
// A list of objects containing the event token for each bucket.
},
onError = { error ->
// The error object contains the error code and message
}
)
Get Events
To get the list of events, The following method can be used:
spaceId(required): The space id for which the events are to be fetched.from(required): The start time from events to be fetched from.to(required): The end time upto which the events have to be fetch.skip(required): The number of events to be skipped in order for pagination.
InstaVision.eventServices.getEvents(
spaceId = spaceId, // The space id for which the events are to be fetched
from = startTime, // The start time of the events
to = endTime, // The end time of the events
skip = 0, // The number of events to skip
onSuccess = { events ->
// The list of events
},
onError = { error ->
// The error object contains the error code and message
}
)
Get Event
To get the event, The following method can be used:
spaceId(required): The space id for which the event belongs to.eventId(required): The event id for which the event is to be fetched.
InstaVision.eventServices.getEvent(
spaceId = spaceId, // The space id for which the event belongs to
eventId = eventId, // The event id for which the event is to be fetched
onSuccess = { event ->
// The event object
},
onError = { error ->
// The error object contains the error code and message
}
)