Sets the user's featured project. You can only use this function if this object was created using :meth:`scratchattach.session.Session.connect_user` Args: project_id: Project id of the project that should be set as featured Keyword Args: label: The
(self, project_id, *, label="")
| 799 | ) |
| 800 | |
| 801 | def set_featured(self, project_id, *, label=""): |
| 802 | """ |
| 803 | Sets the user's featured project. You can only use this function if this object was created using :meth:`scratchattach.session.Session.connect_user` |
| 804 | |
| 805 | Args: |
| 806 | project_id: Project id of the project that should be set as featured |
| 807 | |
| 808 | Keyword Args: |
| 809 | label: The label that should appear above the featured project on the user's profile (Like "Featured project", "Featured tutorial", "My favorite things", etc.) |
| 810 | """ |
| 811 | self._assert_permission() |
| 812 | requests.put( |
| 813 | f"https://scratch.mit.edu/site-api/users/all/{self.username}/", |
| 814 | headers=self._json_headers, |
| 815 | cookies=self._cookies, |
| 816 | json={"featured_project": int(project_id), "featured_project_label": label}, |
| 817 | ) |
| 818 | |
| 819 | def set_forum_signature(self, text): |
| 820 | """ |
nothing calls this directly
no test coverage detected