Page MenuHomePhabricator
Paste P3243

thank_revision() in v2.0

Authored by darthbhyrava on Jun 14 2016, 3:44 PM.
# Thanks API calls
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