Class: Fizzy::CLI::Pins
- Inherits:
-
Thor
- Object
- Thor
- Fizzy::CLI::Pins
- Includes:
- Base
- Defined in:
- lib/fizzy/cli/pins.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#list ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/fizzy/cli/pins.rb', line 9 def list data = paginator.all("/my/pins") output_list(data, headers: %w[# Title Board]) do |p| card = p["card"] || p [card["number"], card["title"], card.dig("board", "name") || ""] end end |
#pin(number) ⇒ Object
18 19 20 21 |
# File 'lib/fizzy/cli/pins.rb', line 18 def pin(number) client.post("cards/#{number}/pin") puts "Card ##{number} pinned." end |
#unpin(number) ⇒ Object
24 25 26 27 |
# File 'lib/fizzy/cli/pins.rb', line 24 def unpin(number) client.delete("cards/#{number}/pin") puts "Card ##{number} unpinned." end |