Page MenuHomePhabricator

thank_revision() in site.py v2.0

Authored By
darthbhyrava
Jun 17 2016, 12:39 AM
Size
537 B
Referenced Files
None
Subscribers
None

thank_revision() in site.py v2.0

# Thanks API calls
@need_extension('Thanks')
def thank_revision(self, rev_id):
"""
Corresponding method to the 'action=thank' API action.
@param rev_id: Revision ID for the revision to be thanked.
@type rev_id: int
"""
token = self.tokens['csrf']
params = {'action': 'thank', 'format': 'json', 'rev': rev_id,
'token': token, 'source': 'pywikibot'}
req = self._request(parameters=params)
data = req.submit()
return data

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3801960
Default Alt Text
thank_revision() in site.py v2.0 (537 B)

Event Timeline