sarumont / py-trello

Python API wrapper around Trello's API
BSD 3-Clause "New" or "Revised" License
945 stars 330 forks source link

Add support for getting a cards `cover` property #355

Open augusto-herrmann opened 2 years ago

augusto-herrmann commented 2 years ago

The Trello API offers a cover property for cards (see docs), but it is not being loaded into the Card object here.

It should be simple to at least "get" the property.

Workaround I'm using for now (might be useful to someone else):

def get_cover(card: 'Card') -> dict:
    """Gets the card's cover."""
    return card.client.fetch_json(f'/cards/{card.id}/cover')