Roblox-trello | Object Oriented Trello API

Thank you for pointing his out, I will update the documentation to include the function. :smiley:

Thank you for making this API. Iā€™m currently using it as a whitelist system for my game which is under development.

1 Like

It might be worth pointing out in your post that in no way should Trello really be used as a database - ever. Its purpose is for project management, not for things such as ban lists. Its really not optimized for thins like that, as youā€™ll notice when you open a board with massive amounts of cards.

1 Like

I am aware, however, I believe the end user should have the freedom of doing whatever they wish with the API, as after all, I hold no rights on this API. Anyone can sell the scripts to others if they wish (not that they should, but they could).

I believe the same logic applies to the use given to the aforementioned software.

Hey, heres a quick request! Perhaps add this into the Card Script:

function NewCard:GetDesc()
		return (self:GetData().desc)
end

I use it all the time, and itā€™s really helpful for getting ā€œBan Reasonsā€ (or thats what Iā€™m using it for)!

Oh wow. It appears I added a way to set the description of the card, but not to retrieve it.
Silly me.
Iā€™ll add it next update, hopefully in under a day, as I am away from home at the moment.

Thank you!

1 Like

A better way of achieving this is through the feature that roblox created: Messaging Service

2 Likes

Yes, but if you were to make an ā€œvacationā€ or something ban dealio, Itā€™d be nice to kick the player if theyā€™re In-Game by simply adding a Card to your trello board.

1 Like

Doing this would result in multiple HTTP requests that would be ultimately useless for the use once or twice on vacation. Ultimately this could be achieved by joining the game on your phone, and inserting that users name, storing it in a datastore with a true Boolean and then sending the messaging service message to all servers. On the receiving end you would just loop through all the players and finding if that player is in the server, then kick them. Then create a script that would check if a player is banned from the datastore and then kick that player.

Yes, but it would still be a neat and very useful feature. :slight_smile:

I have received a few reports of the API not working. I have modified the example scripts to avoid this. Basically, whenever you use a function in the API, it yields, it is important to know this.

If a function of the API is ran before creating the PlayerAdded event, chances are the player will join before the event is even created. The way to fix this is to move all the functions inside the PlayerAdded event.

2 Likes

roblox-trello v2.0.0 is being written right now. A new thread will be made after the first stable release. However, pre-release versions will be available in github prior to that.

More information available here:
v2 Project: Motivation and path

Awesome! Best of luck! :slight_smile:

The first public pre-release has been published!
Feedback of the new API design choices are welcome and appreciated.

This isnā€™t accurate. It is GetCardByName

1 Like

Thank you! That was the old function, which was changed for consistency.

Noticed one other thing, in the same example: local FCard = MainBord:GetCardByName(...) wouldnā€™t work. Itā€™s trying to get a card, on the board, not a list.

Here is the code you could use:

game.Players.PlayerAdded:Connect(function(Plr)
    local MainBoard = Trello:GetBoardByName("Name of the board")
    local BoardList = MainBoard:GetListByName("Name of the List")
    local Fcard = BoardList:GetCardByName(tostring(Plr.UserId))
    if Fcard then
        local newText = Fcard:GetDesc()
        --more code
    end
end)
1 Like

Actually, due to how the Trello REST API works, it is possible to get cards directly from the board.
image

image
Once JSON decoded, they are simply arrays of cards, which can be easily iterated to find a card with a matching name.

I was initially also confused by this.
Source:
https://developers.trello.com/reference#introduction

1 Like

ok so im like a little dumb and is there like a module script cause
local Trello = require(script.Parent.Trello.Main) idk im not that smart lol

Yes, you have to download the module from github. For production purposes, you should use v1, as v2 is incomplete and unstable.

The latest version can be found here:

Download the .rbxm file and insert it in studio.

1 Like