cl-speakeasy-sdk
v0.1.8
Published
CenturyLink SpeakEasy JavaScript SDK
Maintainers
Readme
CenturyLink SpeakEasy JavaScript SDK
A CenturyLink SpeakEasy API JavaScript SDK. Check out the demo in example/index.html
Installation
npm install cl-speakeasy-sdkDocumentation
See the documentation
for CenturyLink SpeakEasy JavaScript SDK Get Started and Guides. Also you
can run gulp doc and see generated documentation at /docs/.
Build process details
Build process requirements
To build the CenturyLink SpeakEasy JavaScript SDK source, issue the following commands:
- open the command line and switch into the project folder
npm installsudo npm install -g gulpgulpto see the list of available tasks
Essential gulp tasks
gulp builddumps a plain and a minified file from all files in the foldersrcinto the folderdist.gulp cleanremoves all files in the folderdist.gulp docgenerates JSDuck documentation in the folderdocs.gulp testruns the tests and linting for all files in the foldersrc.gulp bump-patchincreases the version by0.0.1for the last git commit and pushes the new tag to the remote repository.gulp bump-minorincreases the version by0.1.0for the last git commit and pushes the new tag to the remote repository.gulp bump-majorincreases the version by1.0.0for the last git commit and pushes the new tag to the remote repository.
Configuration details
Please see the Getting Started section for details and examples of how to configure the CenturyLink SpeakEasy JavaScript SDK.
Example
This example shows some of the functionality supported by the CenturyLink SpeakEasy JavaScript SDK.
index.html:
<!DOCTYPE html>
<html>
<head>
<title>Usage example for the CenturyLink SpeakEasy JavaScript SDK</title>
<script type="text/javascript" src="speakeasy-0.1.4.js"></script>
</head>
<body>
<script type="text/javascript" src="index.js"></script>
</body>
</html>index.js:
var username = 'joe';
var password = 'some-secret-pass';
CtlSpeakEasy.Auth.login(username, password, function(error, response) {
if (!error && response) {
console.info('Successfully authenticated. Exposing subscription services selection.');
} else {
console.error('Authentication failed: ', error);
}
});
//...
CtlSpeakEasy.CallManager.createCall('3031234567', false, function(call) {
console.info('Calling 3031234567...');
}, function() {
console.error('Make new call failed!');
});
License
This project is licensed under the Apache License v2.0.
