Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
NodeJs library for interacting with Audioboo
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
.gitignore
README.md
index.js
package.json

README.md

nodejs-audioboo

Library for interacting with Audioboo

Add to your package.json file list of dependencies:

    "dependencies" : {
        "audioboo" : "git://github.com/jimib/nodejs-audioboo.git#master"
    }

Update your dependencies using npm:

npm install -d

*I will be adding this to npm very soon, needs more testing first

Configuring your account

To use Audioboo's API you must create a set of consumer keys through your AudioBoo account. AudioBoo > Settings > API Keys

Create a config file using the provided command line tool.

cd node_modules/audioboo
./index.js --configure

The application will take you through the authetication process and create a config file to be used by your application.

The config file is of the format if you want create it manually:

{
    "consumer_key":"************************",
    "consumer_secret":"****************************************************************",
    "access_key":"************************",
    "access_secret":"****************************************************************"
}

Save the config file and then load it in your application:

Examples

//load the config file
var config = require("./audioboo.json");
//load the audioboo library
var libAudioBoo = require("audioboo");
//generate our api object
var api = new libAudioBoo.AudioBoo(config);
//now we can start requesting data and uploading audio
api.getCurrentUserClips(function(err, result){
  //retrieves the list of audio files on the account we configure the application to use
  console.log(result.body.audio_clips);
});

An important part of Audioboo is being able to upload audio:

//load the config file
var config = require("./audioboo.json");
//load the audioboo library
var libAudioBoo = require("audioboo");

var api = new libAudioBoo.AudioBoo(config);

var upload = new libAudioBoo.Upload("Sample Upload using NodeJs Audioboo Library", "/Users/Jimi/Desktop/001.mp3");
//optional - add an image
upload.addImage("/Users/Jimi/Desktop/favicon.png");
//optional
upload.setTags(["development", "nodejs", "audioboo", "jimib"]);
//optional
upload.setDescription("Example of uploading audio and image using nodejs-audioboo.\n View the github repo @ https://github.com/jimib/nodejs-audioboo");

//upload the package
api.upload(upload, function(err, result){
    console.log("error:", err);
    console.log("result:", result);
});
Something went wrong with that request. Please try again.