Skip to content

Commit 5b40da0

Browse files
committed
Update docs
- Change Spark references to Webex Teams - Change location and instructions for obtaining a Personal Access Token - Simplify the methods-list table in the Quickstart - Add MalformedResponse and RateLimitWarning to the top-level package interface - Change autodoc_default_flags (deprecated) to autodoc_default_options
1 parent b92d460 commit 5b40da0

File tree

9 files changed

+170
-205
lines changed

9 files changed

+170
-205
lines changed

docs/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,13 @@
3636
pygments_style = 'sphinx'
3737

3838

39-
40-
autodoc_member_order = 'bysource'
41-
autodoc_default_flags = ['members', 'undoc-members']
39+
# autodoc_member_order = 'bysource'
40+
# autodoc_default_flags = ['members', 'undoc-members']
41+
autodoc_default_options = {
42+
'member-order': 'bysource',
43+
'members': None,
44+
'undoc-members': None,
45+
}
4246

4347

4448
todo_include_todos = True
-319 KB
Binary file not shown.

docs/images/personal_access_token.png

223 KB
Loading

docs/images/spark_access_token.png

-319 KB
Binary file not shown.

docs/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ webexteamssdk
1010

1111
Welcome to the docs! webexteamssdk is a *community developed* Pythonic
1212
wrapping of the Webex Teams APIs. The package represents all of the Cisco
13-
Spark API interactions via native Python tools. Making working with the Cisco
14-
Spark APIs in Python a *native* and *natural* experience.
13+
Webex Teams API interactions via native Python tools. Making working with the Cisco
14+
Webex Teams APIs in Python a *native* and *natural* experience.
1515

1616
**webexteamssdk helps you get things done faster.** We take
1717
care of the API semantics, and you can focus on writing your code.
@@ -20,10 +20,10 @@ With webexteamssdk, you can easily:
2020

2121
* Interact with the Webex Teams APIs in an interactive Python session
2222

23-
* Quickly create code that enables you get something done in Spark
23+
* Quickly create code that enables you get something done in Webex Teams
2424

25-
* Leverage the API wrapper to cleanly add Spark functionality to your project
26-
without having to write the boilerplate code for working with the Spark APIs
25+
* Leverage the API wrapper to cleanly add Webex Teams functionality to your project
26+
without having to write the boilerplate code for working with the Webex Teams APIs
2727

2828
To *dive in* and see how webexteamssdk makes your life better, check out the
2929
:ref:`Quickstart`!
@@ -59,19 +59,19 @@ What is Webex Teams?
5959
Check out the official `Webex Teams`_ website for more information and to
6060
create a free account!
6161

62-
Spark for Developers
63-
--------------------
62+
Webex Teams for Developers
63+
--------------------------
6464

6565
Leveraging the Webex Teams APIs and developing on top of the Webex Teams cloud
6666
is easy. Signup for a `free account`_ and then head over to the
67-
`Spark for Developers`_ website to learn more.
67+
`Webex Teams for Developers`_ website to learn more.
6868

6969

7070
*Copyright (c) 2016-2018 Cisco and/or its affiliates.*
7171

7272

7373
.. _free account: `Webex Teams`
74-
.. _Webex Teams: https://www.ciscospark.com/
75-
.. _Spark for Developers: https://developer.ciscospark.com/
74+
.. _Webex Teams: https://www.webex.com/products/teams/index.html
75+
.. _Webex Teams for Developers: https://developer.webex.com/
7676
.. _contribution: https://github.com/CiscoDevNet/webexteamssdk#contribution
7777
.. _webexteamssdk: https://github.com/CiscoDevNet/webexteamssdk

docs/user/api.rst

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ User API Doc
77
============
88

99

10-
CiscoSparkAPI
10+
WebexTeamsAPI
1111
=============
1212

13-
The :class:`CiscoSparkAPI` class is the main interface for the package. All of
14-
the Spark APIs (people, rooms, etc.) and their API endpoints have been wrapped
15-
and hierarchically organized underneath the :class:`CiscoSparkAPI` class.
13+
The :class:`WebexTeamsAPI` class is the main interface for the package. All of
14+
the Webex Teams APIs (people, rooms, etc.) and their API endpoints have been wrapped
15+
and hierarchically organized underneath the :class:`WebexTeamsAPI` class.
1616

17-
.. autoclass:: CiscoSparkAPI()
17+
.. autoclass:: WebexTeamsAPI()
1818
:members:
1919
:exclude-members: access_token, base_url, timeout
2020

