# fibery-unofficial

> The unofficial Fibery Node.js library

Latest version **0.2.1** (published 2019-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install fibery-unofficial
pnpm add fibery-unofficial
yarn add fibery-unofficial
bun add fibery-unofficial
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-07-11 |
| First published | 2019-06-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 24.2 KB |
| Known vulnerabilities | 0 (+3 in 3 direct dependencies) |
| Install scripts | no |
| Maintainers | antoniokov |
| Keywords | fibery, productivity |

## Links

- npm: https://www.npmjs.com/package/fibery-unofficial
- Repository: https://gitlab.com/fibery/unofficial-js-client
- Homepage: https://gitlab.com/fibery/unofficial-js-client#readme
- Issues: https://gitlab.com/fibery/unofficial-js-client/issues
- npm.io page: https://npm.io/package/fibery-unofficial

## Dependencies (4)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [uuid](https://npm.io/package/uuid.md) ^3.3.2
- [request](https://npm.io/package/request.md) ^2.88.0
- [request-promise-native](https://npm.io/package/request-promise-native.md) ^1.0.7

## Recent versions

- 0.2.1 (latest) — 2019-07-11
- 0.2.0 — 2019-07-04
- 0.1.1 — 2019-06-30
- 0.1.0 — 2019-06-30

## README

[Fibery API documentation](https://fibery.gitlab.io/api-docs/?javascript) with examples using this client.

## Getting started

```javascript
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](https://fibery.gitlab.io/api-docs/?javascript):

```javascript
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:

```javascript
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:

* [Create domain Type](https://fibery.gitlab.io/api-docs/?javascript#create-type) — creates five mandatory primitive Fields and installs rank mixin. 
* [Create relation (entity [collection] Field)](https://fibery.gitlab.io/api-docs/?javascript#relation-entity-collection-field) — creates both entity Fields and connects them together.
* [Create single-select Field](https://fibery.gitlab.io/api-docs/?javascript#single-select-field) — creates an auxiliary Type and options as Entities of that Type, makes selection required and sets the default option.


## Examples

* A bunch of [short examples](https://gitlab.com/fibery-community/api-examples/blob/master/short-examples.js).
* [Migration from Airtable](https://gitlab.com/fibery-community/api-examples/tree/master/migrate-from-airtable) prototype.

---
_Source: https://npm.io/package/fibery-unofficial · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
