synchronizers
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

TypeScript Client for Synchronizers API

This 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:

List events

This endpoint allows you to retrieve a paginated list of events registered in the application.

Endpoint

GET /api/v1/events

Base variables

Name Type Description
baseUrl string The base URL of the API.

Parameters

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".

Response

The response contains a list of events and related meta-information.

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.

Example usage

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.

Readme

Keywords

none

Package Sidebar

Install

npm i synchronizers

Weekly Downloads

1

Version

3.1.0

License

ISC

Unpacked Size

26 kB

Total Files

34

Last publish

Collaborators

  • darchlabs