Constructor
new exports(apikey, options)
Parameters:
Name |
Type |
Description |
apikey |
string
|
The API key available from user account. |
options |
object
|
Specify the endpoint of TreasureData api.
options.host = 'api.treasuredata.com'
options.protocol = 'http' |
- Version:
- Author:
-
- License:
- Source:
- See:
-
Requires:
- module:request
- module:querystring
- module:merge
Example
var TD = require('td');
var client = new TD('TREASURE_DATA_API_KEY');
var fnPrint = function(err, results) {
console.log(results);
};
client.listDatabase(function(err, results) {
for (var i = 0; i < results.databases.length; i++) {
client.listTables(results.databases[i].name, fnPrint);
}
});