@seneca/ovationincentives-provider
v0.3.0
Published
Seneca entity provider for the Ovationincentives API.
Downloads
6
Readme
Seneca Ovationincentives-Provider is a plugin for Seneca
Provides access to the Ovationincentives API using the Seneca provider convention. Ovationincentives API entities are represented as Seneca entities so that they can be accessed using the Seneca entity API and messages.
See seneca-entity and the Seneca Data Entities Tutorial for more details on the Seneca entity API.
NOTE: underlying third party SDK needs to be replaced as out of date and has a security issue.
| | This open source module is sponsored and supported by Voxgig. | |---|---|
Quick Example
// Setup - get the key value (<SECRET>) separately from a vault or
// environment variable.
Seneca()
// Get API keys using the seneca-env plugin
.use('env', {
var: {
$OVATIONINCENTIVES_APIKEY: String,
$OVATIONINCENTIVES_USERTOKEN: String,
}
})
.use('provider', {
provider: {
ovationincentives: {
keys: {
apikey: { value: '$OVATIONINCENTIVES_APIKEY' },
usertoken: { value: '$OVATIONINCENTIVES_USERTOKEN' },
}
}
}
})
.use('ovationincentives-provider')
let board = await seneca.entity('provider/ovationincentives/board')
.load$('<ovationincentives-board-id>')
Console.log('BOARD', board)
board.desc = 'New description'
board = await board.save$()
Console.log('UPDATED BOARD', board)
Install
$ npm install @seneca/ovationincentives-provider @seneca/env
Options
None.
Action Patterns
- "sys":"entity","base":"ovationincentives","cmd":"save","name":"code","zone":"provider"
- "sys":"provider","get":"info","provider":"ovationincentives"
Action Descriptions
« "sys":"entity","base":"ovationincentives","cmd":"save","name":"code","zone":"provider"
»
No description provided.
« "sys":"provider","get":"info","provider":"ovationincentives"
»
No description provided.