diff --git a/CHANGELOG.md b/CHANGELOG.md index ec812d18..96a57e17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## [4.22.0](https://github.com/plivo/plivo-python/tree/v4.22.0) (2022-01-27) +**Features - MPCStartCallRecording** +- parameter change from statusCallback to recordingCallback + ## [4.21.0](https://github.com/plivo/plivo-python/tree/v4.21.0) (2021-12-14) **Features - Voice** - Routing SDK traffic through Akamai endpoints for all the [Voice APIs](https://www.plivo.com/docs/voice/api/overview/) diff --git a/plivo/resources/multipartycall.py b/plivo/resources/multipartycall.py index d1860688..4bf93634 100644 --- a/plivo/resources/multipartycall.py +++ b/plivo/resources/multipartycall.py @@ -69,7 +69,7 @@ def start(self): def stop(self): return self.client.multi_party_calls.stop(uuid=self.id) - def start_recording(self, file_format=None, status_callback_url=None, status_callback_method=None): + def start_recording(self, file_format=None, recording_callback_url=None, recording_callback_method=None): return self.client.multi_party_calls.start_recording(uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -82,8 +82,8 @@ def pause_recording(self): def resume_recording(self): return self.client.multi_party_calls.resume_recording(uuid=self.id) - def start_participant_recording(self, participant_id, file_format=None, status_callback_url=None, - status_callback_method=None): + def start_participant_recording(self, participant_id, file_format=None, recording_callback_url=None, + recording_callback_method=None): return self.client.multi_party_calls.start_participant_recording(participant_id=participant_id, uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -127,8 +127,8 @@ class MultiPartyCallParticipant(SecondaryPlivoResource): _identifier_string = 'mpc_uuid' _secondary_identifier_string = 'member_id' - def start_participant_recording(self, file_format=None, status_callback_url=None, - status_callback_method=None): + def start_participant_recording(self, file_format=None, recording_callback_url=None, + recording_callback_method=None): return self.client.multi_party_calls.start_participant_recording(participant_id=self.secondary_id, uuid=self.id, **to_param_dict(self.add_participant, locals())) @@ -385,15 +385,15 @@ def stop(self, uuid=None, friendly_name=None): uuid=[optional(of_type_exact(str))], file_format=[optional(of_type_exact(str), is_in(('mp3', 'wav'), case_sensitive=False, case_type='lower'))], - status_callback_url=[optional(of_type_exact(str), is_url())], - status_callback_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], + recording_callback_url=[optional(of_type_exact(str), is_url())], + recording_callback_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], ) def start_recording(self, uuid=None, friendly_name=None, file_format='mp3', - status_callback_url=None, - status_callback_method='POST'): + recording_callback_url=None, + recording_callback_method='POST'): mpc_id = self.__make_mpc_id(friendly_name, uuid) return self.client.request('POST', ('MultiPartyCall', mpc_id, 'Record'), self.__clean_identifiers(to_param_dict(self.start_recording, locals())), @@ -479,11 +479,11 @@ def get_participant(self, participant_id, uuid=None, friendly_name=None): uuid=[optional(of_type_exact(str))], file_format=[optional(of_type_exact(str), is_in(('mp3', 'wav'), case_sensitive=False, case_type='lower'))], - status_callback_url=[optional(of_type_exact(str), is_url())], - status_callback_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], + recording_callback_url=[optional(of_type_exact(str), is_url())], + recording_callback_method=[optional(of_type_exact(str), is_in(('GET', 'POST'), case_sensitive=False))], ) def start_participant_recording(self, participant_id, uuid=None, friendly_name=None, file_format='mp3', - status_callback_url=None, status_callback_method='POST'): + recording_callback_url=None, recording_callback_method='POST'): mpc_id = self.__make_mpc_id(friendly_name, uuid) return self.client.request('POST', ('MultiPartyCall', mpc_id, 'Participant', participant_id, 'Record'), self.__clean_identifiers(to_param_dict(self.start_recording, locals())), diff --git a/plivo/version.py b/plivo/version.py index 0804d8b4..730561ba 100644 --- a/plivo/version.py +++ b/plivo/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = '4.21.0' +__version__ = '4.22.0' diff --git a/setup.py b/setup.py index 1b138d48..d1d04fee 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name='plivo', - version='4.21.0', + version='4.22.0', description='A Python SDK to make voice calls & send SMS using Plivo and to generate Plivo XML', long_description=long_description, url='https://github.com/plivo/plivo-python', diff --git a/tests/resources/test_multipartycalls.py b/tests/resources/test_multipartycalls.py index 7b609bf0..9407c6d2 100644 --- a/tests/resources/test_multipartycalls.py +++ b/tests/resources/test_multipartycalls.py @@ -418,16 +418,16 @@ def test_kick_MPC_participant(self): def test_start_recording(self): file_format = 'wav' - status_callback_url = 'https://plivo.com/status' + recording_callback_url = 'https://plivo.com/status' start_recording_response = self.client.multi_party_calls. \ - start_recording(friendly_name='Voice', file_format=file_format, status_callback_url=status_callback_url) + start_recording(friendly_name='Voice', file_format=file_format, recording_callback_url=recording_callback_url) self.__assert_requests(expected_url='https://api.plivo.com/v1/Account/MAXXXXXXXXXXXXXXXXXX/' 'MultiPartyCall/name_{}/Record/'.format('Voice'), expected_method='POST', expected_request_body={'file_format': 'wav', - 'status_callback_url': status_callback_url, - 'status_callback_method': 'POST'}, + 'recording_callback_url': recording_callback_url, + 'recording_callback_method': 'POST'}, actual_response=start_recording_response) def test_stop_recording(self): @@ -474,17 +474,17 @@ def test_get_participant(self): @with_response(200) def test_start_participant_recording(self): file_format = 'wav' - status_callback_url = "https://plivo.com/status" + recording_callback_url = "https://plivo.com/status" participant_id = 10 start_participant_recording_response = self.client.multi_party_calls. \ start_participant_recording(participant_id=participant_id, friendly_name='Voice', file_format=file_format, - status_callback_url=status_callback_url) + recording_callback_url=recording_callback_url) self.__assert_requests(expected_url='https://api.plivo.com/v1/Account/MAXXXXXXXXXXXXXXXXXX/MultiPartyCall' '/name_{}/Participant/{}/Record/'.format('Voice', participant_id), expected_method='POST', expected_request_body={'file_format': 'wav', - 'status_callback_url': status_callback_url, - 'status_callback_method': 'POST'}, + 'recording_callback_url': recording_callback_url, + 'recording_callback_method': 'POST'}, actual_response=start_participant_recording_response) def test_stop_participant_recording(self):