Skip to content

dotlas/api-client-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@_dotlas/api

npm node-current GitHub last commit

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

Releases

No releases published

Packages

No packages published