Skip to content
This repository was archived by the owner on Apr 17, 2021. It is now read-only.
This repository was archived by the owner on Apr 17, 2021. It is now read-only.

Feature request: upload of deck's cover #47

@marccarre

Description

@marccarre

Description

It is currently not possible to create decks with cover images.

Supporting this feature would allow covers to be set programmatically, instead of having to set these manually once the decks are created via tinycards-python-api.

Current state

Currently, Deck's cover argument is simply ignored:

def __init__(self,
title,
description=None,
cover=None,
deck_id=None,
visibility='everyone',
front_language=None,
back_language=None,
cards=None):
"""Initialize a new instance of the Deck class."""
self.id = deck_id
self.user_id = None
self.creation_timestamp = None
self.title = title
self.description = description
self.cards = cards if cards else []
def __str__(self):

And even though there is logic to handle imageFile in to_multipart_form, no value is actually provided:
# Handle special case for imageFile.
if k == 'imageFile':
form_lines.append('Content-Disposition: form-data; ' +
'name="%s"; filename="cover.jpg"' % k)
form_lines.append('Content-Type: image/jpeg')
form_lines.append('')
form_lines.append('')
else:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions