Coder Social home page Coder Social logo

hpcloud-js's Introduction

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()); }
});

hpcloud-js's People

Contributors

technosophos avatar mattfarina avatar

Stargazers

平江 avatar  avatar Brian Beckett avatar Nate Silva avatar Herry avatar Carlos Marin avatar Rob Loach avatar  avatar Rupak Ganguly avatar  avatar

Watchers

Rupak Ganguly avatar Tim Pletcher avatar  avatar Travis Plummer avatar Brian DeHamer avatar James Cloos avatar Jim West avatar Harshit Shah avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.