1"""Provide the GildableMixin class.""" 2from ....const import API_PATH 3 4 5class GildableMixin(object): 6 """Interface for classes that can be gilded.""" 7 8 def gild(self): 9 """Gild the author of the item. 10 11 .. note:: Requires the authenticated user to own reddit gold creddits. 12 Calling this method will consume one reddit gold creddit. 13 14 Example usage: 15 16 .. code:: python 17 18 comment = reddit.comment('dkk4qjd') 19 comment.gild() 20 21 submission = reddit.submission('8dmv8z') 22 submission.gild() 23 24 """ 25 self._reddit.post( 26 API_PATH["gild_thing"].format(fullname=self.fullname) 27 ) 28