Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.87 KB

File metadata and controls

43 lines (31 loc) · 1.87 KB

Module 2 Project Exercise Hints

How do I know the "status" of an item from Trello?

Each card belongs to a "list". Trello boards are created with the following lists by default: 'To Do', 'Doing', 'Done'.

I'm having trouble getting an API call to work or parsing the response

You have a few options for investigation (other than trial and error):

  • The crudest approach is to add in print statements to your app to see what data it is sending/receiving.
  • A fancier version of print statements would be adding logging
  • To investigate without modifying any code, and without knowing what to look for ahead of time, try debugging your app. There are instructions on our VS Code page

You should check the request you are sending looks correct and that you can find the data you expect in response.json().

How can I get all of my cards with a single request to Trello?

Take a look at the docs for the Get Lists on Board endpoint in Trello. - are there any helpful looking query parameters?

In particular, notice the cards parameter - if we supply that with the value "all" then we should get back a list of the lists on our board, with all of their cards also included!

We could then process those with something like:

result = requests.get("<trello_endpoint>", params = params).json()
for list in lists:
    for card in list['cards']:
        # process that particular card