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

Method get_json

scratchattach/site/project.py:305–318  ·  view source on GitHub ↗

Downloads the project json and returns it as a string

(self)

Source from the content-addressed store, hash-verified

303
304 @deprecated("Use raw_json instead")
305 def get_json(self) -> str:
306 """
307 Downloads the project json and returns it as a string
308 """
309 try:
310 self.update()
311 response = requests.get(
312 f"https://projects.scratch.mit.edu/{self.id}?token={self.project_token}",
313 timeout=10,
314 )
315 return response.text
316
317 except Exception as exc:
318 raise (exceptions.FetchError("Method only works for projects created with Scratch 3")) from exc
319
320 def body(self) -> editor.Project:
321 """

Callers

nothing calls this directly

Calls 2

updateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected