You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/migrate.rst
+79-3
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Migration
8
8
9
9
This *should* 🤞 be easy!
10
10
11
-
``webexpythonsdk`` is designed to be a drop-in replacement for the ``webexteamssdk`` package. The SDK interface and data objects are largely unchanged with only a few minor name changes.
11
+
The transition from `webexteamssdk` to `webexpythonsdk` is not entirely a "drop-in replacement" due to substantial changes in class structures and functionalities. This guide aims to clarify these changes and offer solutions to ease the migration process.
12
12
13
13
Major changes that you should be aware of:
14
14
@@ -17,7 +17,6 @@ Major changes that you should be aware of:
17
17
* The primary API object has changed from ``WebexTeamsAPI`` to ``WebexAPI``
18
18
19
19
20
-
21
20
---------------
22
21
Migration Guide
23
22
---------------
@@ -39,7 +38,9 @@ The following table summarizes the name changes that need to be made to migrate
39
38
40
39
*Note:* The old ``WEBEX_TEAMS_ACCESS_TOKEN`` environment variable should continue to work with the new package; however, you will receive a deprecation warning. It is recommended to update the environment variable name to ``WEBEX_ACCESS_TOKEN``.
41
40
42
-
**Doing a quick search-and-replace in your codebase should be all you need to do to migrate.**
41
+
42
+
43
+
**Doing a quick search-and-replace in your codebase will help when migrating.**
43
44
44
45
Detailed Steps
45
46
--------------
@@ -64,6 +65,80 @@ Detailed Steps
64
65
65
66
**Primary API Object:** Replace all instances of ``WebexTeamsAPI`` with ``WebexAPI``.
66
67
68
+
Key Changes For Adaptive Cards
69
+
------------------------------
70
+
71
+
Module and Class Changes
72
+
~~~~~~~~~~~~~~~~~~~~~~~~
73
+
74
+
The following table outlines the changes in module and class names:
Attributes now require specific enums for values, which are case-sensitive. For example:
109
+
110
+
- **Previous**: `TextBlock.color = "Light"`
111
+
- **New**: `TextBlock.color = Colors.light`
112
+
113
+
Refer to the `Adaptive Cards TextBlock documentation <https://adaptivecards.io/explorer/TextBlock.html>`_ for valid enum values.
114
+
115
+
Compatibility Solutions
116
+
-----------------------
117
+
118
+
Wrapper Classes
119
+
~~~~~~~~~~~~~~~
120
+
121
+
To facilitate backward compatibility, consider using the following wrapper classes:
122
+
123
+
.. code-block:: python
124
+
125
+
# Example wrapper for components.py
126
+
from webexpythonsdk.models.cards.card_elements import TextBlock, Image
127
+
from webexpythonsdk.models.cards.containers import Column, Fact
128
+
129
+
# Example wrapper for container.py
130
+
from webexpythonsdk.models.cards.containers import Container, ColumnSet, FactSet
131
+
132
+
Module Flag for Compatibility
133
+
-----------------------------
134
+
135
+
A module flag can be introduced to bypass the `validate_input` function where backward compatibility is needed. Ensure this flag is set before executing legacy code.
0 commit comments