Hello! The title says it all.
I want to do this because I’m creating a SDK for the Notion API.
I can’t find anything online.
Here’s my code:
local nuuh = {["token"] = "secret_3uEFUVC0CxKq7feA9lFuy6MUI8372Duiq69xTT420d"}
local HttpService = game:GetService("HttpService")
local APIVersion = "2022-06-28"
local APILink = "https://api.notion.com/"
-- deleted this cuz too long and not needed
nuuh.options = {}
local function encode(str, legal)
end
local function buildQuery(tab, sep, key)
end
function nuuh.getUsers(page_size: number?, start_cursor: string?)
local success
local response
success, response = pcall(HttpService:RequestAsync(
{
Url = string.format("%s/users/?%s", APILink, buildQuery(page_size, start_cursor)),
Method = "GET",
Headers = {
["Authorization"] = "Bearer " .. nuuh.token,
["Notion-Version"] = APIVersion
}}
))
print(success, response)
end
return nuuh
thanks