More post options, wall

master
Chuck Sneed 2023-04-05 15:11:11 -05:00
parent 6ba70f2540
commit 47d72e778e
1 changed files with 5 additions and 2 deletions

View File

@ -44,9 +44,9 @@ class RDramaAPIInterface:
def get_my_badges(self):
return self.get_me()['badges']
def make_post(self, title, submission_url, body):
def make_post(self, title, submission_url, body, notify = True, hole=None):
url=f"{self.protocol}://{self.site}/submit"
return self.post(url, data={'title' : title, 'url': submission_url, 'body': body})
return self.post(url, data={'title' : title, 'url': submission_url, 'body': body, 'notify': "on" if notify else "off", "sub":hole})
@lru_cache(maxsize=None)
def get_me(self):
@ -87,6 +87,9 @@ class RDramaAPIInterface:
def reply_to_post(self, post_id, message):
return self.reply_to_comment(f"p_{post_id}", post_id, message)
def comment_on_wall(self, user_id, message):
return self.reply_to_comment(f"u_{user_id}", None, message)
'''
Gets "all" comments.