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

Method comment_replies

scratchattach/site/studio.py:167–174  ·  view source on GitHub ↗
(self, *, comment_id, limit=40, offset=0)

Source from the content-addressed store, hash-verified

165 return commons.parse_object_list(response, comment.Comment, self._session)
166
167 def comment_replies(self, *, comment_id, limit=40, offset=0) -> list[comment.Comment]:
168 response = commons.api_iterative(
169 f"https://api.scratch.mit.edu/studios/{self.id}/comments/{comment_id}/replies", limit=limit, offset=offset, add_params=f"&cachebust={random.randint(0,9999)}")
170 for x in response:
171 x["parent_id"] = comment_id
172 x["source"] = "studio"
173 x["source_id"] = self.id
174 return commons.parse_object_list(response, comment.Comment, self._session)
175
176 def comment_by_id(self, comment_id):
177 r = requests.get(

Callers 1

repliesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected