showkit
v0.0.2
Published
Node.js wrapper for the ShowKit REST API
Downloads
4
Readme
ShowKit API
Using the API
var ShowKit = require('showkit');
var kit = new ShowKit('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa');
Getting Accounts
kit.getAccounts(function(err, accounts) {
// ...
});
Example Result
{
create_timestamp: Date,
status: 'active',
billing_profile: 'default',
terminate_timestamp: null,
activate_timestamp: Date,
modify_timestamp: Date,
id: 9
}
Adding a Subscriber
kit.addSubscriber('username', 'password', function(err, result) {
// ...
});
Example Result
{
username: '9.bob',
domain: '108.166.105.43'
success: true
}
Listing Subscribers
kit.getSubscribers(function(err, subscribers) {
// ...
});
Example Result
[{
alias_numbers: [],
create_timestamp: Date,
status: 'active',
uuid: 'd3cb8508-fee0-42a8-b96a-96b5a254227b',
domain: '108.166.105.43',
subscriber_id: 9,
username: 'bob',
account_id: 9,
modify_timestamp: Date
}]
Listing a Subscriber's Calls
kit.getSubscriberCalls(username, function(err, calls) {
// ...
});
Example Result
[{
source_domain: '0',
rating_status: '3',
call_status: 'call_fee',
start_time: 'timeout',
duration: '1349398146.01',
destination_user: '108.166.105.43',
mct: 'jamesexpert2222',
destination_domain: false,
source_clir: '13105284403',
id: 'james2252',
call_type: 'ok'
}]
Checking if a Subscriber is Active
kit.getSubscriberActive(username, function(err, result) {
// ...
});
Example Result
{
active: true
}