function getAddon()
if token~="" then
addon="?key="..key.."&token="..token
elseif getfenv(0).token~=nil then
local val=getfenv(0).token
addon="?key="..key.."&token="..val
else
error([[-Instructions.
1. Go to this link and click allow: https://trello.com/1/authorize?key=[Your api key is at https://trello.com/app-key]&name=Roblox+Api&expiration=never&response_type=token&scope=read,write
2. Copy the token in the page sent to you
3. Paste the token in the Value of Token]])
end
return addon--"&key="..key.."&token="..token
end
Thats why I want to know if it returns the board ID, print it and tell me whether it says nil or not. so I can identify whether it is the board ID function or the other functions. so print the board id variable
local board = "Fortress"
local list = "Generals"
local api = require(game.ServerScriptService:WaitForChild("APIs").TrelloAPI)
print("api")
print(board)
print(list)
local boardID = api:GetBoardID(board)
print(boardID)
print("board")
local listID = api:GetListID(list,boardID)
print("variables")
local newCard = api:AddCard("Test","Test123",listID)
print("card")
It doesnât print anything lol, thatâs the entire point of this post, to find out why itâs not saying why.
put the print(dt) in and tell me what it says. This is working perfectly fine for me so this is probably due to you not putting in the key or not putting in either the key/token correctly
function T:GetBoardID(name)
local url
if Private then
getAddon()
url="https://api.trello.com/1/members/me/boards"..addon
else
getAddon()
url="https://api.trello.com/1/members/me/boards"..addon
end
local tball=HS:GetAsync(url,true)
local dt=HS:JSONDecode(tball)
print(dt)
for _,tab in pairs(dt) do
for p,it in pairs(tab) do
if p=="name" and it==name then
return tab.id
end
end
end
error(name.." not found!")
return nil
end