If what i send didn’t work, I’ll just make it myself using python and make my own web proxy, tell me if i should
I guess you should I’m getting this error
HTTP 500 (Internal Server Error)
local httpService = game:GetService("HttpService")
local url = "https://api.roproxy.com/universes/get-universe-containing-place?placeid = 3830638181"
local data = httpService:GetAsync(url)
local upVotes = data.upVotes
local downVotes = data.downVotes
print(upVotes)
print(downVotes)
Alright then, when I wake up, I’all make a proxy server for you to use and make a code for it! Imma go sleep now, goodnight
goodnight, Thanks for the help so far.
Your welcome! Hopefully this problem will end after I wake up!
because you have space on “=”
local httpService = game:GetService('HttpService')
local placeId = 0000000000 --change this to placeId you want to get of the votes
local universeId = "https://api.roproxy.com/universes/get-universe-containing-place?placeid="..placeId -- gets universeId
local success, result = pcall(function() -- we put in pcall if somehow failed to get
return httpService:GetAsync(universeId)
end)
if success then
if result then
local decode = httpService:JSONDecode(result) -- decode to lua
local gameVotes = "https://games.roproxy.com/v1/games/votes?universeIds=%.f" -- format the string
local success2, result2 = pcall(function()
return httpService:GetAsync(gameVotes:format(decode['UniverseId']))
end)
if success2 then
if result2 then
local decode2 = httpService:JSONDecode(result2)
print(decode2['data'][1]['upVotes'])
print(decode2['data'][1]['downVotes'])
end
else
warn(result2) -- warn if it gets failed
end
end
else
warn(result)
end
I’m getting this error now
HTTP 400 (Bad Request)
are you sure the place id is correct?
It worked, Thanks for your help also Thanks @msix29 for helping.
Also @cristinaceline1 I have a question? How do I update it once it changes? because I don’t wanna keep looping.
You can’t really detect when it changes, but you can just make another http request every few minutes or so (60+ seconds recommended).
What would happen If I make it every second?
You’ll likely get an error like HTTP 429 (Too Many Requests)
.
Oh, Okay thanks for the help!