0.2.0 • Published 8 years ago

halo-api-js v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
8 years ago

halo-api-js

Node and browser client for the halo developer apis https://developer.haloapi.com. Written in TypeScript and includes generated typings.

Installing

$> npm install --save halo-api-js
$> tsd link

The packaged version of halo-api-js contains a typings file at halo-api-js.d.ts which you can consume automatically with tsd link. Alternatively, you can add a reference to that definition file manually in your tsconfig or from your project code.

Using

var halo = require('halo-api-js').createHaloApi({
    apiToken: <token>
});

halo.getMetadataMaps(function(err, maps) {
    console.log('I got me some maps!', maps);
});

Only a node-style callbacks API is exported right now, but feel free to add your own Bluebird wrappers. A Promise-based wrapper may be included in the future.

Developing

I highly recommend a TypeScript-aware editor like Microsoft Visual Studio Code or JetBrains WebStorm.

Visual Studio Code setup

  1. Download Visual Studio Code
  2. Open the project directory
  3. Write code

Testing

$> HALO_API_TOKEN=<token> npm test
0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago