New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json

@@ -10,3 +10,3 @@ {

],
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",

@@ -13,0 +13,0 @@ "main": "./dist/index.js",

@@ -9,34 +9,44 @@ # Javascript / Typescript Seam API Library

```ts
import Seam from seamapi
// Replace with
// const Seam = require("seamapi")
// if not using ES6 modules and/or TypeScript.
import Seam from "seamapi";
const seam = new Seam()
const seam = new Seam();
// Seam will automatically use the SEAM_API_KEY environment variable if you
// don't provide an api_key to `new Seam()`
// don't provide an apiKey to `new Seam()`
const someLock = await seam.locks.list().devices[0]
const someLockId = someLock.device_id
(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.lockDoor(someLockId);
const { device: someLockedLock } = await seam.locks.get(someLockId);
// someLockedLock.properties.locked === true
await seam.locks.unlockDoor(someLockId)
await seam.locks.unlockDoor(someLockId);
await seam.accessCodes.create(someLockId, { name: "Some Access Code", code: "1234" })
await seam.accessCodes.create(someLockId, {
name: "Some Access Code",
code: "1234",
});
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",
},
],
}
*/
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",
},
],
}
*/
})();
```

@@ -43,0 +53,0 @@

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