Javascript / Typescript Seam API Library & CLI
Control locks, lights and other internet of things devices with Seam's simple
API. Check out the documentation or some examples.
Usage
This package contains both a library and a CLI tool.
CLI Usage
Install with yarn global add seamapi
or npm install -g seamapi
.
Then:
export SEAM_API_KEY=<your api key>
seam workspaces list
Library Usage
Install with yarn add seamapi
or npm install seamapi -s
.
Then:
import Seam from "seamapi";
const seam = new Seam();
const myLock = await seam.locks.get({ name: "My Lock" });
const myLockId = myLock.device_id
await seam.locks.lockDoor(myLockId);
console.log(await seam.locks.list())
await seam.accessCodes.create({
name: "Some Access Code",
code: "1234",
device_id: someLockId,
});
console.log(await seam.accessCodes.list({ device_id: myLockId }))