-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.luau
More file actions
29 lines (24 loc) · 749 Bytes
/
test.luau
File metadata and controls
29 lines (24 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local fs = require("@std/fs")
local process = require("@std/process")
local json = require("@std/json")
local pp = require("./src/vendor/pp")
local Cirrus = require("./src/")
-- Load env from an env.json file
local ENV_FILE_NAME = "env.json"
if fs.exists(ENV_FILE_NAME) then
local env = assert(json.deserialize(fs.readFileToString(ENV_FILE_NAME)), "Failed to parse env.json")
for key, value in env do
if type(key) ~= "string" then
continue
end
process.env[key] = value
end
end
-- Create Cirrus client
local client = Cirrus.new({
apiKey = process.env.API_KEY,
retries = 0,
})
local placeInfo = client.v2.place:getInfo({ universeId = 6206874897, placeId = 18308356731 })
print(pp(placeInfo))
print(pp(client.v2.user:get(12233433)))