Socket
Book a DemoInstallSign in
Socket

@smartlook/rest-api-client

Package Overview
Dependencies
Maintainers
10
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@smartlook/rest-api-client

Library for easier integration of the Smartlook REST API

unpublished
latest
npmnpm
Version
2.1.0
Version published
Maintainers
10
Created
Source

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

Keywords

smartlook

FAQs

Package last updated on 31 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts