hpcloud-js
npm i hpcloud-js
Deprecated!
hpcloud-js is now deprecated and has been superseded by pkgcloud.

hpcloud-js

HPCloud bindings for JavaScript

by hpcloud

1.0.0 (see all)TypeScript:Not Found
npm i hpcloud-js
Readme

HPCloud-JS: A JavaScript library for working with HP Cloud services

Note, this library is now deprecated and has been superseded by pkgcloud.

This library provides JavaScript bindings for HP Cloud. API-wise, it is similar to HPCloud-PHP, but with asynchronous methods.

This has been developed on Node.js only.

Usage

Authenticating with a username and password:

var IdentityServices = require('hpcloud-js').IdentityServices;

var username = 'me';
var password = 'secret';
var tenantId = 12345;
var endpoint = 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0';

var idService = new IdentityServices(endpoint);
idService.setTenantId(tenantId);

idService.authenticateAsUser(username, password, function (err, identity) {
  if (err) { console.error(err); }
  else { console.log(identity.token()); }
});

Downloads/wk

5

GitHub Stars

11

LAST COMMIT

8yrs ago

MAINTAINERS

1

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
1.0.0
latest
9yrs ago
No alternatives found
No tutorials found
Add a tutorial