-
Notifications
You must be signed in to change notification settings - Fork 181
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 #284 from Nexmo/v2.6.0
Allow API URL overriding
- Loading branch information
Showing
23 changed files
with
547 additions
and
47 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
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,50 @@ | ||
module.exports = function(callback, config) { | ||
|
||
var Nexmo = require('../lib/Nexmo'); | ||
|
||
var nexmo = new Nexmo({ | ||
apiKey: config.API_KEY, | ||
apiSecret: config.API_SECRET | ||
}, { | ||
debug: config.DEBUG, | ||
apiHost: config.API_HOST | ||
}); | ||
|
||
nexmo.applications.create({ | ||
name: 'My nexmo-node Example V2 App', | ||
capabilities: { | ||
voice: { | ||
webhooks: { | ||
answer_url: { | ||
address: "https://example.com", | ||
http_method: "GET" | ||
}, | ||
event_url: { | ||
address: "https://example.com", | ||
http_method: "POST" | ||
} | ||
} | ||
}, | ||
messages: { | ||
webhooks: { | ||
inbound_url: { | ||
address: "https://example.com", | ||
http_method: "POST" | ||
}, | ||
status_url: { | ||
address: "https://example.com", | ||
http_method: "POST" | ||
} | ||
} | ||
}, | ||
rtc: { | ||
webhooks: { | ||
event_url: { | ||
address: "https://example.com", | ||
http_method: "POST" | ||
} | ||
} | ||
} | ||
} | ||
}, callback); | ||
}; |
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,14 @@ | ||
module.exports = function(callback, config) { | ||
|
||
var Nexmo = require('../lib/Nexmo'); | ||
|
||
var nexmo = new Nexmo({ | ||
apiKey: config.API_KEY, | ||
apiSecret: config.API_SECRET | ||
}, { | ||
debug: config.DEBUG, | ||
restHost: config.REST_HOST | ||
}); | ||
|
||
nexmo.message.sendSms(config.FROM_NUMBER, config.TO_NUMBER, 'testing', callback); | ||
}; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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.