1.0.0 • Published 11 months ago
@seneca/tillo-provider v1.0.0

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. |
|---|
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: {
$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)Install
$ npm install @seneca/tillo-provider @seneca/envOptions
debug: boolean false
Set plugin options when loading with:
seneca.use('TilloProvider', { name: value, ... })Note: foo.bar in the list above means { foo: { bar: ... } }
Action Patterns
- 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
Action Descriptions
« role:entity,base:tillo,cmd:load,name:repo,zone:provider »
Load Tillo repository data into an entity.
« role:entity,base:tillo,cmd:save,name:repo,zone:provider »
Update Tillo repository data from an entity.
« sys:provider,get:info,provider:tillo »
Get information about the provider.
1.0.0
11 months ago
