| 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( |