More post options, wall
parent
6ba70f2540
commit
47d72e778e
|
@ -44,9 +44,9 @@ class RDramaAPIInterface:
|
||||||
def get_my_badges(self):
|
def get_my_badges(self):
|
||||||
return self.get_me()['badges']
|
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"
|
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)
|
@lru_cache(maxsize=None)
|
||||||
def get_me(self):
|
def get_me(self):
|
||||||
|
@ -87,6 +87,9 @@ class RDramaAPIInterface:
|
||||||
|
|
||||||
def reply_to_post(self, post_id, message):
|
def reply_to_post(self, post_id, message):
|
||||||
return self.reply_to_comment(f"p_{post_id}", 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.
|
Gets "all" comments.
|
||||||
|
|
Loading…
Reference in New Issue