Module: ActiveProject::Adapters::Trello::Lists
- Included in:
- ActiveProject::Adapters::TrelloAdapter
- Defined in:
- lib/active_project/adapters/trello/lists.rb
Instance Method Summary collapse
-
#create_list(board_id, attributes) ⇒ Hash
Creates a new list on a Trello board.
Instance Method Details
#create_list(board_id, attributes) ⇒ Hash
Creates a new list on a Trello board.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_project/adapters/trello/lists.rb', line 11 def create_list(board_id, attributes) unless attributes[:name] && !attributes[:name].empty? raise ArgumentError, "Missing required attribute for Trello list creation: :name" end path = "boards/#{board_id}/lists" query_params = { name: attributes[:name], pos: attributes[:pos] }.compact make_request(:post, path, nil, query_params) end |