From 47d72e778e9e294125ea9c23e6b62bd9a3855e16 Mon Sep 17 00:00:00 2001 From: Chuck Sneed Date: Wed, 5 Apr 2023 15:11:11 -0500 Subject: [PATCH] More post options, wall --- RDramaAPIInterface.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/RDramaAPIInterface.py b/RDramaAPIInterface.py index 75e79bc..216bbf0 100644 --- a/RDramaAPIInterface.py +++ b/RDramaAPIInterface.py @@ -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.