Skip to content

Commit

Permalink
Document card checklist methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rossta committed Dec 19, 2015
1 parent 098e6a9 commit bcc1854
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/tacokit/client/cards.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ def convert_to_card(card_id, checklist_id, check_item_id)
# Start a new checklist on card
# @param card_id [String, Tacokit::Resource<Card>] the card identifier, shortlink, or card
# @param name [String] the new checklist name
# @example Add checklist to card
# card = Tacokit.card("aCardId")
# checklist = Tacokit.add_checklist(card, "Tasks")
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-checklists
def add_checklist(card_id, name)
create_card_resource(card_id, "checklists", name: name)
Expand All @@ -329,9 +332,13 @@ def add_checklist(card_id, name)
# Copy another checklist to card
# @param card_id [String, Tacokit::Resource<Card>] the destination card identifier, shortlink, or card
# @param checklist_id [String] the checklist identifier
# card_1 = Tacokit.card("aCardId")
# checklist = card.add_checklist(card_1, "Tasks")
# card_2 = Tacokit.card("bCardId")
# Tacokit.copy_checklist(card_2, checklist)
# @see https://developers.trello.com/advanced-reference/card#post-1-cards-card-id-or-shortlink-checklists
def copy_checklist(card_id, checklist_id)
create_card_resource(card_id, "checklists", checklist_source_id: checklist_id)
create_card_resource(card_id, "checklists", checklist_source_id: resource_id(checklist_id))
end

# Add a member to a card
Expand Down

0 comments on commit bcc1854

Please sign in to comment.