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

Method set_thumbnail

scratchattach/site/classroom.py:220–224  ·  view source on GitHub ↗
(self, thumbnail: bytes)

Source from the content-addressed store, hash-verified

218 f"Classroom {self} has no associated session. Use session.connect_classroom() instead of sa.get_classroom()")
219
220 def set_thumbnail(self, thumbnail: bytes) -> None:
221 self._check_session()
222 requests.post(f"https://scratch.mit.edu/site-api/classrooms/all/{self.id}/",
223 headers=self._headers, cookies=self._cookies,
224 files={"file": thumbnail})
225
226 def set_description(self, desc: str) -> None:
227 self._check_session()

Callers

nothing calls this directly

Calls 2

_check_sessionMethod · 0.95
postMethod · 0.80

Tested by

no test coverage detected