Last active
March 31, 2016 13:50
-
-
Save htmlr/6dd8dffef476255259208a3a281d1e9b to your computer and use it in GitHub Desktop.
Trello - How to get cards for given list
This file contains hidden or 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
| /* | |
| Include Client API | |
| */ | |
| <script src="https://api.trello.com/1/client.js?key=<api key>"></script> | |
| <script> | |
| var getListCards = function(){ | |
| /* | |
| Note to get the List ID use Trello Sandbox examples to first get the relavent Board ID then in turn use this to get the relavent List ID (https://developers.trello.com/sandbox) | |
| */ | |
| Trello.get('/lists/<Card ID>/cards?fields=all&cards=open&card_fields=all&members=true', | |
| function(successMsg){ | |
| console.log(successMsg); | |
| }, | |
| function(errorMsg){ | |
| console.log(errorMsg); | |
| } | |
| ); | |
| } | |
| /* Authorize */ | |
| Trello.authorize({ | |
| type: "popup", | |
| name: "Get List Cards Example", | |
| scope: { | |
| read: true, | |
| write: false }, | |
| expiration: "never", | |
| success: getListCards, | |
| error: function() { console.log("Failed authentication"); } | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment