class Dude::ProjectManagement::Trello::Client
Public Instance Methods
client()
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 15 def client @client ||= Faraday.new('https://api.trello.com/', { params: { key: Dude::SETTINGS.dig(:trello, :key), token: Dude::SETTINGS.dig(:trello, :token) } }) end
fetch_current_task(id)
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 36 def fetch_current_task(id) FetchCurrentTask.new(client, id: id).call end
fetch_current_tasks()
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 32 def fetch_current_tasks FetchCurrentTasks.new(client).call end
get_task_name_by_id(id)
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 44 def get_task_name_by_id(id) GetTaskNameById.new(client, id: id).call end
health_check()
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 48 def health_check client.get("/1/tokens/#{Dude::SETTINGS.dig(:trello, :token)}").status == 200 rescue StandardError false end
method_missing(method, *args, &block)
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 24 def method_missing(method, *args, &block) faraday_client.send(method, *args, &block) end
move_task_to_list(id, list)
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 40 def move_task_to_list(id, list) MoveTaskToList.new(client, id: id, list_name: list).call end
respond_to_missing?(method_name, include_private = false)
click to toggle source
# File lib/dude/project_management/trello/client.rb, line 28 def respond_to_missing?(method_name, include_private = false) client.respond_to?(method_name, include_private) end