# hew

> Interface to the HP Cloud API (unofficial)

Latest version **0.0.7** (published 2013-07-02) · BSD license · 0 weekly downloads

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

## Install

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

## Health

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

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2013-07-02 |
| First published | 2013-06-19 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.6 |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nate Silva |
| Maintainers | natevancouver |
| Keywords | hp, cloud, hpcloud, messaging, openstack, marconi |

## Links

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

## Dependencies (1)

- [request](https://npm.io/package/request.md) ~2.21.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2013-07-02
- 0.0.6 — 2013-07-02
- 0.0.5 — 2013-06-27
- 0.0.4 — 2013-06-20
- 0.0.3 — 2013-06-19
- 0.0.2 — 2013-06-19
- 0.0.1 — 2013-06-19

## README

# Hew

Hew provides a Node.js API for [HP Cloud](https://www.hpcloud.com/).

* Hew is an independent project not affiliated with HP. The official HP Node.js interface can be found at: <http://hpcloud.github.io/hpcloud-js/>

## API Documentation

**Hew API Documentation** is at: <http://natesilva.github.io/hew/docs/#!/api>

## Github

The Hew Github repository is at: <https://github.com/natesilva/hew>

### Coverage

Currently Hew supports a subset of the [HP Cloud API](http://docs.hpcloud.com/api/):

* **Authentication Tokens**
* **Messaging**
* **DNS**
* **Object Storage**
* **CDN** (partial)
* **Identity** (partial)

### Installation

    npm install hew

### Quick start

Example showing use of the Messaging module:

```js
var Hew = require('hew');

var yourRegion = Hew.AuthToken.DEFAULT_REGION;
var yourAccessKey = '…';
var yourSecretKey = '…';
var yourTenantName = '…';
var qname = 'my-test-message-queue';

// obtain an authentication token
var token = new Hew.AuthToken(yourRegion, yourAccessKey, yourSecretKey,
  yourTenantName);

// create the Messaging controller
var messaging = new Hew.Messaging(token);

// create a test queue
messaging.createQueue(qname, function(err) {
  if (err) { return console.error(err); }
  console.log('test queue created');

  // send a message
  var message = { location: 'Palo Alto', temperature: 22, units: 'C' };
  messaging.send(qname, message, function(err, messageId) {
    if (err) { return console.error(err); }
    console.log('message was posted, with ID', messageId);

    // receive a message
    messaging.receive(qname, function(err, message) {
      if (err) { return console.error(err); }
      console.log('message received:', message.body);
      // prints: { location: 'Palo Alto', temperature: 22, units: 'C' }

      // delete the test queue
      messaging.deleteQueue(qname, function(err) {
        if (err) { return console.error(err); }
        console.log('test queue deleted');
      });
    });
  });
});
```

### Running unit tests

**Warning:** Do not run unit tests against your production HP Cloud account. Testing will create, update and delete resources in your account, including very large files for testing object storage.

To run unit tests:

1. Check out the Hew git repo.
1. Create `tests/config.json` (an example is provided).
1. Add the following key to `tests/config.json`:
    * `"i-created-this-account-for-testing-only": true`
1. From the the top of the repo, run `npm install`.
1. From the the top of the repo, run `npm test`.

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