@@ -9,7 +9,7 @@ Work with the Webex Teams APIs in Native Python!
9
9
------------------------------------------------
10
10
11
11
Sure, working with the Webex Teams APIs is easy (see
12
- `developer.ciscospark .com `_). They are RESTful, naturally structured,
12
+ `developer.webex .com `_). They are RESTful, naturally structured,
13
13
require only a simple Access Token for authentication, and the data is
14
14
elegantly represented in intuitive JSON. What could be easier?
15
15
@@ -47,16 +47,16 @@ Like I said, EASY. However, in use, the code can become rather repetitive...
47
47
- When requesting lists of items, you have to deal with pagination _
48
48
49
49
50
- Enter **webexteamssdk **, a simple API wrapper that wraps all of the Spark API
50
+ Enter **webexteamssdk **, a simple API wrapper that wraps all of the Webex Teams API
51
51
calls and returned JSON objects within native Python objects and methods.
52
52
53
53
With webexteamssdk, the above Python code can be consolidated to the following:
54
54
55
55
.. code-block :: python
56
56
57
- from webexteamssdk import CiscoSparkAPI
57
+ from webexteamssdk import WebexTeamsAPI
58
58
59
- api = CiscoSparkAPI ()
59
+ api = WebexTeamsAPI ()
60
60
try :
61
61
message = api.messages.create(' <room_id>' , text = ' <message_text>' )
62
62
print (" New message created, with ID:" , message.id)
@@ -67,10 +67,10 @@ With webexteamssdk, the above Python code can be consolidated to the following:
67
67
68
68
**webexteamssdk handles all of this for you: **
69
69
70
- + Reads your Spark access token from a ``SPARK_ACCESS_TOKEN `` environment
70
+ + Reads your Webex Teams access token from a ``WEBEX_TEAMS_ACCESS_TOKEN `` environment
71
71
variable
72
72
73
- + Wraps and represents all Spark API calls as a simple hierarchical tree of
73
+ + Wraps and represents all Webex Teams API calls as a simple hierarchical tree of
74
74
native-Python methods (with default arguments provided everywhere possible!)
75
75
76
76
+ If your Python IDE supports **auto-completion ** (like PyCharm _), you can
@@ -80,14 +80,14 @@ With webexteamssdk, the above Python code can be consolidated to the following:
80
80
access all of the object's attributes using native *dot.syntax *
81
81
82
82
+ **Automatic and Transparent Pagination! ** When requesting 'lists of objects'
83
- from Spark , requests for additional pages of responses are efficiently and
83
+ from Webex Teams , requests for additional pages of responses are efficiently and
84
84
automatically requested as needed
85
85
86
86
+ **Automatic Rate-Limit Handling ** Sending a lot of requests to Webex Teams?
87
- Don't worry; we have you covered. Spark will respond with a rate-limit
87
+ Don't worry; we have you covered. Webex Teams will respond with a rate-limit
88
88
response, which will automatically be caught and "handled" for you. Your
89
89
requests and script will automatically be "paused" for the amount of time
90
- specified by Spark , while we wait for the Spark rate-limit timer to cool
90
+ specified by Webex Teams , while we wait for the Webex Teams rate-limit timer to cool
91
91
down. After the cool-down, your request will automatically be retried, and
92
92
your script will continue to run as normal. Handling all of this requires
93
93
zero (0) changes to your code - you're welcome. 😎
@@ -103,9 +103,9 @@ All of this, combined, lets you do powerful things simply:
103
103
104
104
.. code-block :: python
105
105
106
- from webexteamssdk import CiscoSparkAPI
106
+ from webexteamssdk import WebexTeamsAPI
107
107
108
- api = CiscoSparkAPI ()
108
+ api = WebexTeamsAPI ()
109
109
110
110
# Find all rooms that have 'webexteamssdk Demo' in their title
111
111
all_rooms = api.rooms.list()
@@ -125,10 +125,10 @@ All of this, combined, lets you do powerful things simply:
125
125
126
126
# Post a message to the new room, and upload a file
127
127
api.messages.create(demo_room.id, text = " Welcome to the room!" ,
128
- files = [" https://developer.ciscospark .com/images/logo_spark_lg@256 .png" ])
128
+ files = [" https://www.webex .com/content/dam/wbx/us/ images/dg-integ/teams_icon .png" ])
129
129
130
130
131
- That's more than 6 Spark API calls in less than 23 lines of code (with comments
131
+ That's more than 6 Webex Teams API calls in less than 23 lines of code (with comments
132
132
and whitespace), and likely more than that since webexteamssdk handles
133
133
pagination _ for you automatically!
134
134
@@ -155,7 +155,7 @@ webexteamssdk License
155
155
156
156
157
157
.. _MIT Open Source License : https://opensource.org/licenses/MIT
158
- .. _developer.ciscospark .com : https://developer.ciscospark .com
159
- .. _pagination : https://developer.ciscospark .com/pagination.html
158
+ .. _developer.webex .com : https://developer.webex .com
159
+ .. _pagination : https://developer.webex .com/pagination.html
160
160
.. _PyCharm : https://www.jetbrains.com/pycharm/
161
161
0 commit comments