Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit f8d4474

Browse files
committed
Adding login checks
1 parent 46d389c commit f8d4474

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

imgur-python/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def get_comment_replies(self, comment_id):
301301
return replies
302302

303303
def post_comment_reply(self, comment_id, image_id, comment):
304+
self.logged_in()
304305
data = {
305306
'image_id': image_id,
306307
'comment': comment
@@ -309,9 +310,11 @@ def post_comment_reply(self, comment_id, image_id, comment):
309310
return self.make_request('POST', 'comment/%d' % comment_id, data)
310311

311312
def comment_vote(self, comment_id, vote, toggle=True):
313+
self.logged_in()
312314
toggle_behavior = 1 if toggle else 0
313315

314316
return self.make_request('POST', 'comment/%d/vote/%s?toggle=%d' % (comment_id, vote, toggle_behavior))
315317

316318
def comment_report(self, comment_id):
319+
self.logged_in()
317320
return self.make_request('POST', 'comment/%d/report' % comment_id)

0 commit comments

Comments
 (0)