diff --git a/docs/rbx_upload.html b/docs/rbx_upload.html index 61549ef..92891cf 100644 --- a/docs/rbx_upload.html +++ b/docs/rbx_upload.html @@ -528,24 +528,26 @@ rbx_upload 292 293 async def get_collectible_item_id(self, asset_id: int) -> str | None: 294 """Look up the collectible item ID (UUID) for a given asset ID.""" -295 response = await self._http.post( -296 self._proxy_url("https://catalog.roblox.com/v1/catalog/items/details"), -297 json={"items": [{"itemType": "Asset", "id": asset_id}]}, -298 cookies=self._csrf_cookies, -299 ) -300 response.raise_for_status() -301 items = response.json().get("data", []) -302 return items[0].get("collectibleItemId") if items else None -303 -304 async def close(self): -305 """Close the underlying HTTP client.""" -306 await self._http.aclose() -307 -308 async def __aenter__(self): -309 return self -310 -311 async def __aexit__(self, *args): -312 await self.close() +295 csrf = await self._get_csrf_token() +296 response = await self._http.post( +297 self._proxy_url("https://catalog.roblox.com/v1/catalog/items/details"), +298 json={"items": [{"itemType": "Asset", "id": asset_id}]}, +299 headers={"X-CSRF-TOKEN": csrf}, +300 cookies=self._csrf_cookies, +301 ) +302 response.raise_for_status() +303 items = response.json().get("data", []) +304 return items[0].get("collectibleItemId") if items else None +305 +306 async def close(self): +307 """Close the underlying HTTP client.""" +308 await self._http.aclose() +309 +310 async def __aenter__(self): +311 return self +312 +313 async def __aexit__(self, *args): +314 await self.close() @@ -908,14 +910,16 @@ failures in the returned BatchResult.
293 async def get_collectible_item_id(self, asset_id: int) -> str | None: 294 """Look up the collectible item ID (UUID) for a given asset ID.""" -295 response = await self._http.post( -296 self._proxy_url("https://catalog.roblox.com/v1/catalog/items/details"), -297 json={"items": [{"itemType": "Asset", "id": asset_id}]}, -298 cookies=self._csrf_cookies, -299 ) -300 response.raise_for_status() -301 items = response.json().get("data", []) -302 return items[0].get("collectibleItemId") if items else None +295 csrf = await self._get_csrf_token() +296 response = await self._http.post( +297 self._proxy_url("https://catalog.roblox.com/v1/catalog/items/details"), +298 json={"items": [{"itemType": "Asset", "id": asset_id}]}, +299 headers={"X-CSRF-TOKEN": csrf}, +300 cookies=self._csrf_cookies, +301 ) +302 response.raise_for_status() +303 items = response.json().get("data", []) +304 return items[0].get("collectibleItemId") if items else None