@_dotlas/api

1.0.0 • Public • Published

@_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)
  })

Package Sidebar

Install

npm i @_dotlas/api

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

62.6 kB

Total Files

14

Last publish

Collaborators

  • kelvindecosta