this is script please fix it because it says 404 not found: local cardsData = trello.GetRequest("https://api.trello.com/1/lists" .. trello.BanListID .. "/cards")
local cardsList = httpService:JSONDecode(cardsData)
seprate script but both need to be fixed
local trello = {}
trello.Key = script.Key.Value
trello.Secret = script.Secret.Value
trello.QueryParams = "key=" .. trello.Key .. "&token=" .. trello.Secret -- Add equal sign here
trello.BanListID = "cant say"
local httpService = game:GetService("HttpService")
function trello.GetRequest(url)
local request = url .. "?" .. trello.QueryParams
local response = httpService:GetAsync(request)
return response
end
function trello.PostRequest(url, queryData)
queryData['key'] = trello.Key
queryData['token'] = trello.Secret
for name, value in pairs(queryData) do
if not string.match(url, "?") then
url = url .. "?" .. name .. "=" .. value
else
url = url .. "&" .. name .. "=" .. value
end
end
local request = {
['Url'] = url,
['Method'] = "POST", -- Fix typo here
['Headers'] = {
['Accept'] = "applications/json"
},
['Data'] = httpService:JSONEncode(queryData) -- Set Data field to queryData
}
local response = httpService:RequestAsync(request)
return response
end
return trello