Trello » TrelloPy Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

Add examples to the docs.

Changeset b61dc9da6c57

Parent 73a01e9b297c

by Profile picture of User 10Tyler G. Hicks-Wright <tghw@fogcreek.com>

Changes to one file · Browse files at b61dc9da6c57 Showing diff from parent 73a01e9b297c Diff from another changeset...

Change 1 of 1 Show Entire File docs/​examples.rst Stacked
 
1
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
 
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@@ -1,4 +1,26 @@
 Examples  ========   -TODO + >>> from trello import TrelloApi + >>> trello = TrelloApi(TRELLO_APP_KEY) + >>> trello.boards.get('4d5ea62fd76aa1136000000c') + { + "closed": false, + "desc": "Trello board used by the Trello team to track work on Trello. How meta!\n\nThe development of the Trello API is being tracked at https://trello.com/api\n\nThe development of Trello Mobile applications is being tracked at https://trello.com/mobile", + "id": "4d5ea62fd76aa1136000000c", + "idOrganization": "4e1452614e4b8698470000e0", + "name": "Trello Development", + "pinned": true, + "prefs": { + "comments": "public", + "invitations": "members", + "permissionLevel": "public", + "voting": "public" + }, + "url": "https://trello.com/board/trello-development/4d5ea62fd76aa1136000000c" + } + +Because the Trello development board is public, we didn't need a user's token, but if we want to access private boards, we'll have to have one. We can get it by calling: + + >>> trello.get_token_url('My App', expires='30days', write_access=True) + 'https://trello.com/1/authorize?key=TRELLO_APP_KEY&name=My+App&expiration=30days&response_type=token&scope=read,write'