Method
setup_item_sprites_data
(cls, item, default=True)
Source from the content-addressed store, hash-verified
| 312 | |
| 313 | @classmethod |
| 314 | def setup_item_sprites_data(cls, item, default=True): |
| 315 | sprite_path = "https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/items/%s.png" |
| 316 | |
| 317 | sprites = { |
| 318 | "default": sprite_path % item.id if default else None, |
| 319 | } |
| 320 | |
| 321 | item_sprites = ItemSprites.objects.create( |
| 322 | item=item, sprites=json.dumps(sprites) |
| 323 | ) |
| 324 | item_sprites.save() |
| 325 | |
| 326 | return item_sprites |
| 327 | |
| 328 | @classmethod |
| 329 | def setup_item_data( |
Tested by
no test coverage detected