Skip to content

Commit a5b0c84

Browse files
author
Ferdinand E. Silva
committed
fix documentation
1 parent 9153d42 commit a5b0c84

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

pastebin_python/pastebin.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
.. module:: pastebin
2+
.. module:: pastebin_python.pastebin
33
:synopsis: This module contains the main class to be instantiated to use pastebin.com functionality
44
55
.. moduleauthor:: Ferdinand Silva <[email protected]>
@@ -23,7 +23,7 @@ def __init__(self, **kwargs):
2323
2424
:param kwargs: keyword arguments to set settings that can be use to call pastebin.com API function
2525
:type kwargs: dict
26-
:returns: class -- PastebinPython
26+
:returns: class -- :class:`pastebin_python.pastebin.PastebinPython`
2727
2828
===========
2929
Example:
@@ -41,7 +41,7 @@ def __init__(self, **kwargs):
4141

4242
@property
4343
def api_user_key(self):
44-
"""This is where the api_user_key is stored after calling :func:`createAPIUserKey`
44+
"""This is where the api_user_key is stored after calling :meth:`pastebin_python.pastebin.createAPIUserKey`
4545
4646
:returns: str -- the api_user_key
4747
@@ -50,7 +50,7 @@ def api_user_key(self):
5050

5151
@property
5252
def api_user_paste_list(self):
53-
"""This where the list of pastes of the current user is stored after calling :func:`listUserPastes`
53+
"""This where the list of pastes of the current user is stored after calling :meth:`pastebin_python.pastebin.listUserPastes`
5454
5555
:returns: list -- current user pastes list
5656
@@ -71,7 +71,7 @@ def createPaste(self, api_paste_code, api_paste_name='', api_paste_format='', ap
7171
:param api_paste_expire_date: this sets the expiration date of your paste, values to be assign can be found at :mod:`pastebin_python.pastebin_constants`
7272
:type api_paste_expire_date: str
7373
:returns: str -- pastebin.com paste URL
74-
:raises: PastebinBadRequestException
74+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinBadRequestException`
7575
7676
.. note::
7777
@@ -94,7 +94,7 @@ def createPaste(self, api_paste_code, api_paste_name='', api_paste_format='', ap
9494
return self.__processPost(PASTEBIN_API_POST_URL, postData)
9595

9696
def createPasteFromFile(self, filename, api_paste_name='', api_paste_format='', api_paste_private='', api_paste_expire_date=''):
97-
"""Almost the same as :func:`createPaste` ,the only difference is that the value of *api_paste_code* came from the file you opened
97+
"""Almost the same as :meth:`pastebin_python.pastebin.createPaste` ,the only difference is that the value of *api_paste_code* came from the file you opened
9898
9999
:param filename: the full path of the file
100100
:type filename: str
@@ -107,7 +107,7 @@ def createPasteFromFile(self, filename, api_paste_name='', api_paste_format='',
107107
:param api_paste_expire_date: this sets the expiration date of your paste, values to be assign can be found at :mod:`pastebin_python.pastebin_constants`
108108
:type api_paste_expire_date: str
109109
:returns: str -- pastebin.com paste URL
110-
:raises: PastebinFileException
110+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinFileException`
111111
112112
.. note::
113113
@@ -131,9 +131,9 @@ def __processPost(self, url, data):
131131
:param url: the url of the pastebin.com **API**
132132
:type url: str
133133
:param data: the data to be POSTed to the pastebin.com **API**
134-
:type data: dic
134+
:type data: dict
135135
:returns: str -- the successfull output of the pastebin.com **API** if no exception raised
136-
:raises: PastebinBadRequestException, PastebinNoPastesException
136+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinBadRequestException`, :exc:`pastebin_python.pastebin_exceptions.PastebinNoPastesException`
137137
138138
"""
139139

@@ -156,7 +156,7 @@ def createAPIUserKey(self, api_user_name, api_user_password):
156156
:param api_user_password: this is the pastebin.com password
157157
:type api_user_password: str
158158
:returns: str -- unique user session key
159-
:raises: PastebinBadRequestException
159+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinBadRequestException`
160160
161161
.. note::
162162
@@ -180,11 +180,11 @@ def listUserPastes(self, api_results_limit=50):
180180
:param api_results_limit: this is not required but the min value should be 1 and the max value should be 1000
181181
:type api_results_limit: int
182182
:returns: list -- the list of of pastes in a dictionary type
183-
:raises: PastebinBadRequestException, PastebinNoPastesException
183+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinBadRequestException`, :exc:`pastebin_python.pastebin_exceptions.PastebinNoPastesException`
184184
185185
.. note::
186186
187-
Need to call the :func:`createAPIUserKey` first before calling this function
187+
Need to call the :meth:`pastebin_python.pastebin.createAPIUserKey` first before calling this function
188188
Pastes list will be stored to the private variable *__api_user_paste_list* and can be retrieve by the property *api_user_key*
189189
190190
"""
@@ -205,7 +205,7 @@ def listTrendingPastes(self):
205205
"""This will list the 18 currently trending pastes
206206
207207
:returns: list -- the 18 currently trending pastes in a dictionary format
208-
:raises: PastebinBadRequestException
208+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinBadRequestException`
209209
210210
"""
211211

@@ -222,7 +222,7 @@ def listTrendingPastes(self):
222222
def __parseUser(self, xmlString):
223223
"""This will parse the xml string returned by the function :func:`getUserInfos`
224224
225-
:param xmlString: this is the returned xml string from :func:`getUserInfos`
225+
:param xmlString: this is the returned xml string from :meth:`pastebin_python.pastebin.getUserInfos`
226226
:type xmlString: str
227227
:returns: list -- user info in a dictionary format
228228
@@ -247,7 +247,7 @@ def __parseUser(self, xmlString):
247247
def __parsePaste(self, xmlString):
248248
"""This will parse the xml string returned by the the function :func:`listUserPastes` or :func:`listTrendingPastes`
249249
250-
:param xmlString: this is the returned xml string from :func:`listUserPastes` or :func:`listTrendingPastes`
250+
:param xmlString: this is the returned xml string from :meth:`pastebin_python.pastebin.listUserPastes` or :meth:`pastebin_python.pastebin.listTrendingPastes`
251251
:type xmlString: str
252252
:returns: list -- pastes info in a dictionary format
253253
@@ -302,13 +302,13 @@ def __parseXML(self, xml, isPaste=True):
302302
def deletePaste(self, api_paste_key):
303303
"""This will delete pastes created by certain users
304304
305-
:param api_paste_key: this is the paste key that which you can get in the :func:`listUserPastes` function
305+
:param api_paste_key: this is the paste key that which you can get in the :meth:`pastebin_python.pastebin.listUserPastes` function
306306
:type api_paste_key: str
307307
:returns: bool -- True if the deletion is successfull else False
308308
309309
.. note::
310310
311-
Before calling this function, you need to call the :func:`createAPIUserKey` first then call the :func:`listUserPastes`
311+
Before calling this function, you need to call the :meth:`pastebin_python.pastebin.createAPIUserKey` first then call the :meth:`pastebin_python.pastebin.listUserPastes`
312312
313313
"""
314314
postData = {
@@ -333,11 +333,11 @@ def getUserInfos(self):
333333
"""You can obtain a users personal info and certain settings by calling this function
334334
335335
:returns: list -- user info in a dictionary format
336-
:raises: PastebinBadRequestException
336+
:raises: :exc:`pastebin_python.pastebin_exceptions.PastebinBadRequestException`
337337
338338
.. note::
339339
340-
You need to call the :func:`createAPIUserKey` before calling this function
340+
You need to call the :meth:`pastebin_python.pastebin.createAPIUserKey` before calling this function
341341
342342
"""
343343

pastebin_python/pastebin_constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
.. module:: pastebin_constants
3-
:synopsis: This module contains the constants that can be used in the :func:`pastebin_python.pastebin.PastebinPython.__processPost` , :func:`pastebin_python.pastebin.PastebinPython.createPaste` and :func:`pastebin_python.pastebin.PastebinPython.createPasteFromFile`
2+
.. module:: pastebin_python.pastebin_constants
3+
:synopsis: This module contains the constants that can be used in the :meth:`pastebin_python.pastebin.PastebinPython.__processPost` , :meth:`pastebin_python.pastebin.PastebinPython.createPaste` and :meth:`pastebin_python.pastebin.PastebinPython.createPasteFromFile`
44
55
.. moduleauthor:: Ferdinand Silva <[email protected]>
66

pastebin_python/pastebin_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
.. module:: pastebin_exceptions
2+
.. module:: pastebin_python.pastebin_exceptions
33
:synopsis: This module contains all of the exceptions
44
55
.. moduleauthor:: Ferdinand Silva <[email protected]>

pastebin_python/pastebin_formats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
.. module:: pastebin_formats
3-
:synopsis: This module contains constants that can be used in :func:`pastebin_python.pastebin.PastebinPython.createPaste` or :func:`pastebin_python.pastebin.PastebinPython.createPasteFromFile` in *api_paste_format* parameter
2+
.. module:: pastebin_python.pastebin_formats
3+
:synopsis: This module contains constants that can be used in :meth:`pastebin_python.pastebin.PastebinPython.createPaste` or :meth:`pastebin_python.pastebin.PastebinPython.createPasteFromFile` in *api_paste_format* parameter
44
55
.. moduleauthor:: Ferdinand Silva <[email protected]>
66

pastebin_python/pastebin_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
.. module:: pastebin_options
2+
.. module:: pastebin_python.pastebin_options
33
:synopsis: This module contains constants that can be used in *api_option*
44
55
.. moduleauthor:: Ferdinand Silva <[email protected]>

0 commit comments

Comments
 (0)