----- | Services | -----
local HttpService = game:GetService("HttpService")
local ServerStorage = game:GetService("ServerStorage")
local RunService = game:GetService("RunService")
local MarketplaceService = game:GetService("MarketplaceService")
----- | Variables | -----
local field = {}; field.__index = field
----- | Methods | -----
function field.getExperienceInfo()
local ExperienceDetails = HttpService:JSONDecode(HttpService:GetAsync(`https://games.roproxy.com/v1/games?universeIds={game.GameId}`))
local ExperienceVotes = HttpService:JSONDecode(HttpService:GetAsync("https://games.roproxy.com/v1/games/"..game.GameId.."/votes"))
local ExperienceBadges = HttpService:JSONDecode(HttpService:GetAsync(`https://badges.roproxy.com/v1/universes/{game.GameId}/badges?limit=50&sortOrder=Asc`))
if ExperienceDetails == nil then return end
ExperienceDetails = ExperienceDetails["data"][1]
ExperienceBadges = ExperienceBadges["data"]
if ExperienceDetails == nil then return end
return {
["Thumbnail"] = "rbxassetid://"..MarketplaceService:GetProductInfo(game.PlaceId).IconImageAssetId,
["Name"] = ExperienceDetails.name or "N/A",
["PlaceId"] = game.PlaceId or "N/A",
["UniverseId"] = game.GameId or "N/A",
["Description"] = ExperienceDetails.description,
["Voice Chat"] = false,
["Active"] = ExperienceDetails.playing,
["Visits"] = ExperienceDetails.visits or "N/A",
["Favorites"] = ExperienceDetails.favoritedCount or "N/A",
["Genre"] = ExperienceDetails.genre or "N/A",
["Playing"] = ExperienceDetails.playing or "N/A",
["PlaceVersion"] = game.PlaceVersion or "N/A",
["Updated"] = DateTime.fromIsoDate(ExperienceDetails.updated):ToUniversalTime() or "N/A",
["Created"] = DateTime.fromIsoDate(ExperienceDetails.created):ToUniversalTime() or "N/A",
["Creator"] = ExperienceDetails["creator"],
["Badges"] = ExperienceBadges or "N/A",
["Likes"] = ExperienceVotes.upVotes or "N/A",
["Dislikes"] = ExperienceVotes.downVotes or "N/A",
}
end
return field
@okfalse Sorry to revive this topic, but I’m trying to understand how do I set up my own API that will request all gamepasess from all players and send it in one packet, assuming this because you can’t spam request, do i need to use node.js or smething along the lines of that, just give me the idea/run through of the process thanks!
Any solutions to getting more real-time responses that aren’t cached by Roproxy? I tried hosting my own web service but I was having my own issues with that
This is occurring for me as well, but only occurs in-experience (requests always work fine in studio). @okfalse, can we get an answer as to why this is the case, and potentially a fix to this issue? At least in my cases, this error is very frequent and causes RoProxy to be nearly unusable for me.