Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bandwidth/models/bxml/verbs/start_recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def __init__(
Args:
recording_available_url (str, optional): URL to send the Recording Available event to once it has been processed. Does not accept BXML. May be a relative URL. Defaults to None.
recording_available_method (str, optional): The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default value is POST.
transcribe (str, optional): A boolean value to indicate that recording should be transcribed. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. Default is false. Defaults to None.
transcribe (bool, optional): A boolean value to indicate that recording should be transcribed. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. Default is false. Defaults to None.
transcription_available_url (str, optional): URL to send the Transcription Available event to once it has been processed. Does not accept BXML. May be a relative URL. Defaults to None.
transcription_available_method (str, optional): The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default value is POST. Defaults to None.
username (str, optional): The username to send in the HTTP request to recordCompleteUrl, recordingAvailableUrl or transcriptionAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https). Defaults to None.
password (str, optional): The password to send in the HTTP request to recordCompleteUrl, recordingAvailableUrl or transcriptionAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https). Defaults to None.
tag (str, optional): A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or <Tag> verb, or cleared. May be cleared by setting tag="". Max length 256 characters. Defaults to None.
file_format (str, optional): The audio format that the recording will be saved as: mp3 or wav. Default value is wav. Defaults to None. max_duration (str, optional): Maximum length of recording (in seconds). Max 10800 (3 hours). Default value is 60. Defaults to None.
multi_channel (str, optional): A boolean value indicating whether or not the recording file should separate each side of the call into its own audio channel. Default value is false.
multi_channel (bool, optional): A boolean value indicating whether or not the recording file should separate each side of the call into its own audio channel. Default value is false.

"""
self.recording_available_url = recording_available_url
Expand Down
4 changes: 2 additions & 2 deletions bandwidth/models/bxml/verbs/start_transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def __init__(
:param transcription_event_method: The HTTP method to use for the request to transcriptionEventUrl. GET or POST. Default value is POST.
:param username: The username to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
:param password: The password to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
:param destination: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
:param stabilized: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
:param destination: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
:param stabilized: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
:param custom_params: These elements define optional user specified parameters that will be sent to the destination URL when the real-time transcription is first started.
"""
self.name = name
Expand Down
5 changes: 4 additions & 1 deletion bandwidth/models/bxml/verbs/stop_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
class StopStream(Verb):

def __init__(
self, name: str
self, name: str, wait: bool = None
):
"""Initialize a <StopStream> verb

Args:
name (str): The name of the stream to stop. This is either the user selected name when sending the <StartStream> verb, or the system generated name returned in the Media Stream Started webhook if <StartStream> was sent with no name attribute.
wait (bool, optional): If true, the BXML interpreter will wait for the stream to stop before processing the next verb.
"""
self.name = name
self.wait = wait
super().__init__(
tag="StopStream",
)
Expand All @@ -27,4 +29,5 @@ def __init__(
def _attributes(self):
return {
"name": self.name,
"wait": self.wait,
}
4 changes: 2 additions & 2 deletions test/unit/models/bxml/test_stop_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
class TestStopStream(unittest.TestCase):

def setUp(self):
self.stop_stream = StopStream(name="conf")
self.stop_stream = StopStream(name="conf", wait=True)

def test_instance(self):
assert isinstance(self.stop_stream, StopStream)
assert isinstance(self.stop_stream, Verb)

def test_to_bxml(self):
expected = '<StopStream name="conf" />'
expected = '<StopStream name="conf" wait="True" />'
assert expected == self.stop_stream.to_bxml()