Class: Communication::API
- Inherits:
-
Object
- Object
- Communication::API
- Defined in:
- lib/communication/api.rb
Overview
Defines API calls
Class Method Summary collapse
-
.get_issue(issue_id) ⇒ WorklogIssue
Fetch an issue from JIRA Server.
Class Method Details
.get_issue(issue_id) ⇒ WorklogIssue
Fetch an issue from JIRA Server.
27 28 29 30 31 32 |
# File 'lib/communication/api.rb', line 27 def self.get_issue(issue_id) Communicator.instance.get("#{Communicator.base_api_url}/issue/#{issue_id}") do |body, _| issue = WorklogIssue.new(jira_id: body[:key], description: body[:fields][:summary]) yield(issue) if block_given? end end |