Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

seamapi

Package Overview
Dependencies
Maintainers
1
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seamapi

Control locks, lights and other internet of things devices with Seam's simple API

  • 1.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by9.79%
Maintainers
1
Weekly downloads
 
Created
Source

Javascript / Typescript Seam API Library

Control locks, lights and other internet of things devices with Seam's simple API. Check out the documentation or some examples.

Usage

// Replace with
// const Seam = require("seamapi")
// if not using ES6 modules and/or TypeScript.
import Seam from "seamapi";

const seam = new Seam();
// Seam will automatically use the SEAM_API_KEY environment variable if you
// don't provide an apiKey to `new Seam()`

(async () => {
  const {
    devices: [someLock],
  } = await seam.locks.list();
  const someLockId = someLock.device_id;

  await seam.locks.lockDoor(someLockId);
  const { device: someLockedLock } = await seam.locks.get(someLockId);
  // someLockedLock.properties.locked === true

  await seam.locks.unlockDoor(someLockId);

  await seam.accessCodes.create({
    name: "Some Access Code",
    code: "1234",
    device_id: someLockId,
  });

  const accessCodeList = await seam.accessCodes.list(someLockId);
  console.log(accessCodeList);
  /*
    {
        access_codes: [
          {
            access_code_id: "some-access-code-1",
            name: "Some Access Code",
            code: "1234",
            type: "ongoing",
            created_at: "2022-02-01T12:57:40.843Z",
          },
        ],
      }
  */
})();

In Progress

This library is in progress!

Keywords

FAQs

Package last updated on 16 Feb 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc