Update comments of python client

This commit is contained in:
geekerzp
2015-07-18 15:35:12 +08:00
parent ddfa713f55
commit 195c71da37
4 changed files with 84 additions and 147 deletions

View File

@@ -50,18 +50,15 @@ class {{classname}}(object):
{{{summary}}}
{{{notes}}}
SDK also supports asynchronous requests
in which you can define a `callback` function
to be passed along and invoked when receiving response:
This method makes a synchronous HTTP request by default.
To make an asynchronous HTTP request,
please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.{{nickname}}({{#allParams}}{{#required}}{{paramName}}, {{/required}}{{/allParams}}callback=callback_function)
This method makes a synchronous HTTP request by default.
To make an asynchronous HTTP request,
please define a `callback` function to be invoked when receiving the response.
:param callback function: The callback function
for asynchronous request. (optional)
{{#allParams}}