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
[ | |
{ | |
"number": "+14154292562", | |
"city": "SAN FRANCISCO", | |
"state": "CA", | |
"nationalNumber": "(415) 429-2562", | |
"price": "0.25", | |
"location": "https://api.catapult.inetwork.com/v1/users/u-ch2590ah3i3k39/phoneNumbers/n-dng8937gnasg8nh" | |
} | |
] |
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
{ | |
"userId": "u-yourUserID", | |
"apiToken": "t-yourToken", | |
"apiSecret": "yourSecret", | |
"baseUrl": "http://yourURL.ngrok.io" | |
} |
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
POST /v1/users/{user-id}/domains | |
{ | |
"name": "xyz-corp-testing", | |
"description": "Testing Demo Domain" | |
} | |
HTTP/1.1 201 Created | |
Location: /v1/users/{user-id}/domains/{domain-id} |
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
POST /v1/users/{user-id}/domains/{domain-id}/endpoints | |
{ | |
"name" : "jsmith_mobile", | |
"description" : "John Smiths mobile client", | |
"domain_id" : "{domain-id}", | |
"application_id" : "{application-id}", | |
"enabled" : "true", | |
"credentials" : { "password" : "abc123" } | |
} |
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
POST /v1/users/<user-id>/domains/<domain-id>/endpoints/<endpoint-id>/tokens | |
{} | |
HTTP/1.1 201 Create | |
Headers: | |
Location: <host>/v1/users/<user-id>/domains/<domain-id>/endpoints/<endpoint-id>/tokens/<token> | |
{ | |
“expires” : 86400, | |
“token”: “283ha89bva289fajf2093jf” |
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
<?xml version=”1.0" encoding=”UTF-8"?> | |
<Response> | |
<Transfer transferCallerId=”+15552221235”> | |
<PhoneNumber>+15552221234</PhoneNumber> | |
<PhoneNumber>+15552221233</PhoneNumber> | |
<SpeakSentence gender=”male” locale=”en_US” voice=”paul”>This call has been forwarded.</SpeakSentence> | |
</Transfer> | |
</Response> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<SpeakSentence gender="male" locale="en_US" voice="paul">Transferring your call, please wait.</SpeakSentence> | |
<Transfer transferCallerId="+19842041410" transferTo="+14022561434"> | |
<SpeakSentence gender="male" locale="en_US" voice="paul">Someone is calling you.</SpeakSentence> | |
</Transfer> | |
</Response> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Response> | |
<SpeakSentence gender="male" locale="en_US" voice="paul">Transferring your call, please wait.</SpeakSentence> | |
<Transfer transferCallerId="+14153266774" transferTo="+19192489516"> | |
<SpeakSentence gender="male" locale="en_US" voice="paul">Someone is calling you.</SpeakSentence> | |
</Transfer> | |
</Response> |
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
var Promise = require('bluebird'); | |
var zipp = Promise.promisify(require('node-zippopotamus')); | |
var Forecast = require('forecast.io-bluebird'); | |
var forecast = new Forecast({ | |
key: 'PUT_YOUR_FORECAST.IO_KEY_HERE', //PUT YOUR FORECAST.IO KEY HERE, | |
timeout: 2500 | |
}); | |
var getWeather = function (zipCode){ | |
return zipp('us', zipCode) |
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
<Response> | |
<SpeakSentence gender="male" locale="en_US" voice="paul">Hi thanks for calling, yo</SpeakSentence> | |
<Transfer transferCallerId="+19842210247"> | |
<PhoneNumber>+19197891146</PhoneNumber> | |
<PhoneNumber>+19193685336</PhoneNumber> | |
<PhoneNumber>+19196373692</PhoneNumber> | |
<SpeakSentence gender="male" locale="en_US" voice="paul">Some is calling you that thinks you're a big deal.</SpeakSentence> | |
</Transfer> | |
</Response> |