Price Floor API - Thundermaker300/RoSharp GitHub Wiki
The Price Floor APIs within the Marketplace API allows accessing data about Roblox price floors.
using RoSharp;
using RoSharp.API;
using RoSharp.Enums;
ReadOnlyDictionary<AssetType, int> priceFloors = await MarketplaceAPI.GetPriceFloorsAsync(<session>);
foreach (KeyValuePair<AssetType, int> floor in priceFloors)
{
Console.WriteLine($"{floor.Key} : {floor.Value}");
}
This code sample will retrieve and log the price floor for all asset types that have a price floor.
The session is required as price floor data is unavailable without an authenticated user. However, the session parameter can be set to null
if a Global Session is being used.
using RoSharp;
using RoSharp.API;
using RoSharp.Enums;
int? cost = await MarketplaceAPI.GetPriceFloorForTypeAsync(<assetType>, <session>);
Console.WriteLine(cost);
This code sample will retrieve and log the price floor for the given asset type. Note that the return value is a nullable int since some asset types (eg. Animations) do not have a price floor.
The session is required as price floor data is unavailable without an authenticated user. However, the session parameter can be set to null
if a Global Session is being used.