I have no idea how to return the table of functions for the random.org api. Can anyone help?
COMMUNITY QUESTION
Httpservice random.org api help?
1 answer
You could have read the page, it's well documented.
Basically you set the url like
http://www.random.org/integers/?min=1&max=100&num=25&base=10&format=plain&rnd=new&col=1
All parameters are self explanatory. So
function getRandom(mi, ma, n)
local http = game:GetService("HttpService")
return http:GetAsync(("http://www.random.org/integers/?min=%d&max=%d&num=%d&base=10&format=plain&rnd=new&col=1"):format(mi,ma,n))
end
Where mi is the minimun number, ma is the maximun number, and n is the amount of numbers to generete, you will need need to parse the result string, but that's easily done with patterns. Make sure HTTPservice is enabled
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
No, I meant return the api as a table
Um... What? You can't do that. The API just specifies how to send requests. You need to write your implementation. It's not going to return you a table of Lua functions to manipulate it.