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

Method backpack

scratchattach/site/session.py:990–1000  ·  view source on GitHub ↗

Lists the assets that are in the backpack of the user associated with the session. Returns: list : List that contains the backpack items

(self, limit: int = 20, offset: int = 0)

Source from the content-addressed store, hash-verified

988 return classes
989
990 def backpack(self, limit: int = 20, offset: int = 0) -> list[backpack_asset.BackpackAsset]:
991 """
992 Lists the assets that are in the backpack of the user associated with the session.
993
994 Returns:
995 list<backpack_asset.BackpackAsset>: List that contains the backpack items
996 """
997 data = commons.api_iterative(
998 f"https://backpack.scratch.mit.edu/{self._username}", limit=limit, offset=offset, _headers=self._headers
999 )
1000 return commons.parse_object_list(data, backpack_asset.BackpackAsset, self)
1001
1002 def delete_from_backpack(self, backpack_asset_id) -> backpack_asset.BackpackAsset:
1003 """

Callers 1

test_backpackFunction · 0.80

Calls

no outgoing calls

Tested by 1

test_backpackFunction · 0.64