Skip to content

Commit

Permalink
Update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
hemantapkh committed Jul 26, 2021
1 parent 9f36f15 commit a12f104
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ncellapp/ncell.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ncell(NcellApp):
"""This class contains the methods for using the features of ncell app.
Args:
token (string): [description]
token (string): The token of the account.
autoRefresh (bool, optional): True to automatically refresh the token after it expires, default is False.
afterRefresh (list, optional): List with two elements, first element is the module name and second element is the function name.
args (list, optional): List of the arguments to the afterRefresh function. __token__ is a special parameter which contains the refreshed token.
Expand All @@ -29,19 +29,19 @@ class ncell(NcellApp):
Example:
>>> from ncellapp import ncell
# Normal object of ncell class where the token expires after certain time.
# You should refresh the token manually after it expires and save the new token for later use.
>>> # Normal object of ncell class where the token expires after certain time.
>>> # You should refresh the token manually after it expires and save the new token for later use.
>>> account = ncell(token='TOKEN')
# In this type of object, the token is refreshed automatically after it expires.
>>> # In this type of object, the token is refreshed automatically after it expires.
>>> account = ncell(token='TOKEN', autoRefresh=True)
# In this type of object, the token is refreshed automatically after it expires and the afterRefresh function is called.
def showNewToken(token, name):
print(f'Hello {name}, the previous token is expired and the current token is {token}.')
>>> # In this type of object, the token is refreshed automatically after it expires and the afterRefresh function is called.
>>> def showNewToken(token, name):
>>> ... print(f'Hello {name}, the previous token is expired and the current token is {token}.')
#-> __name__ can be passed if the afterRefresh function is on the current module
#-> __token__ is a special parameter which contains the refreshed token.
>>> # __name__ can be passed if the afterRefresh function is on the current module.
>>> # __token__ is a special parameter which contains the refreshed token.
>>> account = ncell(token='TOKEN', autoRefresh=True, afterRefresh=[__name__, 'showNewToken'], args=['__token__', 'sir'])
"""
#: Ncell class contains the methods for using the features of ncell app
Expand Down

0 comments on commit a12f104

Please sign in to comment.