21-
.. automethod:: CiscoSparkAPI.__init__
21+
.. automethod:: WebexTeamsAPI.__init__
2222

2323

2424
.. _people:
@@ -117,28 +117,10 @@ access_tokens
117117
.. autoclass:: webexteamssdk.api.access_tokens.AccessTokensAPI()
118118

119119

120-
.. _Exceptions:
121-
122-
Exceptions
123-
==========
124-
125-
.. autoexception:: webexteamssdkException()
126-
:show-inheritance:
127-
:members:
128-
129-
.. autoexception:: ApiError()
130-
:show-inheritance:
131-
:members:
120+
.. _Webex Teams Data Objects:
132121

133-
.. autoexception:: RateLimitError()
134-
:show-inheritance:
135-
:members:
136-
137-
138-
.. _Spark Data Objects:
139-
140-
Spark Data Objects
141-
==================
122+
Webex Teams Data Objects
123+
========================
142124

143125

144126
.. _Person:
@@ -258,4 +240,40 @@ Access Token
258240
:inherited-members:
259241

260242

243+
.. _Exceptions:
244+
245+
Exceptions
246+
==========
247+
248+
.. autoexception:: webexteamssdkException()
249+
:show-inheritance:
250+
:members:
251+
252+
.. autoexception:: AccessTokenError()
253+
:show-inheritance:
254+
:members:
255+
256+
.. autoexception:: ApiError()
257+
:show-inheritance:
258+
:members:
259+
260+
.. autoexception:: MalformedResponse()
261+
:show-inheritance:
262+
:members:
263+
264+
.. autoexception:: RateLimitError()
265+
:show-inheritance:
266+
:members:
267+
268+
269+
.. _Warnings:
270+
271+
Warnings
272+
========
273+
274+
.. autoexception:: RateLimitWarning()
275+
:show-inheritance:
276+
:members:
277+
278+
261279
*Copyright (c) 2016-2018 Cisco and/or its affiliates.*

docs/user/intro.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Work with the Webex Teams APIs in Native Python!
99
------------------------------------------------
1010

1111
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,
1313
require only a simple Access Token for authentication, and the data is
1414
elegantly represented in intuitive JSON. What could be easier?
1515

@@ -47,16 +47,16 @@ Like I said, EASY. However, in use, the code can become rather repetitive...
4747
- When requesting lists of items, you have to deal with pagination_
4848

4949

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
5151
calls and returned JSON objects within native Python objects and methods.
5252

5353
With webexteamssdk, the above Python code can be consolidated to the following:
5454

5555
.. code-block:: python
5656
57-
from webexteamssdk import CiscoSparkAPI
57+
from webexteamssdk import WebexTeamsAPI
5858
59-
api = CiscoSparkAPI()
59+
api = WebexTeamsAPI()
6060
try:
6161
message = api.messages.create('<room_id>', text='<message_text>')
6262
print("New message created, with ID:", message.id)
@@ -67,10 +67,10 @@ With webexteamssdk, the above Python code can be consolidated to the following:
6767
6868
**webexteamssdk handles all of this for you:**
6969

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
7171
variable
7272

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
7474
native-Python methods (with default arguments provided everywhere possible!)
7575

7676
+ 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:
8080
access all of the object's attributes using native *dot.syntax*
8181

8282
+ **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
8484
automatically requested as needed
8585

8686
+ **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
8888
response, which will automatically be caught and "handled" for you. Your
8989
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
9191
down. After the cool-down, your request will automatically be retried, and
9292
your script will continue to run as normal. Handling all of this requires
9393
zero (0) changes to your code - you're welcome. 😎
@@ -103,9 +103,9 @@ All of this, combined, lets you do powerful things simply:
103103

104104
.. code-block:: python
105105
106-
from webexteamssdk import CiscoSparkAPI
106+
from webexteamssdk import WebexTeamsAPI
107107
108-
api = CiscoSparkAPI()
108+
api = WebexTeamsAPI()
109109
110110
# Find all rooms that have 'webexteamssdk Demo' in their title
111111
all_rooms = api.rooms.list()
@@ -125,10 +125,10 @@ All of this, combined, lets you do powerful things simply:
125125
126126
# Post a message to the new room, and upload a file
127127
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"])
129129
130130
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
132132
and whitespace), and likely more than that since webexteamssdk handles
133133
pagination_ for you automatically!
134134

@@ -155,7 +155,7 @@ webexteamssdk License
155155

156156

157157
.. _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
160160
.. _PyCharm: https://www.jetbrains.com/pycharm/
161161

0 commit comments

Comments
 (0)