Class: EnterpriseEventStream

EnterpriseEventStream(client, optionsopt)

Stream of Box enterprise events. By default, the stream starts from the current time. Pass 'startDate' to start from a specific time. Pass 'streamPosition' to start from a previous stream position, or '0' for all available past events (~1 year). Once the stream catches up to the current time, it will begin polling every 'pollingInterval' seconds. If 'pollingInterval' = 0, then the stream will end when it catches up to the current time (no polling).

Constructor

new EnterpriseEventStream(client, optionsopt)

Parameters:
Name Type Attributes Description
client BoxClient The client to use to get events
options Object <optional>
Options
Properties
Name Type Attributes Default Description
streamPosition string <optional>
The stream position to start from (pass '0' for all past events)
startDate string <optional>
The date to start from
endDate string <optional>
The date to end at
eventTypeFilter Array.<EventType> <optional>
Array of event types to return
pollingInterval int <optional>
60 Polling interval (in seconds). Pass 0 for no polling.
chunkSize int <optional>
500 Number of events to fetch per call (max = 500)
Source:

Extends

  • Readable

Methods

getStreamPosition() → (nullable) {number}

Source:
Returns:
- Returns null if no events have been fetched from Box yet.
Type
number

getStreamPosition() → (nullable) {number}

Source:
Returns:
- Returns null if no events have been fetched from Box yet.
Type
number

getStreamState() → {Object}

Get the stream state.
Source:
Returns:
- The stream state
Type
Object

getStreamState() → {Object}

Get the stream state.
Source:
Returns:
- The stream state
Type
Object

setStreamState(state) → {void}

Set the stream state.
Parameters:
Name Type Description
state Object The stream state
Source:
Returns:
Type
void

setStreamState(state) → {void}

Set the stream state.
Parameters:
Name Type Description
state Object The stream state
Source:
Returns:
Type
void