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

Method close

scratchattach/site/classroom.py:303–313  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

301 raise e
302
303 def close(self) -> None:
304 self._check_session()
305 response = requests.post(f"https://scratch.mit.edu/site-api/classrooms/close_classroom/{self.id}/",
306 headers=self._headers, cookies=self._cookies)
307
308 try:
309 response.json()
310
311 except Exception as e:
312 warnings.warn(f"{self._session} may not be authenticated to edit {self}")
313 raise e
314
315 def register_student(self, username: str, password: str = '', birth_month: Optional[int] = None,
316 birth_year: Optional[int] = None,

Callers 5

disconnectMethod · 0.45
handle_setMethod · 0.45
handle_handshakeMethod · 0.45
check_for_ip_banMethod · 0.45
stopMethod · 0.45

Calls 3

_check_sessionMethod · 0.95
postMethod · 0.80
jsonMethod · 0.80

Tested by

no test coverage detected