-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #137 from plivo/mms_powerpack_release
Mms powerpack release
- Loading branch information
Showing
9 changed files
with
591 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
var Plivo = require('../dist/rest/client.js'); | ||
var client = new Plivo.Client(); | ||
|
||
var params = { | ||
sticky_sender: true, | ||
local_connect: true | ||
}; | ||
// create powerpack | ||
client.powerpacks.create("node sdk test", params).then(function (result) { | ||
console.log(result) | ||
}); | ||
|
||
// get powerpack | ||
client.powerpacks.get("0166c910-1268-47c7-bf30-f5809ee843b9").then( | ||
function (result) { | ||
console.log(result) | ||
}); | ||
|
||
// list powerpack | ||
client.powerpacks.list().then( | ||
function (result) { | ||
console.log(result) | ||
}); | ||
// list numbers | ||
client.powerpacks.get("0166c910-1268-47c7-bf30-f5809ee843b9").then( | ||
function (powerpack) { | ||
return powerpack.list_numbers() | ||
}) | ||
.then(function (result) { | ||
console.log("\n============ list numbers ===========\n", result) | ||
}) | ||
// find number | ||
client.powerpacks.get("0166c910-1268-47c7-bf30-f5809ee843b9").then( | ||
function (powerpack) { | ||
return powerpack.find_number('1234') | ||
}) | ||
.then(function (result) { | ||
console.log("\n============ list numbers ===========\n", result) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.