Skip to content

Commit 80eb458

Browse files
committed
v2.1
1 parent 8b9e43a commit 80eb458

File tree

11 files changed

+12
-164
lines changed

11 files changed

+12
-164
lines changed

maven-release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Usage: ./maven-release.sh v2.0 2.1-SNAPSHOT 2.0
44

5-
branch_to_release="master"
5+
branch_to_release="develop"
66

77
echo "Switching to the release branch..."
88
git fetch

src/com/convertapi/examples/AlternativeConverter.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/com/convertapi/examples/ConvertStream.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

src/com/convertapi/examples/CreateExceptionHandling.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/com/convertapi/examples/SimpleConversion.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/main/java/com/convertapi/client/Config.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.convertapi;
1+
package com.convertapi.client;
22

33
import okhttp3.OkHttpClient;
44

@@ -28,17 +28,17 @@ public Config(String secret, String scheme, String host, int timeout, Function<O
2828

2929
@SuppressWarnings("WeakerAccess")
3030
public static Config defaults() {
31-
return new Config(Config.defaultSecret, SCHEME, HOST, TIMEOUT, Config.defaultHttpClientBuilder);
31+
return new Config(Config.defaultSecret, SCHEME, HOST, defaultTimeout, Config.defaultHttpClientBuilder);
3232
}
3333

3434
@SuppressWarnings("WeakerAccess")
3535
public static Config defaults(String secret) {
36-
return new Config(secret, SCHEME, HOST, TIMEOUT, Config.defaultHttpClientBuilder);
36+
return new Config(secret, SCHEME, HOST, defaultTimeout, Config.defaultHttpClientBuilder);
3737
}
3838

3939
@SuppressWarnings("WeakerAccess")
4040
public static Config defaults(String secret, Function<OkHttpClient.Builder, OkHttpClient.Builder> httpClientBuilder) {
41-
return new Config(secret, SCHEME, HOST, TIMEOUT, httpClientBuilder);
41+
return new Config(secret, SCHEME, HOST, defaultTimeout, httpClientBuilder);
4242
}
4343

4444
@SuppressWarnings("unused")

src/main/java/com/convertapi/client/ConvertApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.convertapi.client;
22

33
import com.convertapi.client.model.ConversionResponse;
4-
import com.convertapi.client.model.User;
54
import com.convertapi.client.model.RemoteUploadResponse;
5+
import com.convertapi.client.model.User;
66
import com.google.gson.Gson;
77
import okhttp3.HttpUrl;
88
import okhttp3.MultipartBody;
@@ -136,11 +136,11 @@ public static void convertFile(String fromPathToFile, String toPathToFile) {
136136
convertFile(fromPathToFile, toPathToFile, Config.defaults().getSecret());
137137
}
138138

139-
public static void convert(String fromPathToFile, String toPathToFile, String secret) {
139+
public static void convertFile(String fromPathToFile, String toPathToFile, String secret) {
140140
try {
141141
Path fromPath = Paths.get(fromPathToFile);
142142
Path toPath = Paths.get(toPathToFile);
143-
convert(fromPath, getFileExtension(toPath), secret).get().saveFile(toPath).get();
143+
convertFile(fromPath, getFileExtension(toPath), secret).get().saveFile(toPath).get();
144144
} catch (IOException | ExecutionException | InterruptedException e) {
145145
throw new RuntimeException(e);
146146
}

src/main/java/com/convertapi/client/Http.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.convertapi.client;
22

3-
import com.convertapi.model.RemoteUploadResponse;
3+
import com.convertapi.client.model.RemoteUploadResponse;
44
import com.google.gson.Gson;
55
import okhttp3.*;
66

src/main/java/com/convertapi/client/Param.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.convertapi;
1+
package com.convertapi.client;
22

33
import okhttp3.MediaType;
44
import okhttp3.Request;

src/com/convertapi/RequestBodyStream.java renamed to src/main/java/com/convertapi/client/RequestBodyStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.convertapi;
1+
package com.convertapi.client;
22

33
import okhttp3.MediaType;
44
import okhttp3.RequestBody;

0 commit comments

Comments
 (0)