[Tutorial][Trello][API] How do I start?

I spent all day today trying to add labels to a trello list. I could add colors, but I could not add the “name” or “descriptive text”. It was probably a good exercise to try. I turned to a coworker for help and the conclusion seems to be that my library (trello) is probably not the best library for the job. He recommended py-trello.

So that’s cool. The only problem is where to start?

With trello it was pretty easy, I could create Board, Card, or List objects by just plugging in the token and key. Perhaps it’s that easy.

a = trello.Boards("key","token")

b = trello.Lists("key","token")

c = trello.Cards("key", "token")

That seemed pretty straight forward.

py-trello has:
Usage

from trello import TrelloClient

client = TrelloClient(
    api_key='your-key',
    api_secret='your-secret',
    token='your-oauth-token-key',
    token_secret='your-oauth-token-secret'
)

There’s a class:

class Board(object):

But what is the object I plug in?

This is probably a very easy problem to solve and I’m just being dense. But I thought I’d throw it down in the blog so I could come back later and feel like I learned something.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s