Skip to content

Instantly share code, notes, and snippets.

Created June 21, 2013 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e099c732c7312623b45d to your computer and use it in GitHub Desktop.
Save anonymous/e099c732c7312623b45d to your computer and use it in GitHub Desktop.
A little example showing caching of request across multiple invocations of the Trollop API.
from trollop import TrelloConnection
import uuid
def getCards():
conn = TrelloConnection('yourKey', '')
testList = conn.get_list('51c4bbfec35aaed501000c38')
for card in testList.cards:
print card.name
def addCard():
conn = TrelloConnection('yourKey', 'yourToken')
testList = conn.get_list('51c4bbfec35aaed501000c38')
testList.add_card('Hello this is a test ' + str(uuid.uuid4()), 'And this is the description')
print "First call to list the cards:"
getCards()
print "\n"
addCard()
print "Second call to list the cards:"
getCards()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment