The HW Blog

Want to be updated? @opencoconut | Feed

Releasing a NodeJS Library

Bruno Celeste (@brunoceleste)

June 14, 2013 Features

After releasing a brand new PHP library yesterday, we are pleased to announce the release of an Coconut NodeJS Library.

Installation

Installing the module is easy thanks to npm:

npm install coconut

Getting Started

var hw = require("coconut").cli("HW-API-Key", api_key);

hw.create("job", {video_id: 1234, format_id: "android_720p"}, function(job) {
  console.log(JSON.stringify(job));
});

hw.create("preview/animation", {
    media_id: 1234,
    width: 300,
    ping_url: "http://mysite.com/ping/coconut",
    output_url: "s3://key:skey@bucket/path"
  }, function(ok) {
  // OK
});

For more usage example, have a look at the NodeJS library page.



Any Comment? Send us a message on Twitter @opencoconut
If you have questions or feedbacks, you can also contact us via our contact page