Seneca Tillo-Provider is a plugin for Seneca
Provides access to the Tillo API using the Seneca provider convention. Tillo 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: {
$TILLO_API_KEY: String,
$TILLO_SECRET: String,
}
})
.use('provider', {
provider: {
tillo: {
keys: {
apikey: { value: '$TILLO_API_KEY' },
secret: { value: '$TILLO_SECRET' },
}
}
}
})
.use('tillo-provider')
const brands = await seneca.entity("provider/tillo/brand").list$({
detail: true,
currency: "GBP",
country: "GB"
})
console.log('BRANDS', brands)
$ npm install @seneca/tillo-provider @seneca/env
debug
: boolean false
Set plugin options when loading with:
seneca.use('TilloProvider', { name: value, ... })
Note: foo.bar
in the list above means
{ foo: { bar: ... } }
- role:entity,base:tillo,cmd:load,name:repo,zone:provider
- role:entity,base:tillo,cmd:save,name:repo,zone:provider
- sys:provider,get:info,provider:tillo
Load Tillo repository data into an entity.
Update Tillo repository data from an entity.
Get information about the provider.