@bandwidth/bxml
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -25,2 +25,5 @@ /** | ||
this.fileFormat = null; | ||
this.transcribe = null; | ||
this.transcriptionAvailableUrl = null; | ||
this.transcriptionAvailableMethod = null; | ||
} | ||
@@ -118,2 +121,29 @@ | ||
/** | ||
* Sets the transcribe attribute | ||
* | ||
* @param {bool} transcribe The value to set transcribe to | ||
*/ | ||
setTranscribe(transcribe) { | ||
this.transcribe = transcribe; | ||
} | ||
/** | ||
* Sets the transcriptionAvailableUrl attribute | ||
* | ||
* @param {string} transcriptionAvailableUrl The value to set transcriptionAvailableUrl to | ||
*/ | ||
setTranscriptionAvailableUrl(transcriptionAvailableUrl) { | ||
this.transcriptionAvailableUrl = transcriptionAvailableUrl; | ||
} | ||
/** | ||
* Sets the transcriptionAvailableMethod attribute | ||
* | ||
* @param {string} transcriptionAvailableMethod The value to set transcriptionAvailableMethod to | ||
*/ | ||
setTranscriptionAvailableMethod(transcriptionAvailableMethod) { | ||
this.transcriptionAvailableMethod = transcriptionAvailableMethod; | ||
} | ||
addXml(xmlDocument) { | ||
@@ -162,2 +192,14 @@ var attributes = {}; | ||
if (this.transcribe !== null) { | ||
attributes["transcribe"] = this.transcribe; | ||
} | ||
if (this.transcriptionAvailableUrl !== null) { | ||
attributes["transcriptionAvailableUrl"] = this.transcriptionAvailableUrl; | ||
} | ||
if (this.transcriptionAvailableMethod !== null) { | ||
attributes["transcriptionAvailableMethod"] = this.transcriptionAvailableMethod; | ||
} | ||
xmlDocument.ele("Record", attributes); | ||
@@ -164,0 +206,0 @@ return xmlDocument; |
@@ -87,2 +87,29 @@ /** | ||
/** | ||
* Sets the transcribe attribute | ||
* | ||
* @param {bool} transcribe The value to set transcribe to | ||
*/ | ||
setTranscribe(transcribe) { | ||
this.transcribe = transcribe; | ||
} | ||
/** | ||
* Sets the transcriptionAvailableUrl attribute | ||
* | ||
* @param {string} transcriptionAvailableUrl The value to set transcriptionAvailableUrl to | ||
*/ | ||
setTranscriptionAvailableUrl(transcriptionAvailableUrl) { | ||
this.transcriptionAvailableUrl = transcriptionAvailableUrl; | ||
} | ||
/** | ||
* Sets the transcriptionAvailableMethod attribute | ||
* | ||
* @param {string} transcriptionAvailableMethod The value to set transcriptionAvailableMethod to | ||
*/ | ||
setTranscriptionAvailableMethod(transcriptionAvailableMethod) { | ||
this.transcriptionAvailableMethod = transcriptionAvailableMethod; | ||
} | ||
addXml(xmlDocument) { | ||
@@ -119,2 +146,14 @@ var attributes = {}; | ||
if (this.transcribe !== null) { | ||
attributes["transcribe"] = this.transcribe; | ||
} | ||
if (this.transcriptionAvailableUrl !== null) { | ||
attributes["transcriptionAvailableUrl"] = this.transcriptionAvailableUrl; | ||
} | ||
if (this.transcriptionAvailableMethod !== null) { | ||
attributes["transcriptionAvailableMethod"] = this.transcriptionAvailableMethod; | ||
} | ||
xmlDocument.ele("StartRecording", attributes); | ||
@@ -121,0 +160,0 @@ return xmlDocument; |
{ | ||
"name": "@bandwidth/bxml", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "Generator for Bandwidth's BXML", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,2 +11,3 @@ # NodeJS Bandwidth BXML | ||
| 2.2.0 | Added StartRecording, PauseRecording, ResumeRecording, and StopRecording verbs | | ||
| 2.3.0 | Added support for transcriptions to Record and StartRecording verbs | | ||
@@ -270,2 +271,5 @@ ## Installing | ||
record.setFileFormat("wav"); | ||
record.setTranscribe(true); | ||
record.setTranscriptionAvailableUrl("https://test.com"); | ||
record.setTranscriptionAvailableMethod("POST"); | ||
@@ -289,2 +293,5 @@ var response = new BandwidthBxml.Response(); | ||
startRecording.setMultiChannel(false); | ||
startRecording.setTranscribe(true); | ||
startRecording.setTranscriptionAvailableUrl("https://test.com"); | ||
startRecording.setTranscriptionAvailableMethod("POST"); | ||
@@ -291,0 +298,0 @@ var response = new BandwidthBxml.Response(); |
114883
1803
347