|
8 | 8 | import com.crowdin.client.core.model.Credentials; |
9 | 9 | import com.crowdin.client.core.model.ResponseList; |
10 | 10 | import com.crowdin.client.core.model.ResponseObject; |
| 11 | +import com.crowdin.client.sourcestrings.model.SourceString; |
| 12 | +import com.crowdin.client.sourcestrings.model.SourceStringResponseList; |
11 | 13 | import com.crowdin.client.workflows.model.WorkflowStep; |
12 | 14 | import com.crowdin.client.workflows.model.WorkflowStepResponseList; |
13 | 15 | import com.crowdin.client.workflows.model.WorkflowStepResponseObject; |
@@ -52,6 +54,31 @@ public ResponseObject<WorkflowStep> getWorkflowStep(Long projectId, Long stepId) |
52 | 54 | return ResponseObject.of(workflowStepResponseObject.getData()); |
53 | 55 | } |
54 | 56 |
|
| 57 | + /** |
| 58 | + * @param projectId project identifier |
| 59 | + * @param stepId workflow step identifier |
| 60 | + * @param languageIds filter progress by language identifiers |
| 61 | + * @param orderBy ["id", "text", "identifier", "context", "createdAt", "updatedAt"]. Result sorting rules (default "id") |
| 62 | + * @param status ["todo", "done", "pending", "incomplete", "need_review"]. String status on the workflow step |
| 63 | + * @param limit maximum number of items to retrieve (default 25) |
| 64 | + * @param offset starting offset in the collection (default 0) |
| 65 | + * @return list of project strings |
| 66 | + * @see <ul> |
| 67 | + * <li><a href="https://support.crowdin.com/developer/enterprise/api/v2/#tag/Workflows/operation/api.projects.workflow-steps.strings.getMany" target="_blank"><b>Enterprise API Documentation</b></a></li> |
| 68 | + * </ul> |
| 69 | + */ |
| 70 | + public ResponseList<SourceString> listWorkflowStepStrings(Long projectId, Long stepId, String languageIds, String orderBy, String status, Integer limit, Integer offset) throws HttpException, HttpBadRequestException { |
| 71 | + Map<String, Optional<Object>> queryParams = HttpRequestConfig.buildUrlParams( |
| 72 | + "languageIds", Optional.ofNullable(languageIds), |
| 73 | + "orderBy", Optional.ofNullable(orderBy), |
| 74 | + "status", Optional.ofNullable(status), |
| 75 | + "limit", Optional.ofNullable(limit), |
| 76 | + "offset", Optional.ofNullable(offset) |
| 77 | + ); |
| 78 | + SourceStringResponseList workflowStepStringsList = this.httpClient.get(this.url + "/projects/" + projectId + "/workflow-steps/" + stepId + "/strings", new HttpRequestConfig(queryParams), SourceStringResponseList.class); |
| 79 | + return SourceStringResponseList.to(workflowStepStringsList); |
| 80 | + } |
| 81 | + |
55 | 82 | /** |
56 | 83 | * @param groupId group identifier |
57 | 84 | * @param limit maximum number of items to retrieve (default 25) |
|
0 commit comments