class TrelloFreestyler::Client
Public Class Methods
new(key, token, trello_url)
click to toggle source
# File lib/trello_freestyler/client.rb, line 7 def initialize(key, token, trello_url) @key = key @token = token @trello_url = trello_url end
Public Instance Methods
auth()
click to toggle source
# File lib/trello_freestyler/client.rb, line 13 def auth { key: @key, token: @token } end
card_actions(card_id, action_types)
click to toggle source
# File lib/trello_freestyler/client.rb, line 23 def card_actions(card_id, action_types) url = @trello_url + "/cards/#{card_id}/actions" params = { params: auth.merge({ filter: action_types }) } RestClient.get url, params end
cards(board_id)
click to toggle source
# File lib/trello_freestyler/client.rb, line 17 def cards(board_id) url = @trello_url + "/boards/#{board_id}/cards" params = { params: auth } RestClient.get url, params end