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

Method set_body

scratchattach/site/project.py:371–381  ·  view source on GitHub ↗

Sets the project's contents You can use this to upload projects to the Scratch website. Returns a dict with Scratch's raw JSON API response. Args: project_body (scratchattach.ProjectBody): A ProjectBody object containing the contents of the project

(self, project_body: editor.Project)

Source from the content-addressed store, hash-verified

369 return self.raw_json()["meta"]["agent"]
370
371 def set_body(self, project_body: editor.Project):
372 """
373 Sets the project's contents You can use this to upload projects to the Scratch website.
374 Returns a dict with Scratch's raw JSON API response.
375
376 Args:
377 project_body (scratchattach.ProjectBody): A ProjectBody object containing the contents of the project
378 """
379 self._assert_permission()
380
381 return self.set_json(project_body.to_json())
382
383 def set_json(self, json_data):
384 """

Callers

nothing calls this directly

Calls 3

_assert_permissionMethod · 0.95
set_jsonMethod · 0.95
to_jsonMethod · 0.45

Tested by

no test coverage detected