module Ctrl::API

Public Class Methods

get_board(id) click to toggle source
# File lib/ctrl/api.rb, line 37
def self.get_board(id)
  get("/boards/#{id}", {cards: "open", lists: "open"})
end
get_boards() click to toggle source
# File lib/ctrl/api.rb, line 33
def self.get_boards
  get("/members/me/boards", {filter: "open", lists: "open"})
end
get_card(id) click to toggle source
# File lib/ctrl/api.rb, line 57
def self.get_card(id)
  get("/cards/#{id}")
end
get_cards_for_board(id) click to toggle source
# File lib/ctrl/api.rb, line 45
def self.get_cards_for_board(id)
  get("/boards/#{id}/cards", {filter: "open"})
end
get_cards_for_list(id) click to toggle source
# File lib/ctrl/api.rb, line 53
def self.get_cards_for_list(id)
  get("/lists/#{id}/cards", {filter: "open", board: true, list: true})
end
get_list(id) click to toggle source
# File lib/ctrl/api.rb, line 49
def self.get_list(id)
  get("/lists/#{id}", {cards: "open", board: true})
end
get_lists_for_board(id) click to toggle source
# File lib/ctrl/api.rb, line 41
def self.get_lists_for_board(id)
  get("/boards/#{id}/lists", {filter: "open", cards: "open"})
end

Private Class Methods

delete(path, options = {}) click to toggle source
# File lib/ctrl/api.rb, line 78
def self.delete(path, options = {})
  @@trello ||= Ctrl::Trello.new()
  @@trello.delete(path, options)
end
get(path, data = nil, options = {}) click to toggle source
# File lib/ctrl/api.rb, line 63
def self.get(path, data = nil, options = {})
  @@trello ||= Ctrl::Trello.new()
  @@trello.get(path, data, options)
end
post(path, data = nil, options = {}) click to toggle source
# File lib/ctrl/api.rb, line 68
def self.post(path, data = nil, options = {})
  @@trello ||= Ctrl::Trello.new()
  @@trello.post(path, data, options)
end
put(path, data = nil, options = {}) click to toggle source
# File lib/ctrl/api.rb, line 73
def self.put(path, data = nil, options = {})
  @@trello ||= Ctrl::Trello.new()
  @@trello.put(path, data, options)
end