Skip to content

Commit ce643de

Browse files
authored
Merge pull request #89 from sambyers/master
Adding section to quickstart on binding methods to extend sdk
2 parents e5552b3 + 10e566c commit ce643de

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/user/quickstart.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,25 @@ contain all of the returned objects.
468468
>>> rooms_list = list(rooms_iterable)
469469
470470
471+
472+
Extending the API with bound methods
473+
------------------------------------
474+
475+
As the Webex Teams API is developed and features are added, it may be necessary to extend the webexteamssdk to access those features.
476+
Extending the API is simple by binding your own methods to the WebexTeamsAPI connection object. By binding a method, you can
477+
extend functionality and leverage all of the objects and quality of life features of webexteamssdk.
478+
479+
.. code-block:: python
480+
481+
>>> new_method(self, param):
482+
... json_obj = self._session.get('/example/action/' + param)
483+
... return json_obj
484+
485+
>>> api = WebexTeamsAPI()
486+
>>> api.new_method = new_method
487+
>>> output = WebexTeamsAPI.new_method(param)
488+
489+
471490
*Copyright (c) 2016-2019 Cisco and/or its affiliates.*
472491

473492

0 commit comments

Comments
 (0)