I have a script that will get the newest items on roblox. The issue is it is giving me all the catagories and I only want limited items even though I set the catagories and subcatagories to their correct numbers. I dont understand why it is giving me non limited items.
Script:
local httpservice= game:GetService('HttpService')
local url = "https://catalog.roproxy.com/v2/search/items/details?Catagory=2&SortType=3&SortAggregation=5&Limit=10"
local response = httpservice:GetAsync(url)
local data = httpservice:JSONDecode(response)
print(data)
This is pretty slow though; and theres probably a way to bulk get all of this instead of constantly pinging roproxy that I don’t know about. But its functional, just try not to get rate limited.
local HttpsService = game:GetService('HttpService')
local CatalogURL = "https://catalog.roproxy.com/v2/search/items/details?Catagory=2&SortType=3&SortAggregation=5&Limit=10"
local EconomyURL = "https://economy.roproxy.com/v2/assets/%d/details"
local CatalogDecode = HttpsService:JSONDecode(HttpsService:GetAsync(CatalogURL))
function IsLimited(Id: number): boolean
local Endpoint = EconomyURL:format(Id)
local EconomyResponse = HttpsService:JSONDecode(HttpsService:GetAsync(Endpoint))
print(EconomyResponse)
return EconomyResponse.IsLimited
end
local FinalizedData = {}
for i, ItemData in CatalogDecode.data do
table.insert(FinalizedData, {ItemId = ItemData.id, IsLimited = IsLimited(ItemData.id)})
end
print("Finalized Data: ", FinalizedData)