Seneca Tangocard-Provider is a plugin for Seneca
Provides access to the Tangocard API using the Seneca provider convention. Tangocard 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. |
---|
// 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: {
$TANGOCARD_APIKEY: String,
$TANGOCARD_USERTOKEN: String,
}
})
.use('provider', {
provider: {
tangocard: {
keys: {
apikey: { value: '$TANGOCARD_APIKEY' },
usertoken: { value: '$TANGOCARD_USERTOKEN' },
}
}
}
})
.use('tangocard-provider')
let board = await seneca.entity('provider/tangocard/board')
.load$('<tangocard-board-id>')
Console.log('BOARD', board)
board.desc = 'New description'
board = await board.save$()
Console.log('UPDATED BOARD', board)
$ npm install @seneca/tangocard-provider @seneca/env
debug
: boolean false
Set plugin options when loading with:
seneca.use('TangocardProvider', { name: value, ... })
Note: foo.bar
in the list above means
{ foo: { bar: ... } }
- role:entity,base:tangocard,cmd:load,name:repo,zone:provider
- role:entity,base:tangocard,cmd:save,name:repo,zone:provider
- sys:provider,get:info,provider:tangocard
Load Tangocard repository data into an entity.
Update Tangocard repository data from an entity.
Get information about the provider.