nylas-0.1.1: Client for the Nylas API

Safe HaskellNone
LanguageHaskell2010

Network.Nylas.Client

Contents

Synopsis

Streaming Delta Consumption

consumeDeltas :: Manager -> AccessToken -> Maybe Cursor -> Consumer Delta IO (Either StreamingError ()) -> IO (Either StreamingError ()) Source

Consume Deltas for the inbox associated with the provided AccessToken since the optional Cursor from Nylas' transactional Streaming Delta Updates endpoint.

Clients should keep track of the Cursor from the latest Delta consumed to resume consumption in the future.

Any errors encountered during consumption (e.g. while writing to a database) should be surfaced using the ConsumerError value constructor of StreamingError.

Requesting Individual Objects

getMessage :: Manager -> AccessToken -> NylasId -> IO Message Source

Fetch the Message identified by NylasId from the account associated with AccessToken.

getThread :: Manager -> AccessToken -> NylasId -> IO Thread Source

Fetch the Thread identified by NylasId from the account associated with AccessToken.