Skip to content

Commit

Permalink
add keep_from_source to add_card in trelloList
Browse files Browse the repository at this point in the history
  • Loading branch information
sahandevs committed Feb 11, 2019
1 parent 59916a1 commit b14b770
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trello/trellolist.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def list_cards_iter(self, card_filter="open", actions=None, query={}, limit=None
if limit and limit <= total:
break

def add_card(self, name, desc=None, labels=None, due="null", source=None, position=None, assign=None):
def add_card(self, name, desc=None, labels=None, due="null", source=None, position=None, assign=None, keep_from_source="all"):
"""Add a card to this list
:name: name for the card
Expand All @@ -96,6 +96,7 @@ def add_card(self, name, desc=None, labels=None, due="null", source=None, positi
:due: due date for the card
:source: card ID from which to clone from
:position: position of the card in the list. Must be "top", "bottom" or a positive number.
:keep_from_source: used with source parameter. Can be "attachments", "checklists", "comments", "due", "labels", "members", "stickers" or "all".
:return: the card
"""
labels_str = ""
Expand All @@ -116,6 +117,7 @@ def add_card(self, name, desc=None, labels=None, due="null", source=None, positi
'due': due,
'idMembers': members_str[:-1],
'idCardSource': source,
'keepFromSource': keep_from_source if source else None,
}
if position is not None:
post_args["pos"] = position
Expand Down

0 comments on commit b14b770

Please sign in to comment.