Class: Leash::Integration::JiraClient
- Inherits:
-
Object
- Object
- Leash::Integration::JiraClient
- Defined in:
- lib/leash/integration/jira.rb
Instance Method Summary collapse
-
#initialize(leash) ⇒ JiraClient
constructor
Create a new Jira integration client.
-
#jira_delete(path, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Delete Jira resources.
-
#jira_get(path, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Read any Jira data.
-
#jira_patch(path, body, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Partially update Jira resources.
-
#jira_post(path, body, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Create Jira resources.
-
#jira_put(path, body, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Replace Jira resources (full update).
Constructor Details
#initialize(leash) ⇒ JiraClient
Create a new Jira integration client.
11 12 13 |
# File 'lib/leash/integration/jira.rb', line 11 def initialize(leash) @leash = leash end |
Instance Method Details
#jira_delete(path, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Delete Jira resources. Returns TOON format by default. **Output format:** TOON (default) or JSON (‘outputFormat: “json”`) **Common operations:** 1. **Delete issue:** `/rest/api/3/issue/{issueIdOrKe…
96 97 98 99 100 101 102 103 104 |
# File 'lib/leash/integration/jira.rb', line 96 def jira_delete(path, queryparams: nil, jq: nil, outputformat: nil) params = { 'path' => path, 'queryParams' => queryparams, 'jq' => jq, 'outputFormat' => outputformat }.compact @leash.call('jira', 'jira_delete', params) end |
#jira_get(path, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Read any Jira data. Returns TOON format by default (30-60% fewer tokens than JSON). **IMPORTANT - Cost Optimization:** - ALWAYS use ‘jq` param to filter response fields. Unfiltered responses are ve…
22 23 24 25 26 27 28 29 30 |
# File 'lib/leash/integration/jira.rb', line 22 def jira_get(path, queryparams: nil, jq: nil, outputformat: nil) params = { 'path' => path, 'queryParams' => queryparams, 'jq' => jq, 'outputFormat' => outputformat }.compact @leash.call('jira', 'jira_get', params) end |
#jira_patch(path, body, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Partially update Jira resources. Returns TOON format by default. **IMPORTANT - Cost Optimization:** Use ‘jq` param to filter response fields. **Output format:** TOON (default) or JSON (`outputForma…
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/leash/integration/jira.rb', line 78 def jira_patch(path, body, queryparams: nil, jq: nil, outputformat: nil) params = { 'path' => path, 'queryParams' => queryparams, 'jq' => jq, 'outputFormat' => outputformat, 'body' => body }.compact @leash.call('jira', 'jira_patch', params) end |
#jira_post(path, body, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Create Jira resources. Returns TOON format by default (token-efficient). **IMPORTANT - Cost Optimization:** - Use ‘jq` param to extract only needed fields from response (e.g., `jq: “{key: key, id:…
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/leash/integration/jira.rb', line 40 def jira_post(path, body, queryparams: nil, jq: nil, outputformat: nil) params = { 'path' => path, 'queryParams' => queryparams, 'jq' => jq, 'outputFormat' => outputformat, 'body' => body }.compact @leash.call('jira', 'jira_post', params) end |
#jira_put(path, body, queryparams: nil, jq: nil, outputformat: nil) ⇒ Object
Replace Jira resources (full update). Returns TOON format by default. **IMPORTANT - Cost Optimization:** Use ‘jq` param to extract only needed fields from response **Output format:** TOON (default)…
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/leash/integration/jira.rb', line 59 def jira_put(path, body, queryparams: nil, jq: nil, outputformat: nil) params = { 'path' => path, 'queryParams' => queryparams, 'jq' => jq, 'outputFormat' => outputformat, 'body' => body }.compact @leash.call('jira', 'jira_put', params) end |