2.1.0 • Published 1 year ago

@smartlook/rest-api-client v2.1.0

Weekly downloads
7
License
MIT
Repository
-
Last release
1 year ago

Smartlook REST API Client

npm badge types badge

Smartlook REST API Client is a Typescript library for retrieving data from the Smartlook.

Installation

Use the package manager npm to install the library.

npm install @smartlook/rest-api-client

Usage

At first you need to get an API token for your project. You can do so in settings of your project (managing your project tokens is described in the docs).

import * as SmartlookAPI from '@smartlook/rest-api-client'

const client = SmartlookAPI.createSmartlookClient(<YOUR_API_TOKEN>)

const response = await client.events.getEventDetail100({
    dateFrom: '2020-01-01',
    dateTo: '2020-01-10',
    eventId: 'foobar',
    occurrenceHistogramInterval: 'day',
})

The client is using node-fetch on the background. If you want to handle the requests to the Smartlook REST API by yourself, you can pass makeRequest: MakeRequest function to the client factory instead of the API token.

License

MIT

2.1.0

1 year ago

2.0.0

1 year ago

1.4.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago