2020 <a href="https://github.com/croct-tech/exporter-client-node/issues">✨ Request Feature</a>
2121</p >
2222
23-
2423## Introduction
2524
2625The Export API Client for Node allows any application written in server-side JavaScript to export events, sessions,
2726and users with a few lines of code.
2827
29-
3028## Getting Started
3129
3230The following steps will walk you through installing the client and integrating it into your application.
@@ -41,7 +39,6 @@ Run the following command to add the client as a dependency to your project and
4139npm install @croct/export
4240```
4341
44-
4542### Usage
4643
4744Now the library is installed, you need to initialize the client using the API key of the application you want to
@@ -53,7 +50,6 @@ import {Configuration, ExportApi} from '@croct/export';
5350const api = new ExportApi (new Configuration ({apiKey: ' 00000000-0000-0000-0000-000000000000' }));
5451```
5552
56-
5753From this point, you are all set to export data using one of the [ export methods] ( #api-reference ) . However, developers
5854are usually interested in implementing a routine to export data periodically. If that is the case, there are two
5955approaches you can take to fetch data incrementally, as you will find out in the following sections.
@@ -107,7 +103,6 @@ async function saveCursor(cursor: string): Promise<void> {
107103})();
108104```
109105
110-
111106By reusing the previous cursor on subsequent requests, you guarantee that no data is missed between exports. However,
112107it requires some extra work to store the cursor between exports so that the next export can start from where the
113108previous one left off.
@@ -151,7 +146,6 @@ import {Configuration, ExportApi} from '@croct/export';
151146})();
152147```
153148
154-
155149The disadvantage of this approach is that there are no guarantees that the data relative to the specified time window
156150have been processed by the time you make the subsequent request. Such cases can happen when events arrive late,
157151recent data was not processed fast enough, or during maintenance windows.
@@ -186,7 +180,6 @@ import {Configuration, ExportApi} from '@croct/export';
186180})();
187181```
188182
189-
190183#### Exporting Sessions
191184
192185The ` exportSessions ` method exports sessions from the application associated with the API key, optionally filtered by
@@ -217,7 +210,6 @@ import {Configuration, ExportApi} from '@croct/export';
217210})();
218211```
219212
220-
221213#### Exporting Users
222214
223215The ` exportUsers ` method exports users from the workspace associated with the API key, optionally filtered by
@@ -248,7 +240,6 @@ import {Configuration, ExportApi} from '@croct/export';
248240})();
249241```
250242
251-
252243## API Reference
253244
254245This reference documents all the methods available in the Export API.
@@ -265,7 +256,6 @@ The constructor has the following signature:
265256constructor (configuration : Configuration );
266257```
267258
268-
269259#### Code Sample
270260
271261Here's a minimal example showing how initialize the client:
@@ -274,7 +264,6 @@ Here's a minimal example showing how initialize the client:
274264const api = new ExportApi (new Configuration ({apiKey: ' 00000000-0000-0000-0000-000000000000' }));
275265```
276266
277-
278267### exportEvents
279268
280269This method exports events from an application.
@@ -287,7 +276,6 @@ The `exportEvents` method has the following signature:
287276exportEvents (options : EventExportOptions ): Promise < {data : {items : Event [], nextCursor : string }}> ;
288277```
289278
290-
291279These are the currently supported options:
292280
293281| Option | Type | Description
@@ -352,7 +340,6 @@ import {Configuration, ExportApi} from '@croct/export';
352340})();
353341```
354342
355-
356343### exportSessions
357344
358345This method exports sessions from an application.
@@ -365,7 +352,6 @@ The `exportSessions` method has the following signature:
365352exportEvents (options : SessionExportOptions ): Promise < {data : {items : Session [], nextCursor : string }}> ;
366353```
367354
368-
369355These are the currently supported options:
370356
371357| Option | Type | Description
@@ -404,7 +390,6 @@ import {Configuration, ExportApi} from '@croct/export';
404390})();
405391```
406392
407-
408393### exportUsers
409394
410395This method exports users from a workspace.
@@ -417,7 +402,6 @@ The `exportUsers` method has the following signature:
417402exportUsers (options : UserExportOptions ): Promise < {data : {items : User [], nextCursor : string }}> ;
418403```
419404
420-
421405These are the currently supported options:
422406
423407| Option | Type | Description
@@ -456,7 +440,6 @@ import {Configuration, ExportApi} from '@croct/export';
456440})();
457441```
458442
459-
460443## Support
461444
462445If this documentation has not answered all your questions, don't worry.
0 commit comments