Class JiraApi
java.lang.Object
com.atlassian.jira.cloud.jenkins.common.client.JiraApi
Common HTTP client to talk to Jira Build and Deployment APIs in Jira
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<ResponseEntity>
PostUpdateResult<ResponseEntity>getResult
(String accessToken, Map<String, String> pathParams, String clientId, Class<ResponseEntity> responseClass) Submits an update to the Atlassian Builds or Deployments API and returns the response<ResponseEntity>
PostUpdateResult<ResponseEntity>postUpdate
(String cloudId, String accessToken, String clientId, JiraRequest jiraRequest, Class<ResponseEntity> responseClass) Submits an update to the Atlassian Builds or Deployments API and returns the response
-
Constructor Details
-
JiraApi
@Inject public JiraApi(okhttp3.OkHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String apiUrl)
-
-
Method Details
-
postUpdate
public <ResponseEntity> PostUpdateResult<ResponseEntity> postUpdate(String cloudId, String accessToken, String clientId, JiraRequest jiraRequest, Class<ResponseEntity> responseClass) Submits an update to the Atlassian Builds or Deployments API and returns the response- Type Parameters:
ResponseEntity
- Response entity, which can be either BuildApiResponse or DeploymentApiResponse- Parameters:
cloudId
- Jira Cloud IdaccessToken
- Access token generated from Atlassian APIclientId
- oAuth client idjiraRequest
- An assembled payload to be submitted to Jira- Returns:
- Response from the API
-
getResult
public <ResponseEntity> PostUpdateResult<ResponseEntity> getResult(String accessToken, Map<String, String> pathParams, String clientId, Class<ResponseEntity> responseClass) Submits an update to the Atlassian Builds or Deployments API and returns the response- Type Parameters:
ResponseEntity
- Response entity, which can be either BuildApiResponse or DeploymentApiResponse- Parameters:
accessToken
- Access token generated from Atlassian APIpathParams
- Params to be injected to the url- Returns:
- Response from the API
-