# vhx

> VHX Node.js API Client

Latest version **1.8.0** (published 2017-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install vhx
pnpm add vhx
yarn add vhx
bun add vhx
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.0 |
| Published | 2017-03-01 |
| First published | 2015-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= v0.10.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 5 |
| Author | VHX |
| Maintainers | davegonzalez, scottusrobus, vhx-admin |
| Keywords | vhx, video, api |

## Links

- npm: https://www.npmjs.com/package/vhx
- Repository: https://github.com/vhx/vhx-node
- Issues: https://github.com/vhx/vhx-node/issues
- npm.io page: https://npm.io/package/vhx

## Dependencies (1)

- [request](https://npm.io/package/request.md) 2.x

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.8.0 (latest) — 2017-03-01
- 1.0.0-beta.4 (beta.4) — 2015-11-28
- 1.0.0-beta.3 (beta.3) — 2015-11-28
- 1.0.0-beta (beta) — 2015-11-24
- 1.7.0 — 2017-02-13
- 1.6.0 — 2017-02-01
- 1.5.1 — 2016-08-25
- 1.5.0 — 2016-08-19
- 1.4.0 — 2016-02-19
- 1.3.1 — 2016-02-18
- 1.3.0 — 2016-02-16
- 1.2.0 — 2016-01-08
- 1.1.2 — 2016-01-07
- 1.1.1 — 2015-12-22
- 1.0.2 — 2015-12-21
- … 2 more at https://npm.io/package/vhx/versions

## README

# VHX Node.js API Client

API applications can be created in the [VHX admin](https://www.vhx.tv/admin/platforms) or by emailing [api@vhx.tv](mailto:api@vhx.tv)

### Installation

`npm install vhx`

### Documentation

Documentation, including a step-by-step tutorial is available on the [VHX Developer Docs ](http://dev.vhx.tv/api?javascript) site.
For Full API reference [go here](http://dev.vhx.tv/docs/api?javascript).

### Getting Started

Before requesting your first resource, you must setup your instance of the VHX Client:

```js
var vhx = require('vhx')('your VHX API key');
```

Every resource method has two arguments. The first argument is an options object or identifier and the second, an optional callback:

```js

// example customer create
vhx.customers.create({
  email: 'customer@email.com',
  name: 'First Last'
}, function(err, customer) {
  // err, = error is false if no error occurred
  // customer = the created customer object
});
```

Headers can be passed in as the last argument, which would either be the second or third argument depending on the method. See each individual method for specifics.
```js
// example video create with header
vhx.videos.create({
  title: 'My Video',
}, { 'VHX-Client-IP': '0.0.0.0' }, function(err, customer) {
});
```

### Resources & methods

products
  * [`retrieve`](http://dev.vhx.tv/docs/api/?node#product-retrieve)
  * [`all`](http://dev.vhx.tv/docs/api/?node#product-list)

customers
  * [`create`](http://dev.vhx.tv/docs/api/?node#customer-create)
  * [`retrieve`](http://dev.vhx.tv/docs/api/?node#customer-retrieve)
  * [`update`](http://dev.vhx.tv/docs/api/?node#customer-update)
  * [`all`](http://dev.vhx.tv/docs/api/?node#customer-list)
  * [`del`](http://dev.vhx.tv/docs/api/?node#customer-delete)
  * [`addProduct`](http://dev.vhx.tv/docs/api/?node#customer-add-product)
  * [`removeProduct`](http://dev.vhx.tv/docs/api/?node#customer-remove-product)

videos
  * [`create`](http://dev.vhx.tv/docs/api/?node#videos-create)
  * [`retrieve`](http://dev.vhx.tv/docs/api?node#videos-get)
  * [`update`](http://dev.vhx.tv/docs/api?node#videos-update)
  * [`all`](http://dev.vhx.tv/docs/api?node#videos-list)
  * [`files`](http://dev.vhx.tv/docs/api/?node#videos-list-files)

collections
  * [`create`](http://dev.vhx.tv/docs/api?node#collections-create)
  * [`update`](http://dev.vhx.tv/docs/api?node#collections-update)
  * [`retrieve`](http://dev.vhx.tv/docs/api?node#collections-retrieve)
  * [`all`](http://dev.vhx.tv/docs/api?node#collections-list)
  * [`items`](http://dev.vhx.tv/docs/api?node#collection-items-list)

authorizations
  * [`create`](http://dev.vhx.tv/docs/api?node#authorizations-create)

analytics
  * [`report`](http://dev.vhx.tv/docs/api?node#analytics-report)

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