0.1.2 • Published 8 years ago

concava-adapter-api v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

ConCaVa MySQL adapter

ConCaVa adapter for authorization, metadata and storage through the ConCaVa API.

Requires ConCaVa v0.7+.

Install

npm install concava-adapter-api

Configure

A ConCaVa configuration example:

const adapter = require('concava-adapter-api')

// Connection configuration
var config = {
	host: 'https://api.example.com/v1',
	timeout: 3000, // ms
}

module.exports = {
	debug: true,
	auth: {
		enabled: true, // Required for parsing the auth header
		method: adapter.auth,
		config: config,
		fetchUser: false, // Fetch user entity
	},
	metadata: {
		method: adapter.metadata,
		config: config,
		cacheExpireTime: 15 * 60 * 1000, // ms
	},
	storage: {
		method: adapter.storage,
		config: config,
	},
}

Note: Besides the device labels, the metadata adapter adds an _id to data.getInfo(). This ConCaVa API device ID is required by the storage adapter.

License

This software is licensed under the MIT license.

© 2016 Kukua BV