0.6.0 • Published 6 years ago

nexkey v0.6.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

nexkey

Build Status

Javascript SDK for Nexkey's awesome lock product

commonjs (node) usage

const nexkey = require('nexkey')

const client = nexkey({
  // api credentials from nexkey beta
  NEXKEY_API_SECRET: process.env.NEXKEY_API_KEY,
  NEXKEY_API_KEY: process.env.NEXKEY_API_KEY
})


// phone and email are optional but you must send at least one
const phone = '5551236789'
const email = 'john.doe@test.com'
const result = await client.sendKey({ phone, email })

es module usage

import nexkey from 'nexkey'

const client = nexkey({
  // api credentials from nexkey beta
  NEXKEY_API_SECRET: process.env.NEXKEY_API_KEY,
  NEXKEY_API_KEY: process.env.NEXKEY_API_KEY
})


// phone and email are optional but you must send at least one
const phone = '5551236789'
const email = 'john.doe@test.com'
const result = await client.sendKey({ phone, email })

staging

to access nexkey's staging API, pass an ENVIRONMENT property, like this:

const client = nexkey({

  ENVIRONMENT: 'STAGING',

  // api credentials from nexkey beta
  NEXKEY_API_SECRET: process.env.NEXKEY_API_KEY,
  NEXKEY_API_KEY: process.env.NEXKEY_API_KEY
})

// use client normally here...

see https://api.nexkey.com/documentation for full details on the endpoints available.

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago