Object Oriented Trello API

trello
api
opensource
oop
github
#1

I created a OOP-like Trello API.
I am actively developing and updating the API, so feel free to create a github issue if you want to report a bug, or request a feature.

The documentation can be found in the github’s wiki.

Here is an example of code:

local Trello = require(script.Parent.Trello.Main)

local myBoard = Trello:GetBoardByName("SomeBoard")
local newBoard = Trello.new("Board", "AnotherBoard")
for _,v in pairs (myBoard:GetLists()) do
	v:SetName(v:GetId()) --sets the name of every list to their own id
	v:Move(newBoard)  --moves all lists to the specified board
end

Another example:

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

I hope you like it! And please remember to give feedback either through a reply, or through a github issue. :smile:

License

image
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or

distribute this software, either in source code form or as a compiled

binary, for any purpose, commercial or non-commercial, and by any

means.

In jurisdictions that recognize copyright laws, the author or authors

of this software dedicate any and all copyright interest in the

software to the public domain. We make this dedication for the benefit

of the public at large and to the detriment of our heirs and

successors. We intend this dedication to be an overt act of

relinquishment in perpetuity of all present and future rights to this

software under copyright law.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,

EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF

MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR

OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,

ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR

OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org>

Documentation

The documentation for the API can be found here:
https://github.com/HypheX/trello-v1/wiki
The wiki always features the documentation for the latest version.

Change log

The change log and downloads can be found here:
https://github.com/HypheX/trello-v1/releases

29 Likes

Does Roblox > Trello Still Work?
Roblox to Trello Guide
closed #2

This topic was automatically closed after 1 minute. New replies are no longer allowed.

0 Likes

opened #3
1 Like

#4

Although I probably won’t use this, I just wanted to say this is good and to keep it up!

2 Likes

#5

Nice API. I would suggest adding 1 thing: descriptions.
Currently there is no explanation what anything does. Adding just an 1 line description for every function would help alot.

3 Likes

#6

The github page has a Wiki with all of the documentation.

1 Like

#7

Oh sorry, I compleetly missed the Wiki button.:sweat_smile:

2 Likes

#8

Don’t worry, it happens to the best of us. :smile:

2 Likes

#9

What is this API for?
:thinking:

4 Likes

#10

This API is made to interact with Trello via scripts using objects, hence the “Object Oriented” label.
Each object has a variety of functions (methods) available, all of which are listed on the Wiki of the github.

1 Like

#11

This is fantastic, I can make use of this for players to report bugs, glitches and exploiters to my game’s private Trello board. Thanks a lot!

However, I want to know if there’s a throttle limit on the post interval on Trello’s backend?

2 Likes

#12

Yeah even though I make my own APIs for things and won’t be using this. This looks great for new developers to use and build upon. :+1:

2 Likes

#13

Thank you! I appreciate your feedback. :grinning:

And yes, Trello does throttle your requests, the following info was grabbed from their API docs.

To help prevent strain on Trello’s servers, our API imposes rate limits per API key for all issued tokens. There is a limit of 300 requests per 10 seconds for each API key and no more than 100 requests per 10 second interval for each token. If a request exceeds the limit, Trello will return a 429 error.

But still, it is very hard to reach the limit. You can send a request every 0.1 seconds, and still be within the limits by a thin margin.

2 Likes

#14

This looks useful, I might look into using it for some sort of automated ban-list synchronises to a trello easily.

Thanks for the contribution! :+1:

2 Likes

#15

Although I won’t use because I’ve already made my own.
I think that this is useful and great! This will sure help new developers. Thanks for sharing this and keep up the great work !

2 Likes

#16

Important notice:
I received an amazing amount of reports of the script giving an error when attempting to create a new card.
I want to apologize to those that were affected by this error, as it took me way to long to fix it.

For those users that were affected by this bug, I have released version 1.1.2, which includes the hotfix for the error.

If you are currently using version 1.1.1, you should update to version 1.1.2.

1 Like

#17

This will be useful in my future projects. Good job!

2 Likes

#18

How do you set the description when creating a card?

1 Like

#19

Card:SetDesc(string) seems to be the function that does it, although it isn’t listed in the documentation.

2 Likes

#20

Oh didn’t even knew that existed. Thanks! I just did Card:SetProperty("desc", description)

1 Like