rubik-vkontakte

1.0.3 • Public • Published

rubik-facebook

Vkontakte's Bot API kubik for the Rubik

Install

npm

npm i rubik-vkontakte

yarn

yarn add rubik-vkontakte

Use

const { App, Kubiks } = require('rubik-main');
const Vkontakte = require('rubik-vkontakte');
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 facebook = new Vkontakte();

app.add([ config, vkontakte ]);

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

Config

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

If you do not specify a host, then https://graph.facebook.com/ will be used by default.

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

...
const response = await app.get('vkontakte').groups.addCallbackServer();
...
...
const response = await app.get('vkontakte').groups.deleteCallbackServer();
...

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

For example: config/vkontakte.js

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

Extensions

Vkontakte kubik doesn't has any extension.

Package Sidebar

Install

npm i rubik-vkontakte

Weekly Downloads

8

Version

1.0.3

License

Apache-2.0

Unpacked Size

51.9 kB

Total Files

10

Last publish

Collaborators

  • nikitandr