Repositories | Polyback | Log in to see private repositories
668 bytes | parent directory
<?php require $_SERVER['DOCUMENT_ROOT'].'/api/private/core.php';
// What a place sells, for MarketplaceService:GetDeveloperProductsAsync(). Anybody may look.
// ?placeId=9 -> {"success":true,"products":[{"ProductId","Name","Description","PriceInRobux"}]}
// (the API keeps Roblox's names; the prices are Pizzas)
use pizzaboxer\ProjectPolygon\Products;
header("content-type: application/json");
$list = [];
foreach (Products::ForPlace((int) ($_GET["placeId"] ?? 0)) as $p)
$list[] = ["ProductId" => (int) $p->ID, "Name" => $p->Name, "Description" => $p->Description, "PriceInRobux" => (int) $p->Price];
die(json_encode(["success" => true, "products" => $list]));