Added additional purchase methods spec

This commit is contained in:
Walter 2025-03-10 02:20:52 +01:00
parent 0a2c48424e
commit d3d1d6b5e6
4 changed files with 54 additions and 2 deletions

View File

@ -0,0 +1,26 @@
"""
headers:
- csrf-token
- x-bound-auth* (optional)
cookies: probably .roblosecurity
https://apis.roblox.com/cloud/v2/avatar-marketplace-orders?idempotencyKey.key=35440611-15f9-4986-a2dc-1fe7f0a8f697
{
"purchasingUser": "users/1337",
"context": {
"productSurface": "SHOPPING_CART_WEB"
},
"fulfillmentGroups": [{
"strategy": "BEST_EFFORT",
"lineItems": [{
"collectibleProductId": "1741e256-ae5b-4bf5-aef2-f6f5f3436e57",
"agreedPriceRobux": 0
}]
}]
}
"""

View File

@ -40,4 +40,7 @@ class Purchaser:
def get_asset_metadata(self, asset_id):
return self.request(url=f"https://catalog.roblox.com/v1/catalog/items/{asset_id}/details",
params={"itemType": "asset"}).json()
params={"itemType": "asset"}).json()
def get_asset_metadata_extended(self, asset_id):
return self.request(url=f"https://economy.roblox.com/v2/assets/{asset_id}/details").json()

View File

@ -42,6 +42,5 @@ class EconomyV1(Purchaser):
"expectedPrice": 0,
"expectedSellerId": creator_target_id
})
data = r.json()
print(data, r.headers)

24
methods/marketplace_v1.py Normal file
View File

@ -0,0 +1,24 @@
"""
Buying this asset went like this:
asset_id: 2493587489
headers:
- csrf-token
- x-bound-auth* (optional)
POST https://apis.roblox.com/marketplace-sales/v1/item/8387139d-2fdf-4534-849c-93e7e84f319f/purchase-item
{
"collectibleItemId": "8387139d-2fdf-4534-849c-93e7e84f319f",
"expectedCurrency": 1,
"expectedPrice": 0,
"expectedPurchaserId": "1337",
"expectedPurchaserType": "User",
"expectedSellerId": 1,
"expectedSellerType": "User",
"idempotencyKey": "896b20d0-a738-45af-91b0-d9eb4e0765ae",
"collectibleProductId": "89bfd74b-cdab-4031-9aa8-ab2c69cc68c7"
}
"""