From 54b156b21752672a464386819770e9abb81b32ad Mon Sep 17 00:00:00 2001 From: sambyers Date: Mon, 21 Oct 2019 10:51:26 -0400 Subject: [PATCH 1/5] added bind methods section to quickstart --- docs/user/quickstart.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 1e6373e..ddddbef 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -468,6 +468,20 @@ contain all of the returned objects. >>> rooms_list = list(rooms_iterable) + +Extending the API with bound methods +------------------------------------ + +Extending the API is simple by binding your own methods to the top level API. By binding a method to +the WebexTeamsAPI, you can extend functionality and leverage all of the objects and quality of life +features. + +.. code-block:: python + >>> new_function(): + ... pass + >>> WebexTeamsAPI().new_function = new_function + >>> output = WebexTeamsAPI.new_function(params) + *Copyright (c) 2016-2019 Cisco and/or its affiliates.* From fd1053a48172db8809ac1cb55803aa6a5e3649fa Mon Sep 17 00:00:00 2001 From: sambyers Date: Mon, 21 Oct 2019 10:53:14 -0400 Subject: [PATCH 2/5] formatting --- docs/user/quickstart.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index ddddbef..f49ea7f 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -477,11 +477,13 @@ the WebexTeamsAPI, you can extend functionality and leverage all of the objects features. .. code-block:: python + >>> new_function(): ... pass >>> WebexTeamsAPI().new_function = new_function >>> output = WebexTeamsAPI.new_function(params) + *Copyright (c) 2016-2019 Cisco and/or its affiliates.* From 569ce6d3e315160930466c44b1134ca41d5ed800 Mon Sep 17 00:00:00 2001 From: sambyers Date: Mon, 21 Oct 2019 15:58:14 -0400 Subject: [PATCH 3/5] spelling and phrasing of binding methods --- docs/user/quickstart.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index f49ea7f..cb8014e 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -472,16 +472,16 @@ contain all of the returned objects. Extending the API with bound methods ------------------------------------ -Extending the API is simple by binding your own methods to the top level API. By binding a method to -the WebexTeamsAPI, you can extend functionality and leverage all of the objects and quality of life -features. +As the Webex Teams API is developed and features are added, it may be necessary to add functions to access those features. +Extending the API is simple by binding your own methods to the top level API instance. By binding a method, you can +extend functionality and leverage all of the objects and quality of life features of WebexTeamsAPI. .. code-block:: python - >>> new_function(): + >>> new_method(): ... pass - >>> WebexTeamsAPI().new_function = new_function - >>> output = WebexTeamsAPI.new_function(params) + >>> WebexTeamsAPI().new_method = new_method + >>> output = WebexTeamsAPI.new_method(params) *Copyright (c) 2016-2019 Cisco and/or its affiliates.* From a269b9f4e9bce9d8d6fd07413aa3f57ea231ec31 Mon Sep 17 00:00:00 2001 From: sambyers Date: Mon, 21 Oct 2019 16:03:43 -0400 Subject: [PATCH 4/5] added to binding methods section --- docs/user/quickstart.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index cb8014e..ab3f687 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -472,14 +472,15 @@ contain all of the returned objects. Extending the API with bound methods ------------------------------------ -As the Webex Teams API is developed and features are added, it may be necessary to add functions to access those features. -Extending the API is simple by binding your own methods to the top level API instance. By binding a method, you can -extend functionality and leverage all of the objects and quality of life features of WebexTeamsAPI. +As the Webex Teams API is developed and features are added, it may be necessary to extend the webexteamssdk to access those features. +Extending the API is simple by binding your own methods to the WebexTeamsAPI connection object. By binding a method, you can +extend functionality and leverage all of the objects and quality of life features of webexteamssdk. .. code-block:: python - >>> new_method(): - ... pass + >>> new_method(self, params): + ... json_obj = self._session.get('/example/action/' + params) + ... return json_obj >>> WebexTeamsAPI().new_method = new_method >>> output = WebexTeamsAPI.new_method(params) From 10e566c7030080921122dee626d768eecf7b39e1 Mon Sep 17 00:00:00 2001 From: sambyers Date: Mon, 21 Oct 2019 16:06:48 -0400 Subject: [PATCH 5/5] fixed up bound method example --- docs/user/quickstart.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index ab3f687..a5f4211 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -478,11 +478,13 @@ extend functionality and leverage all of the objects and quality of life feature .. code-block:: python - >>> new_method(self, params): - ... json_obj = self._session.get('/example/action/' + params) + >>> new_method(self, param): + ... json_obj = self._session.get('/example/action/' + param) ... return json_obj - >>> WebexTeamsAPI().new_method = new_method - >>> output = WebexTeamsAPI.new_method(params) + + >>> api = WebexTeamsAPI() + >>> api.new_method = new_method + >>> output = WebexTeamsAPI.new_method(param) *Copyright (c) 2016-2019 Cisco and/or its affiliates.*