Skip to content
NHK client for javascript
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
client
config
example
lib
test
.gitignore
.travis.yml
README.md
bower.json
index.js
package.json

README.md

NHK API for javascript Build Status

browser support

NHK has their televison program API.

This library can call the API from javascript

See more detail here:

NHK番組表API

Usage

var NHK = require("nhk_api");
var nhk = new NHK("YOUR_API_KEY");
var callback = function(err, result) {
  console.log(JSON.stringify(result));
};

// list api
nhk.list.get("130", "g1", callback);
nhk.list.get("東京", "NHK総合1", callback);
nhk.list.get("東京", "NHK総合1", "tomorrow", callback);
// genre api
nhk.genre.get("130", "g1", callback);
nhk.genre.get("東京", "NHK総合1", callback);
nhk.genre.get("東京", "NHK総合1", "tomorrow", callback);
// info api
nhk.info.get("130", "g1", "123456789", callback);
// now api
nhk.now.get("130", "g1", callback);

Install

for server

$ npm install nhk_api

for client

$ bower install nhk_api
<!-- in browser -->
<script src="components/nhk_api/client/nhk_api.js"></script>
Something went wrong with that request. Please try again.