0.0.6 • Published 8 years ago

node-toukufm-api v0.0.6

Weekly downloads
3
License
GPL-3.0
Repository
github
Last release
8 years ago

node-toukufm-api

ToukuFM API wrapper for anyone to use in Node projects.

Installation

$ npm install node-toukufm-api

Usage

You can see the JSON output if you log them to the console.

// Require the module
var ToukuFM = require('node-toukufm-api');

// Set up your callback function
var callback = function(err, result) {
    if (err) {
        console.log(err.status);
        console.log(err.error);
        return;
    }
    console.log(result);
}

// Get the current playing song
ToukuFM.get_now_playing(callback);

// Get the team information
ToukuFM.get_team(callback);

// Get the schedule
ToukuFM.get_schedule(callback);

// Schedule from now until 10 days ahead
ToukuFM.get_schedule_days_ahead(10, callback);

// Not implemented yet, coming soon
ToukuFM.get_zones(callback);

API

MethodParametersURL
ToukuFM.get_teamcallbackhttp://toukufm.com/data/team
ToukuFM.get_now_playingcallbackhttp://toukufm.com/data/nowplaying
ToukuFM.get_schedulecallbackhttp://toukufm.com/data/schedule
ToukuFM.get_schedule_days_aheaddays:int, callbackhttp://toukufm.com/data/schedule/14
ToukuFM.get_zonescallbackhttp://toukufm.com/data/zones

Note: all the callback functions should have two arguments; err and result. err is a boolean so if it is true, you can find the error log in result.

License

This program is licensed under the GPL-3.0 license.

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.1.0

8 years ago