Skip to content

Commit

Permalink
Update client
Browse files Browse the repository at this point in the history
  • Loading branch information
croct-bot committed Mar 26, 2021
1 parent b133d61 commit 2444db3
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
<a href="https://github.com/croct-tech/exporter-client-node/issues">✨ Request Feature</a>
</p>


## Introduction

The Export API Client for Node allows any application written in server-side JavaScript to export events, sessions,
and users with a few lines of code.


## Getting Started

The following steps will walk you through installing the client and integrating it into your application.
Expand All @@ -41,7 +39,6 @@ Run the following command to add the client as a dependency to your project and
npm install @croct/export
```


### Usage

Now the library is installed, you need to initialize the client using the API key of the application you want to
Expand All @@ -53,7 +50,6 @@ import {Configuration, ExportApi} from '@croct/export';
const api = new ExportApi(new Configuration({apiKey: '00000000-0000-0000-0000-000000000000'}));
```


From this point, you are all set to export data using one of the [export methods](#api-reference). However, developers
are usually interested in implementing a routine to export data periodically. If that is the case, there are two
approaches you can take to fetch data incrementally, as you will find out in the following sections.
Expand Down Expand Up @@ -107,7 +103,6 @@ async function saveCursor(cursor: string): Promise<void> {
})();
```


By reusing the previous cursor on subsequent requests, you guarantee that no data is missed between exports. However,
it requires some extra work to store the cursor between exports so that the next export can start from where the
previous one left off.
Expand Down Expand Up @@ -151,7 +146,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


The disadvantage of this approach is that there are no guarantees that the data relative to the specified time window
have been processed by the time you make the subsequent request. Such cases can happen when events arrive late,
recent data was not processed fast enough, or during maintenance windows.
Expand Down Expand Up @@ -186,7 +180,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


#### Exporting Sessions

The `exportSessions` method exports sessions from the application associated with the API key, optionally filtered by
Expand Down Expand Up @@ -217,7 +210,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


#### Exporting Users

The `exportUsers` method exports users from the workspace associated with the API key, optionally filtered by
Expand Down Expand Up @@ -248,7 +240,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


## API Reference

This reference documents all the methods available in the Export API.
Expand All @@ -265,7 +256,6 @@ The constructor has the following signature:
constructor(configuration: Configuration);
```


#### Code Sample

Here's a minimal example showing how initialize the client:
Expand All @@ -274,7 +264,6 @@ Here's a minimal example showing how initialize the client:
const api = new ExportApi(new Configuration({apiKey: '00000000-0000-0000-0000-000000000000'}));
```


### exportEvents

This method exports events from an application.
Expand All @@ -287,7 +276,6 @@ The `exportEvents` method has the following signature:
exportEvents(options: EventExportOptions): Promise<{data: {items: Event[], nextCursor: string}}>;
```


These are the currently supported options:

| Option | Type | Description
Expand Down Expand Up @@ -352,7 +340,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


### exportSessions

This method exports sessions from an application.
Expand All @@ -365,7 +352,6 @@ The `exportSessions` method has the following signature:
exportEvents(options: SessionExportOptions): Promise<{data: {items: Session[], nextCursor: string}}>;
```


These are the currently supported options:

| Option | Type | Description
Expand Down Expand Up @@ -404,7 +390,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


### exportUsers

This method exports users from a workspace.
Expand All @@ -417,7 +402,6 @@ The `exportUsers` method has the following signature:
exportUsers(options: UserExportOptions): Promise<{data: {items: User[], nextCursor: string}}>;
```


These are the currently supported options:

| Option | Type | Description
Expand Down Expand Up @@ -456,7 +440,6 @@ import {Configuration, ExportApi} from '@croct/export';
})();
```


## Support

If this documentation has not answered all your questions, don't worry.
Expand Down

0 comments on commit 2444db3

Please sign in to comment.