2.1.9 • Published 10 months ago

@apio/sdk v2.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@apio/sdk

NodeJS SDK for Apio IoT Platform.

Installation

npm i @apio/sdk

Usage

import Sdk, { Device } from '@apio/sdk'

const sdk = Sdk.create({
  uri: 'platform-uri',
  apiKey: 'your-api-key',
  projectId: 'your-project-id'
})

async function main () {
  try {
    const devices: Device[] = await sdk.device.findAll()
    console.log(devices)
  } catch (e) {
    console.error(e)
  }
}

main()

Cache

Sdk support Cache strategy. For enable it set cache property in configuration:

const sdk = Sdk.create({
  uri: 'platform-uri',
  apiKey: 'your-api-key',
  projectId: 'your-project-id'
  cache: true // For default configuration. Otherwise: { ttl: number }
})
2.1.9

10 months ago

2.1.6

10 months ago

2.1.5

10 months ago

2.1.8

10 months ago

2.1.7

10 months ago

2.1.4

11 months ago

2.1.3

11 months ago

2.1.2

11 months ago

2.1.1

11 months ago

2.1.0

11 months ago

2.0.1

11 months ago