@seneca/ovationincentives-provider
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Seneca Ovationincentives-Provider

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.

npm version build Coverage Status Known Vulnerabilities DeepScan grade Maintainability

Voxgig 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

Action Descriptions

« "sys":"entity","base":"ovationincentives","cmd":"save","name":"code","zone":"provider" »

No description provided.


« "sys":"provider","get":"info","provider":"ovationincentives" »

No description provided.


Package Sidebar

Install

npm i @seneca/ovationincentives-provider

Weekly Downloads

6

Version

0.3.0

License

MIT

Unpacked Size

26.1 kB

Total Files

11

Last publish

Collaborators

  • lmscunha
  • alex01
  • lilsweetcaligula
  • stokesriona
  • rjrodger