Gets projects from the explore page. Keyword arguments: query (str): Specifies the tag of the explore page. To get the projects from the "All" tag, set this argument to "*". mode (str): Has to be one of these values: "trending", "popular" or
(
self, *, query: str = "*", mode: str = "trending", language: str = "en", limit: int = 40, offset: int = 0
)
| 648 | return commons.parse_object_list(response, project.Project, self) |
| 649 | |
| 650 | def explore_projects( |
| 651 | self, *, query: str = "*", mode: str = "trending", language: str = "en", limit: int = 40, offset: int = 0 |
| 652 | ) -> list[project.Project]: |
| 653 | """ |
| 654 | Gets projects from the explore page. |
| 655 | |
| 656 | Keyword arguments: |
| 657 | query (str): Specifies the tag of the explore page. |
| 658 | To get the projects from the "All" tag, set this argument to "*". |
| 659 | mode (str): Has to be one of these values: "trending", "popular" or "recent". |
| 660 | Defaults to "trending". |
| 661 | language (str): A language abbreviation, defaults to "en". |
| 662 | (Depending on the language used on the Scratch website, Scratch displays you different explore pages.) |
| 663 | limit (int): Max. amount of returned projects. |
| 664 | offset (int): Offset of the first returned project. |
| 665 | |
| 666 | Returns: |
| 667 | list<scratchattach.project.Project>: List that contains the explore page projects. |
| 668 | """ |
| 669 | response = commons.api_iterative( |
| 670 | f"https://api.scratch.mit.edu/explore/projects", |
| 671 | limit=limit, |
| 672 | offset=offset, |
| 673 | add_params=f"&language={language}&mode={mode}&q={query}", |
| 674 | ) |
| 675 | return commons.parse_object_list(response, project.Project, self) |
| 676 | |
| 677 | def search_studios( |
| 678 | self, *, query: str = "", mode: str = "trending", language: str = "en", limit: int = 40, offset: int = 0 |
no outgoing calls