# flow-cloudboost-component

> CloudBoost components designed to work with Flow SDK

Latest version **0.3.5** (published 2019-06-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install flow-cloudboost-component
pnpm add flow-cloudboost-component
yarn add flow-cloudboost-component
bun add flow-cloudboost-component
```

## 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.3.5 |
| Published | 2019-06-19 |
| First published | 2018-12-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 53.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Hackerbay Inc. |
| Maintainers | hackerbayadmin |
| Keywords | cloudboost |

## Links

- npm: https://www.npmjs.com/package/flow-cloudboost-component
- Repository: https://github.com/FlowAppPlatform/flow-cloudboost-component
- Homepage: https://github.com/FlowAppPlatform/flow-cloudboost-component#readme
- Issues: https://github.com/FlowAppPlatform/flow-cloudboost-component/issues
- npm.io page: https://npm.io/package/flow-cloudboost-component

## Dependencies (4)

- [q](https://npm.io/package/q.md) ^1.5.1
- [cross-env](https://npm.io/package/cross-env.md) ^5.2.0
- [cloudboost](https://npm.io/package/cloudboost.md) ^2.0.264
- [flow-platform-sdk](https://npm.io/package/flow-platform-sdk.md) ^1.3.1

## Recent versions

- 0.3.5 (latest) — 2019-06-19
- 0.3.3 — 2019-06-08
- 0.3.1 — 2019-03-10
- 0.2.9 — 2019-02-15
- 0.2.7 — 2018-12-26

## README

# Flow Cloudboost component
Cloudboost components designed to work with Flow SDK

*To get started, install the package in your NodeJS project*

```
npm i flow-cloudboost-component --save
```

*Use the component as below*

```javascript
// require the component
const Component = require('flow-cloudboost-component');

// create instance of the query component for example
const component = new Component.Query();
```

*Provide cloudboost credentials, app id, client key*

```javascript
component.getProperty('APP_ID').data = 'Your_App_ID';
component.getProperty('CLIENT_KEY').data = 'Your_Client_Key';
```

*Provide collection to query against*

```javascript
// have this created, for example 'Games'
component.getProperty('Table').data = 'Your_Collection';
component.getProperty('Constraints').data = {
  name: { equalTo: 'Chess' },
  players: { lessThan: 2 }
};
```

*Listen in for port emit events*
```javascript
component.getPort('Success').onEmit(function() {
  // query was successfully made
  // the documents can be accessed through the 'Data' property of the port
  let documents = component.getPort('Success').getProperty('Data')
    .data
    .map(d => d.document);
});

component.getPort('Error').onEmit(function() {
  // an error occured
  // the actual error can be accessed through the 'Data' property of the port
  let err = component.getPort('Error').getProperty('Data').data;
});
```

*Execute the component*
```javascript
// add the component to a graph before executing it
const Graph = require('flow-platform-sdk').Graph;
new Graph("graph-1").addComponent(component);

component.execute();
```

#### Conclusion

That's the Flow Cloudboost Query component. Also check the [Cloudboost Save](./docs/components/save.md) and [Cloudboost Delete](./docs/components/delete.md) components

If you are having trouble, ensure that you are using the correct [Cloudboost credentials](https://cloudboost.io/).

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