1.0.0 • Published 2 years ago
@_dotlas/api v1.0.0
@_dotlas/api
A simple client for the Dotlas REST API.
Installation
npm
npm i @_dotlas/api
yarn
yarn add @_dotlas/api
Usage
import { Client } from "@_dotlas/api"
// Create a client with your API key
const client = Client("<your-api-key>")
// Create a fetcher for the specific endpoint
const fetcher = client
.path("/socio-demographics/stats/{city}")
.method("get")
.create()
// Call the fetcher
fetcher({ city: "New York" })
.then(res => res.json())
.then(res => {
console.log(res.data)
})
1.0.0
2 years ago