Skip to content

Commit

Permalink
tm api
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed Nov 24, 2023
1 parent e70196a commit fafe283
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,17 @@ public ResponseList<SearchConcordance> searchConcordance(Long projectId, SearchC
* @param groupId group identifier
* @param limit maximum number of items to retrieve (default 25)
* @param offset starting offset in the collection (default 0)
* @param userId filter by user identifier
* @return list of translation memories
* @see <ul>
* <li><a href="https://developer.crowdin.com/api/v2/#operation/api.tms.getMany" target="_blank"><b>API Documentation</b></a></li>
* <li><a href="https://developer.crowdin.com/enterprise/api/v2/#operation/api.tms.getMany" target="_blank"><b>Enterprise API Documentation</b></a></li>
* </ul>
*/
public ResponseList<TranslationMemory> listTms(Long groupId, Integer limit, Integer offset) throws HttpException, HttpBadRequestException {
public ResponseList<TranslationMemory> listTms(Long groupId, Integer limit, Integer offset, Integer userId) throws HttpException, HttpBadRequestException {
Map<String, Optional<Object>> queryParams = HttpRequestConfig.buildUrlParams(
"groupId", Optional.ofNullable(groupId),
"userId", Optional.ofNullable(userId),
"limit", Optional.ofNullable(limit),
"offset", Optional.ofNullable(offset)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ public class SearchConcordanceRequest {
private String targetLanguageId;
private Boolean autoSubstitution;
private Integer minRelevant;
/**
* @deprecated
*/
private String expression;
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void searchConcordanceTest() {

@Test
public void listTmsTest() {
ResponseList<TranslationMemory> translationMemoryResponseList = this.getTranslationMemoryApi().listTms(null, null, null);
ResponseList<TranslationMemory> translationMemoryResponseList = this.getTranslationMemoryApi().listTms(null, null, null, null);
assertEquals(translationMemoryResponseList.getData().size(), 1);
assertEquals(translationMemoryResponseList.getData().get(0).getData().getId(), tmId);
assertEquals(translationMemoryResponseList.getData().get(0).getData().getName(), name);
Expand Down

0 comments on commit fafe283

Please sign in to comment.