Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Commit

Permalink
add card.image_url close #13, add card.key
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjr committed Nov 29, 2017
1 parent f00fc27 commit c8a0264
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crasync/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,13 @@ def __init__(self, data):
self.name = data.get('name')
self.rarity = data.get('rarity')
self.card_id = data.get('card_id')
self.key = data.get('key')
self.elixir = data.get('elixir')
self.type = data.get('type')
self.arena = data.get('arena')
self.description = data.get('description')
self.deck_link = data.get('decklink')
self.image_url = 'https://cr-api.github.io/cr-api-assets/card/{}.png'.format(self.key)

def __repr__(self):
return '<Card id={0.card_id}>'.format(self)
Expand Down

0 comments on commit c8a0264

Please sign in to comment.