Class: Dude::ProjectManagement::Trello::GetTaskNameById

Inherits:
Object
  • Object
show all
Defined in:
lib/dude/project_management/trello/get_task_name_by_id.rb

Instance Method Summary collapse

Constructor Details

#initialize(client, id:) ⇒ GetTaskNameById

Returns a new instance of GetTaskNameById.



7
8
9
10
# File 'lib/dude/project_management/trello/get_task_name_by_id.rb', line 7

def initialize(client, id:)
  @client = client
  @id = id
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/dude/project_management/trello/get_task_name_by_id.rb', line 12

def call
  response = client.get("/1/boards/#{Dude::SETTINGS.dig(:jira, :board_id)}/cards/#{id}")
  JSON.parse(response.body)['name']
end