-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deploy * fixed media download url encoding * updated user agent version Co-authored-by: DX-Bandwidth <[email protected]>
- Loading branch information
1 parent
7b57cb2
commit c8e1044
Showing
6 changed files
with
143 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,34 @@ | ||
{ | ||
"name": "bandwidth/sdk", | ||
"type": "library", | ||
"description": "Bandwidth's set of APIs", | ||
"keywords": [ | ||
"bandwidth", | ||
"API", | ||
"SDK" | ||
], | ||
"homepage": "https://github.com/bandwidth/php-sdk", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "APIMatic SDK Generator", | ||
"email": "[email protected]", | ||
"homepage": "https://apimatic.io", | ||
"role": "API Tool" | ||
"name": "bandwidth/sdk", | ||
"type": "library", | ||
"description": "Bandwidth's set of APIs", | ||
"keywords": ["bandwidth","API","SDK"], | ||
"homepage": "https://apimatic.io", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "APIMatic SDK Generator", | ||
"email": "[email protected]", | ||
"homepage": "https://apimatic.io", | ||
"role": "API Tool" | ||
} | ||
], | ||
"require": { | ||
"ext-SimpleXML": "*", | ||
"php": ">=5.4.0", | ||
"ext-curl": "*", | ||
"ext-json": "*", | ||
"ext-mbstring": "*", | ||
"mashape/unirest-php": "~3.0.1", | ||
"apimatic/jsonmapper": "~1.3.0" | ||
}, | ||
"require-dev": { | ||
"squizlabs/php_codesniffer": "^2.7", | ||
"phan/phan": "^1.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"BandwidthLib\\": "src/" | ||
} | ||
} | ||
], | ||
"require": { | ||
"ext-SimpleXML": "*", | ||
"php": ">=5.4.0", | ||
"ext-curl": "*", | ||
"ext-json": "*", | ||
"ext-mbstring": "*", | ||
"mashape/unirest-php": "~3.0.1", | ||
"apimatic/jsonmapper": "~1.3.0" | ||
}, | ||
"require-dev": { | ||
"squizlabs/php_codesniffer": "^2.7", | ||
"phan/phan": "^1.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"BandwidthLib\\": "src/" | ||
} | ||
} | ||
} |
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,88 @@ | ||
<?php | ||
/** | ||
* StartGather.php | ||
* | ||
* Implementation of the BXML StartGather tag | ||
* | ||
* * @copyright Bandwidth INC | ||
*/ | ||
|
||
namespace BandwidthLib\Voice\Bxml; | ||
|
||
require_once "Verb.php"; | ||
require_once "SpeakSentence.php"; | ||
require_once "PlayAudio.php"; | ||
|
||
class StartGather extends Verb { | ||
|
||
/** | ||
* Sets the username attribute for StartGather | ||
* | ||
* @param string $username The username for http authentication for the gather callback | ||
*/ | ||
public function username($username) { | ||
$this->username = $username; | ||
} | ||
|
||
/** | ||
* Sets the password attribute for StartGather | ||
* | ||
* @param string $password The password for http authentication for the gather callback | ||
*/ | ||
public function password($password) { | ||
$this->password = $password; | ||
} | ||
|
||
/** | ||
* Sets the dtmfUrl attribute for StartGather | ||
* | ||
* @param string $dtmfUrl The url to receive the dtmf callback | ||
*/ | ||
public function dtmfUrl($dtmfUrl) { | ||
$this->dtmfUrl = $dtmfUrl; | ||
} | ||
|
||
/** | ||
* Sets the dtmfMethod attribute for StartGather | ||
* | ||
* @param string $dtmfMethod The http method to send the dtmf callback | ||
*/ | ||
public function dtmfMethod($dtmfMethod) { | ||
$this->dtmfMethod = $dtmfMethod; | ||
} | ||
|
||
/** | ||
* Sets the tag attribute for StartGather | ||
* | ||
* @param string $tag A custom string to be included in callbacks | ||
*/ | ||
public function tag($tag) { | ||
$this->tag = $tag; | ||
} | ||
|
||
public function toBxml($doc) { | ||
$element = $doc->createElement("StartGather"); | ||
|
||
if(isset($this->username)) { | ||
$element->setAttribute("username", $this->username); | ||
} | ||
|
||
if(isset($this->password)) { | ||
$element->setAttribute("password", $this->password); | ||
} | ||
|
||
if(isset($this->tag)) { | ||
$element->setAttribute("tag", $this->tag); | ||
} | ||
|
||
if(isset($this->dtmfUrl)) { | ||
$element->setAttribute("dtmfUrl", $this->dtmfUrl); | ||
} | ||
|
||
if(isset($this->dtmfMethod)) { | ||
$element->setAttribute("dtmfMethod", $this->dtmfMethod); | ||
} | ||
|
||
return $element; | ||
} | ||
} |
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,20 @@ | ||
<?php | ||
/** | ||
* StopGather.php | ||
* | ||
* Implementation of the BXML StopGather verb | ||
* | ||
* * @copyright Bandwidth INC | ||
*/ | ||
|
||
namespace BandwidthLib\Voice\Bxml; | ||
|
||
require_once "Verb.php"; | ||
|
||
class StopGather extends Verb { | ||
|
||
public function toBxml($doc) { | ||
$element = $doc->createElement("StopGather"); | ||
return $element; | ||
} | ||
} |
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