Skip to content

Commit

Permalink
Merge pull request #74 from crowdin/api-update
Browse files Browse the repository at this point in the history
API updates:
  • Loading branch information
andrii-bodnar authored Jan 11, 2022
2 parents 8dac5b0 + 77e2bb2 commit 405c5d5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile "com.github.crowdin:crowdin-api-client-java:1.3.16"
compile "com.github.crowdin:crowdin-api-client-java:1.3.17"
}
```

Expand All @@ -46,7 +46,7 @@ dependencies {
<dependency>
<groupId>com.github.crowdin</groupId>
<artifactId>crowdin-api-client-java</artifactId>
<version>1.3.16</version>
<version>1.3.17</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

sourceCompatibility = 8
version '1.3.16'
version '1.3.17'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
public class AddGlossaryRequest {

private String name;
private String languageId;
private Long groupId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
public class AddTranslationMemoryRequest {

private String name;
private String languageId;
private Long groupId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class GlossariesApiTest extends TestClient {
private final String exportId = "5ed2ce93-6d47-4402-9e66-516ca835cb20";
private final String importId = "c050fba2-200e-4ce1-8de4-f7ba8eb58732";
private final String link = "test.com";
private final String languageId = "ro";

@Override
public List<RequestMock> getMocks() {
Expand Down Expand Up @@ -75,6 +76,7 @@ public void listGlossariesTest() {
public void addGlossaryTest() {
AddGlossaryRequest request = new AddGlossaryRequest();
request.setName(name);
request.setLanguageId(languageId);
request.setGroupId(groupId);
ResponseObject<Glossary> glossaryResponseObject = this.getGlossariesApi().addGlossary(request);
assertEquals(glossaryResponseObject.getData().getId(), glossaryId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class TranslationMemoryApiTest extends TestClient {
private final String exportId = "50fb3506-4127-4ba8-8296-f97dc7e3e0c3";
private final String importId = "b5215a34-1305-4b21-8054-fc2eb252842f";
private final String link = "test.com";
private final String languageId = "ro";

@Override
public List<RequestMock> getMocks() {
Expand Down Expand Up @@ -65,6 +66,7 @@ public void listTmsTest() {
public void addTmTest() {
AddTranslationMemoryRequest request = new AddTranslationMemoryRequest();
request.setName(name);
request.setLanguageId(languageId);
ResponseObject<TranslationMemory> translationMemoryResponseObject = this.getTranslationMemoryApi().addTm(request);
assertEquals(translationMemoryResponseObject.getData().getId(), tmId);
assertEquals(translationMemoryResponseObject.getData().getName(), name);
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/api/glossaries/addGlossaryRequest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "Be My Eyes iOS's Glossary",
"languageId": "ro",
"groupId": 2
}
3 changes: 2 additions & 1 deletion src/test/resources/api/translationmemory/addTmRequest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"name": "Knowledge Base's TM"
"name": "Knowledge Base's TM",
"languageId": "ro"
}

0 comments on commit 405c5d5

Please sign in to comment.