MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / report_comment

Method report_comment

scratchattach/site/user.py:996–1009  ·  view source on GitHub ↗

Reports a comment by its ID to the Scratch team. You can only use this function if this object was created using :meth:`scratchattach.session.Session.connect_user` Args: comment_id: The id of the comment that should be reported

(self, *, comment_id)

Source from the content-addressed store, hash-verified

994 )
995
996 def report_comment(self, *, comment_id):
997 """
998 Reports a comment by its ID to the Scratch team. You can only use this function if this object was created using :meth:`scratchattach.session.Session.connect_user`
999
1000 Args:
1001 comment_id: The id of the comment that should be reported
1002 """
1003 self._assert_auth()
1004 return requests.post(
1005 f"https://scratch.mit.edu/site-api/comments/user/{self.username}/rep/",
1006 headers=headers,
1007 cookies=self._cookies,
1008 data=json.dumps({"id": str(comment_id)}),
1009 )
1010
1011 def comments(self, *, page=1) -> list[comment.Comment] | None:
1012 """

Callers 1

reportMethod · 0.45

Calls 2

postMethod · 0.80
_assert_authMethod · 0.45

Tested by

no test coverage detected