The Synchronizers client is a Node.js library for interacting with the Synchronizers API. It provides an easy-to-use interface for fetching data and subscribing to events. The library includes functions for listing events, subscribing to events, and manag
npm install synchronizersThis client allows you to make requests to various endpoints of the API using TypeScript. It uses types defined in the types.ts file to ensure that data is correct.
Below is a list of available endpoints and their documentation:
This endpoint allows you to retrieve a paginated list of events registered in the application.
GET /api/v1/events
| Name | Type | Description |
| --------- | -------- | ------------------------ |
| baseUrl | string | The base URL of the API. |
| Name | Type | Description | Optional |
| ------- | -------- | --------------------------------------------------------------------------------------------------------------- | -------- |
| limit | number | The maximum number of items to return on a page. | Yes |
| page | number | The page number to return. The first page is 1. | Yes |
| sort | Sort | The order in which to return the items. It can be "asc" for ascending order or "desc" for descending order. | Yes |
> Sort is a type defined as "asc" | "desc".
The response contains a list of events and related meta-information.
``typescript`
export type ListEventsResponse = {
data: Event[];
meta: {
cronjob: Cronjob;
pagination: Pagination;
};
Where Event, Cronjob, and Pagination are types defined in types.ts. Please refer to the type documentation for more information.
GET https://example.com/api/v1/events?limit=10&page=2&sort=desc`
Returns a response that contains a paginated list of events, where 10 items have been returned from page 2, ordered in descending order.