Examples

Note that some event timeline features are in Early Access, specifically the ones related to venue-type determination.

Install the module

Run the following command to install the module (make sure to install the core module beforehand):

npm i @sentiance-react-native/event-timeline

Import the module

import SentianceEventTimeline from "@sentiance-react-native/event-timeline";

Get timeline updates

const after = new Date();

// returns Promise<Event[]>
const events = await SentianceEventTimeline.getTimelineUpdates(after.getTime());

Get timeline events

const from = new Date(0); // 01/01/1970
const to = new Date(2 ** 31 * 1000);

// returns Promise<Event[]>
const events = await SentianceEventTimeline.getTimelineEvents(
    from.getTime(), to.getTime());

Get a single timeline event

Listen to timeline updates

You can find a reference to all the types mentioned on this page here.

Last updated