0.2.1 • Published 5 years ago

fibery-unofficial v0.2.1

Weekly downloads
24
License
MIT
Repository
gitlab
Last release
5 years ago

Fibery API documentation with examples using this client.

Getting started

const Fibery = require('fibery-unofficial');
const fibery = new Fibery({
    host: 'YOUR_ACCOUNT.fibery.io',
    token: 'YOUR_TOKEN'
});

Method-way vs. command-way

This unofficial Node.js client supports two ways of working. Method-way is used in the API documentation:

const users = await fibery.entity.query({
  'q/from': 'fibery/user',
  'q/select': ['fibery/id', 'user/name'],
  'q/limit': 3
});

It is equivalent to command-way:

const usersCommand = fibery.command.queryEntityCmd({
  'q/from': 'fibery/user',
  'q/select': ['fibery/id', 'user/name'],
  'q/limit': 3
});

const users = await fibery.command.execute(usersCommand);

The method-way utilizes commands under the hood, but provides a more simple interface.

The command-way removes an abstraction layer, making it closer to the actual API but also less suitable for a one-time use.

Feel free to use any of the ways.

Differences from API

This client makes it easier to:

Examples

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago