0.0.7 • Published 3 years ago

samsara-js-sdk v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

samsara-js-sdk

Experimental and unofficial auto generated typescript/js sdk for samsara.com api.

Docs

https://sgcpfl.github.io/samsara-js-sdk

Configuration

Generated client is extremely verbose - it is highly recommend to utilize a build tool that supports tree-shaking.

This client depends on a fetch compatabile api, for browser this is built in, for nodejs node-fetch can be used.

  import { Configuration } from 'samsara-js-sdk'
  import fetch from 'node-fetch'

  const config = new Configuration({
    fetchApi: fetch, // Not necessary in browser
    headers: {
      'Authorization': 'Bearer samsara_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
    }
  })

Usage

import { AddressesApi, Configuration } from 'samsara-js-sdk'

const config = new Configuration({
  headers: {
    'Authorization': 'Bearer samsara_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
  }
})

const api = new AddressesApi(config)

api.listAddresses({
  limit: 10
}).then((response) => {
  console.log(`Look addresses!`)
  console.log(response)
})

Version

Generated from https://github.com/samsarahq/api-docs/tree/f42d8b7a2c447c659464c427bb6dd42884fc0f11

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1-beta

3 years ago

0.0.1

3 years ago

1.0.0

3 years ago