mirror of
https://github.com/simon987/parler-tricks.git
synced 2025-12-19 17:24:54 +00:00
Initial commit
This commit is contained in:
17
parler/violation.py
Normal file
17
parler/violation.py
Normal file
@@ -0,0 +1,17 @@
|
||||
class ViolationAPI:
|
||||
def __init__(self, session, root_url="http://api.parler.com"):
|
||||
self.root_url = root_url
|
||||
self.s = session
|
||||
|
||||
def create_report(self, *args, **kwargs):
|
||||
return self.s.post("{}/v3/contentModeration/report".format(self.root_url), *args, **kwargs)
|
||||
|
||||
def get_details_for_report_with_id(self, report, *args, **kwargs):
|
||||
return self.s.get("{}/v3/contentModeration/report/{}".format(self.root_url, report), *args, **kwargs)
|
||||
|
||||
# startPage, limit
|
||||
def get_list_of_reports(self, *args, **kwargs):
|
||||
return self.s.get("{}/v3/contentModeration/reports".format(self.root_url), *args, **kwargs)
|
||||
|
||||
def get_stats(self, *args, **kwargs):
|
||||
return self.s.get("{}/v3/contentModeration/stats".format(self.root_url), *args, **kwargs)
|
||||
Reference in New Issue
Block a user