class Temjin::TrelloAPICommand

Public Class Methods

new(invocation_path, context = {}) click to toggle source
Calls superclass method Temjin::Command::new
# File lib/temjin/command.rb, line 14
def initialize(invocation_path, context = {})
  super(invocation_path, context)
  trello_connection
end

Public Instance Methods

find_board(board_id) click to toggle source
# File lib/temjin/command.rb, line 26
def find_board(board_id)
  Trello::Board.find(board_id)
end
find_card(card_id) click to toggle source
# File lib/temjin/command.rb, line 42
def find_card(card_id)
  Trello::Card.find(card_id)
end
find_list(user, board_name, list_name) click to toggle source
# File lib/temjin/command.rb, line 30
def find_list(user, board_name, list_name)
  user.boards.detect { |b| b.name.match(board_name) }.lists.detect { |l| l.name.match(list_name) }
end
find_list_by_id(list_id) click to toggle source
# File lib/temjin/command.rb, line 34
def find_list_by_id(list_id)
  Trello::List.find(list_id)
end
find_user(username) click to toggle source
# File lib/temjin/command.rb, line 38
def find_user(username)
  Trello::Member.find(username)
end
trello_connection() click to toggle source
# File lib/temjin/command.rb, line 19
def trello_connection
  Trello.configure do |c|
    c.developer_public_key = config.key
    c.member_token = config.token
  end
end