1.0.9 • Published 10 months ago

rubik-pact v1.0.9

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

rubik-pact

Pact's Bot API kubik for the Rubik

Install

npm

npm i rubik-pact

yarn

yarn add rubik-pact

Use

const { App, Kubiks } = require('rubik-main');
const Pact = require('rubik-pact');
const path = require('path');

// create rubik app
const app = new App();
// config need for most modules
const config = new Kubiks.Config(path.join(__dirname, './config/'));

const pact = new Pact();

app.add([ config, pact ]);

app.up().
then(() => console.info('App started')).
catch(err => console.error(err));

Config

pact.js config in configs volume may contain the host and token.

If you do not specify a host, then https://api.pact.im/ will be used by default.

If you don't specify a token, you will need to pass it.

...
const response = await app.get('pact').companies.conversations.messages({
  params: { companyId: '123',  },
  body: { message: 'Test', conversationId: '1234' }
});;
...

You may need the host option if for some reason Pact host is not available from your server and you want to configure a proxy server.

For example: config/pact.js

module.exports = {
  host: 'https://my.pact.proxy.example.com/'
};

Extensions

Pact kubik doesn't has any extension.

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago