local api = require(game.ServerScriptService.APIs.TrelloAPI)
print("api")
local boardID = api:GetBoardID("Fortress")
print("board")
local listID = api:GetListID("Generals",boardID)
print("variables")
local newCard = api:AddCard("Test","Test123",listID)
print("card")
It only prints “api”
My token is in and correct, am I doing something wrong?
Yes the variable name doesnt matter I am talking about what are you requiring. Is it a module script? can you show me the function “addBoard” in it so I can debug.
I did send the API earlier, since this isn’t mine and has worked before but it doesn’t work now. I know the function works it’s just something wrong with what I’m doing, I’d check out the API for yourself or repro the issue.
The api documentation does not matter. I am talking about the module script you are requiring in the APIs folder named TrelloAPI. You are trying to call a function from this module script and thats where the problem is if it isnt recieveing a response from the trello api endpoint.
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)
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
Show me the get getAddon() function. The api may be outdated. I analyzed the actual trello API and now understand it and can compare it to the request the script is making.
You would need to call the function that uses the token that YOU made as an application for the board, which was/is granted for the board then, which you don’t have included in the code.
Not me not having it included. [quote=“vf9r, post:1, topic:1305031”]
My token is in and correct, am I doing something wrong?
[/quote]
and he says here that he has the token in correct.
local api = require(game.ServerScriptService.APIs.TrelloAPI)
print("api")
local boardID = api:GetBoardID("Fortress")
print("board")
local listID = api:GetListID("Generals",boardID)
print("variables")
local newCard = api:AddCard("Test","Test123",listID)
print("card")
Where do you see in this code that uses the “token that you’ve generated”?
You’re using the trello api, when you never called for the token function.