Skip to content

Commit

Permalink
[CallAutomation] Some API updates (#31026)
Browse files Browse the repository at this point in the history
* start_recording overloads

* Some cleanup

* Removed CallInvite

* Fixed play media

* Removed six

* Fixed type hint

* Fixed type hint

* Pylint happy

* Some simple refactoring

* Make sure kwargs are popped

* More tests

* Fix import

* Fix tests

* Review feedback

* Pylint

* Sync shared directory

* Update changelog

* Typo
  • Loading branch information
annatisch authored Jul 24, 2023
1 parent e1da089 commit 17c3695
Show file tree
Hide file tree
Showing 41 changed files with 1,428 additions and 1,050 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
- Send DTMF tones to a participant in the call.
- Mute participants in the call.

### Other Changes
- The models `ServerCallLocator` and `GroupCallLocator` have been deprecated, and the ID values can now be passed directly into `CallAutomationClient.start_recording` as keyword arguments.
- The model `CallInvite` has been deprecated and now the target `CommunicationIdentifier` and associated properties can be passed directly into `create_call`, `redirect_call` and `add_participant`.
- The method `CallAutomationClient.create_group_call` has been deprecated, this can now be achieved by passing a list of `CommunicationIdentifier`s into `create_call`.
- The method `CallConnectionClient.play_media_to_all` has been deprecated, this can now be achieved as the default behaviour of `play_media`.

## 1.0.0 (2023-06-14)
Call Automation enables developers to build call workflows. Personalise customer interactions by listening to call events and take actions based on your business logic. For more information, please see the [README][read_me].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import warnings

from ._version import VERSION
from ._call_automation_client import CallAutomationClient
from ._call_connection_client import CallConnectionClient
from ._models import (
CallConnectionProperties,
CallInvite,
ServerCallLocator,
GroupCallLocator,
FileSource,
TextSource,
SsmlSource,
Expand Down Expand Up @@ -54,9 +53,6 @@
"CallConnectionClient",

# models for input
"CallInvite",
"ServerCallLocator",
"GroupCallLocator",
"FileSource",
"TextSource",
"SsmlSource",
Expand Down Expand Up @@ -98,3 +94,29 @@
"Gender"
]
__version__ = VERSION


def __getattr__(name):
if name == 'CallInvite':
warnings.warn(
"CallInvite is deprecated and should not be used. Please pass in keyword arguments directly.",
DeprecationWarning
)
from ._models import CallInvite
return CallInvite
if name == 'GroupCallLocator':
warnings.warn(
"GroupCallLocator is deprecated and should not be used. Please pass in 'group_call_id' directly.",
DeprecationWarning
)
from ._models import GroupCallLocator
return GroupCallLocator
if name == 'ServerCallLocator':
warnings.warn(
"ServerCallLocator is deprecated and should not be used. Please pass in 'server_call_id' directly.",
DeprecationWarning
)
from ._models import ServerCallLocator
return ServerCallLocator

raise AttributeError(f"module 'azure.communication.callautomation' has no attribute {name}")
Loading

0 comments on commit 17c3695

Please sign in to comment.