C# Class Box.V2.Managers.BoxEventsManager

The manager that represents the events endpoint
Inheritance: BoxResourceManager
Show file Open project: box/box-windows-sdk-v2

Public Properties

Property Type Description
USER_EVENTS_DEDUPE_CACHE bool>.LRUCache

Public Methods

Method Description
BoxEventsManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
EnterpriseEventsAsync ( int limit = 500, string streamPosition = null, List eventTypes = null, System.DateTime createdAfter = null, System.DateTime createdBefore = null ) : Task>

Retrieve a chunk of Enterprise Events. You must be using a token that is scoped to admin level in order to use this endpoint.

LongPollUserEvents ( string streamPosition, Action newEventsCallback, CancellationToken cancellationToken, UserEventsStreamType streamType = UserEventsStreamType.all, bool dedupeEvents = true, int retryTimeoutOverride = null ) : Task

Used to get real-time notification of activity in a Box account.

UserEventsAsync ( int limit = 500, UserEventsStreamType streamType = UserEventsStreamType.all, string streamPosition = "now", bool dedupeEvents = true ) : Task>

Use this to get events for a given user.

Method Details

BoxEventsManager() public method

public BoxEventsManager ( IBoxConfig config, IBoxService service, IBoxConverter converter, IAuthRepository auth, string asUser = null, bool suppressNotifications = null ) : Box.V2.Auth
config IBoxConfig
service IBoxService
converter IBoxConverter
auth IAuthRepository
asUser string
suppressNotifications bool
return Box.V2.Auth

EnterpriseEventsAsync() public method

Retrieve a chunk of Enterprise Events. You must be using a token that is scoped to admin level in order to use this endpoint.
public EnterpriseEventsAsync ( int limit = 500, string streamPosition = null, List eventTypes = null, System.DateTime createdAfter = null, System.DateTime createdBefore = null ) : Task>
limit int Limits the number of events returned (defaults to 500).
streamPosition string The starting position for fetching the events. This is used in combination with the limit to determine which events to return to the caller. Use the results from the next_stream_position of your last call to get the next set of events.
eventTypes List Events to filter by.
createdAfter System.DateTime A lower bound on the timestamp of the events returned.
createdBefore System.DateTime An upper bound on the timestamp of the events returned.
return Task>

LongPollUserEvents() public method

Used to get real-time notification of activity in a Box account.
public LongPollUserEvents ( string streamPosition, Action newEventsCallback, CancellationToken cancellationToken, UserEventsStreamType streamType = UserEventsStreamType.all, bool dedupeEvents = true, int retryTimeoutOverride = null ) : Task
streamPosition string The location in the event stream from which you want to start receiving events.
newEventsCallback Action Method to invoke when new events are received.
cancellationToken System.Threading.CancellationToken Used to request that the long polling process terminate.
streamType UserEventsStreamType Restricts the types of events returned: all returns all events; changes returns events that may cause file tree changes such as file updates or collaborations; sync returns events that may cause file tree changes only for synced folders.
dedupeEvents bool Whether or not to automatically de-duplicate events as they are received. Defaults to true.
retryTimeoutOverride int Used to override the retry timeout value returned from the long polling OPTIONS request.
return Task

UserEventsAsync() public method

Use this to get events for a given user.
public UserEventsAsync ( int limit = 500, UserEventsStreamType streamType = UserEventsStreamType.all, string streamPosition = "now", bool dedupeEvents = true ) : Task>
limit int Limits the number of events returned (defaults to 500).
streamType UserEventsStreamType Restricts the types of events returned: all returns all events; changes returns events that may cause file tree changes such as file updates or collaborations; sync returns events that may cause file tree changes only for synced folders.
streamPosition string The location in the event stream from which you want to start receiving events. You can specify the special value 'now' to get 0 events and the latest stream_position value. Defaults to 'now'.
dedupeEvents bool Whether or not to automatically de-duplicate events as they are received. Defaults to true.
return Task>

Property Details

USER_EVENTS_DEDUPE_CACHE public property

public LRUCache USER_EVENTS_DEDUPE_CACHE
return bool>.LRUCache