🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@apio/sdk

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apio/sdk

NodeJS SDK for Apio IoT Platform

Source
npmnpm
Version
2.1.11
Version published
Weekly downloads
47
235.71%
Maintainers
3
Weekly downloads
 
Created
Source

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

Keywords

apio

FAQs

Package last updated on 21 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts