# node-brocade

> A library for making requests to the brocade.io API

Latest version **2.0.1** (published 2022-09-26) · GPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install node-brocade
pnpm add node-brocade
yarn add node-brocade
bun add node-brocade
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-09-26 |
| First published | 2020-06-13 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 1 |
| Unpacked size | 45.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ENT8R |
| Maintainers | ent8r |

## Links

- npm: https://www.npmjs.com/package/node-brocade
- Repository: https://github.com/ENT8R/node-brocade
- Homepage: https://github.com/ENT8R/node-brocade#readme
- Issues: https://github.com/ENT8R/node-brocade/issues
- npm.io page: https://npm.io/package/node-brocade

## Dependencies (1)

- [isomorphic-unfetch](https://npm.io/package/isomorphic-unfetch.md) ^3.1.0

## Recent versions

- 2.0.1 (latest) — 2022-09-26
- 2.0.0 — 2020-06-13

## README

# brocade

![test](https://github.com/ENT8R/node-brocade/actions/workflows/test.yml/badge.svg?branch=master)
[![npm version](http://img.shields.io/npm/v/node-brocade.svg)](https://www.npmjs.org/package/node-brocade)
[![npm downloads](https://img.shields.io/npm/dt/node-brocade.svg)](https://www.npmjs.org/package/node-brocade)
[![coverage](https://coveralls.io/repos/github/ENT8R/node-brocade/badge.svg?branch=master)](https://coveralls.io/github/ENT8R/node-brocade?branch=master)


> Module for making requests to the [Brocade API](https://www.brocade.io/documentation)

## Installation

### npm
```
npm install node-brocade --save
```

### unpkg
```
<script src="https://unpkg.com/node-brocade@2.0.1/dist/main.min.js"></script>
```

## Usage

```javascript
const brocade = require('node-brocade');

brocade.item('4335896051932').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```

## Features

### Get an item by its GTIN

```javascript
brocade.item('4335896051932').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```

<!--### Update an existing item

```javascript
brocade.update('000000000000', {
  name: 'Test',
  brand_name: 'Test Brand'
}).then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```

### Add a new item

```javascript
brocade.add('000000000000', {
  name: 'Test',
  brand_name: 'Test Brand'
}).then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```-->

### List the first 100 products

```javascript
brocade.list().then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```

### List all items of a specific page

```javascript
brocade.page('20').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```

### Search for items

```javascript
brocade.query('peanut butter').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```

<!--### Upload an image

```javascript
brocade.image('000000000000', 'image.jpg').then(data => {
  console.log(JSON.stringify(data));
}).catch(error => {
  console.log(error.message);
});
```-->

## License

[GPL-3.0](https://github.com/ENT8R/node-brocade/blob/master/LICENSE)

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