Last active
December 22, 2015 06:49
-
-
Save ondrae/6434120 to your computer and use it in GitHub Desktop.
This gist grabs the newest Trello board a user has created.
Generate your own key at https://trello.com/c/jObnWvl1/25-generating-your-developer-key
Get a users auth_token by following these instructions https://trello.com/docs/gettingstarted/index.html#getting-a-token-from-a-user Before I got that sort function working I had a nasty 18 line trip…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
api_key = '' | |
auth_token = '' | |
response = requests.get('https://trello.com/1/member/me/boards?fields=id,name,dateLastView&key='+api_key+'&token='+auth_token) | |
boards = response.json() | |
boards.sort(key=lambda board : board["dateLastView"], reverse=True) | |
the_new_resource = boards.pop(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment