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

Method set_fields

scratchattach/site/studio.py:483–494  ·  view source on GitHub ↗

Sets fields. Uses the scratch.mit.edu/site-api PUT API.

(self, fields_dict)

Source from the content-addressed store, hash-verified

481 return None
482
483 def set_fields(self, fields_dict):
484 """
485 Sets fields. Uses the scratch.mit.edu/site-api PUT API.
486 """
487 self._assert_auth()
488 requests.put(
489 f"https://scratch.mit.edu/site-api/galleries/all/{self.id}/",
490 headers=headers,
491 cookies=self._cookies,
492 data=json.dumps(fields_dict),
493 timeout=10,
494 )
495
496
497 def set_description(self, new):

Callers 2

set_descriptionMethod · 0.95
set_titleMethod · 0.95

Calls 2

putMethod · 0.80
_assert_authMethod · 0.45

Tested by

no test coverage detected