| 457 | return commons.parse_object_list(response, comment.Comment, self._session) |
| 458 | |
| 459 | def comment_replies(self, *, comment_id, limit=40, offset=0): |
| 460 | response = commons.api_iterative( |
| 461 | f"https://api.scratch.mit.edu/users/{self.author_name}/projects/{self.id}/comments/{comment_id}/replies/", |
| 462 | limit=limit, |
| 463 | offset=offset, |
| 464 | add_params=f"&cachebust={random.randint(0, 9999)}", |
| 465 | _headers=self._headers, |
| 466 | cookies=self._cookies, |
| 467 | ) |
| 468 | for x in response: |
| 469 | x["parent_id"] = comment_id |
| 470 | x["source"] = "project" |
| 471 | x["source_id"] = self.id |
| 472 | return commons.parse_object_list(response, comment.Comment, self._session) |
| 473 | |
| 474 | def comment_by_id(self, comment_id): |
| 475 | """ |