Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.46.0
v2.49.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>ai.reveng</groupId>
<artifactId>sdk</artifactId>
<version>2.46.0</version>
<version>2.49.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -31,7 +31,7 @@ repositories {
}

dependencies {
implementation "ai.reveng:sdk:2.46.0"
implementation "ai.reveng:sdk:2.49.0"
}
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'ai.reveng'
version = '2.46.0'
version = '2.49.0'



Expand Down Expand Up @@ -171,7 +171,7 @@ mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

coordinates("ai.reveng", "sdk", "2.46.0")
coordinates("ai.reveng", "sdk", "2.49.0")

pom {
name = "sdk"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ai.reveng",
name := "sdk",
version := "2.46.0",
version := "2.49.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
10 changes: 8 additions & 2 deletions docs/CollectionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public class Example {

<a id="getCollection"></a>
# **getCollection**
> BaseResponseCollectionResponse getCollection(collectionId, includeTags, includeBinaries)
> BaseResponseCollectionResponse getCollection(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr)

Returns a collection

Expand Down Expand Up @@ -186,8 +186,11 @@ public class Example {
Integer collectionId = 56; // Integer |
Boolean includeTags = false; // Boolean |
Boolean includeBinaries = false; // Boolean |
Integer pageSize = 10; // Integer |
Integer pageNumber = 1; // Integer |
String binarySearchStr = "binarySearchStr_example"; // String |
try {
BaseResponseCollectionResponse result = apiInstance.getCollection(collectionId, includeTags, includeBinaries);
BaseResponseCollectionResponse result = apiInstance.getCollection(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollectionsApi#getCollection");
Expand All @@ -207,6 +210,9 @@ public class Example {
| **collectionId** | **Integer**| | |
| **includeTags** | **Boolean**| | [optional] [default to false] |
| **includeBinaries** | **Boolean**| | [optional] [default to false] |
| **pageSize** | **Integer**| | [optional] [default to 10] |
| **pageNumber** | **Integer**| | [optional] [default to 1] |
| **binarySearchStr** | **String**| | [optional] |

### Return type

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sdk</artifactId>
<packaging>jar</packaging>
<name>sdk</name>
<version>2.46.0</version>
<version>2.49.0</version>
<url>https://github.com/RevEngAI/sdk-java</url>
<description>Java SDK for the RevEng.AI API</description>
<scm>
Expand Down
42 changes: 33 additions & 9 deletions src/main/java/ai/reveng/api/CollectionsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,9 @@ public okhttp3.Call deleteCollectionAsync(@javax.annotation.Nonnull Integer coll
* @param collectionId (required)
* @param includeTags (optional, default to false)
* @param includeBinaries (optional, default to false)
* @param pageSize (optional, default to 10)
* @param pageNumber (optional, default to 1)
* @param binarySearchStr (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Expand All @@ -361,7 +364,7 @@ public okhttp3.Call deleteCollectionAsync(@javax.annotation.Nonnull Integer coll
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, final ApiCallback _callback) throws ApiException {
public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
Expand Down Expand Up @@ -395,6 +398,18 @@ public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collecti
localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_binaries", includeBinaries));
}

if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
}

if (pageNumber != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_number", pageNumber));
}

if (binarySearchStr != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("binary_search_str", binarySearchStr));
}

final String[] localVarAccepts = {
"application/json"
};
Expand All @@ -415,13 +430,13 @@ public okhttp3.Call getCollectionCall(@javax.annotation.Nonnull Integer collecti
}

@SuppressWarnings("rawtypes")
private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, final ApiCallback _callback) throws ApiException {
private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'collectionId' is set
if (collectionId == null) {
throw new ApiException("Missing the required parameter 'collectionId' when calling getCollection(Async)");
}

return getCollectionCall(collectionId, includeTags, includeBinaries, _callback);
return getCollectionCall(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr, _callback);

}

Expand All @@ -431,6 +446,9 @@ private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull I
* @param collectionId (required)
* @param includeTags (optional, default to false)
* @param includeBinaries (optional, default to false)
* @param pageSize (optional, default to 10)
* @param pageNumber (optional, default to 1)
* @param binarySearchStr (optional)
* @return BaseResponseCollectionResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -441,8 +459,8 @@ private okhttp3.Call getCollectionValidateBeforeCall(@javax.annotation.Nonnull I
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries) throws ApiException {
ApiResponse<BaseResponseCollectionResponse> localVarResp = getCollectionWithHttpInfo(collectionId, includeTags, includeBinaries);
public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr) throws ApiException {
ApiResponse<BaseResponseCollectionResponse> localVarResp = getCollectionWithHttpInfo(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr);
return localVarResp.getData();
}

Expand All @@ -452,6 +470,9 @@ public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull In
* @param collectionId (required)
* @param includeTags (optional, default to false)
* @param includeBinaries (optional, default to false)
* @param pageSize (optional, default to 10)
* @param pageNumber (optional, default to 1)
* @param binarySearchStr (optional)
* @return ApiResponse&lt;BaseResponseCollectionResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -462,8 +483,8 @@ public BaseResponseCollectionResponse getCollection(@javax.annotation.Nonnull In
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public ApiResponse<BaseResponseCollectionResponse> getCollectionWithHttpInfo(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries) throws ApiException {
okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, null);
public ApiResponse<BaseResponseCollectionResponse> getCollectionWithHttpInfo(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr) throws ApiException {
okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr, null);
Type localVarReturnType = new TypeToken<BaseResponseCollectionResponse>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
Expand All @@ -474,6 +495,9 @@ public ApiResponse<BaseResponseCollectionResponse> getCollectionWithHttpInfo(@ja
* @param collectionId (required)
* @param includeTags (optional, default to false)
* @param includeBinaries (optional, default to false)
* @param pageSize (optional, default to 10)
* @param pageNumber (optional, default to 1)
* @param binarySearchStr (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
Expand All @@ -485,9 +509,9 @@ public ApiResponse<BaseResponseCollectionResponse> getCollectionWithHttpInfo(@ja
<tr><td> 422 </td><td> Invalid request parameters </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getCollectionAsync(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, final ApiCallback<BaseResponseCollectionResponse> _callback) throws ApiException {
public okhttp3.Call getCollectionAsync(@javax.annotation.Nonnull Integer collectionId, @javax.annotation.Nullable Boolean includeTags, @javax.annotation.Nullable Boolean includeBinaries, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable Integer pageNumber, @javax.annotation.Nullable String binarySearchStr, final ApiCallback<BaseResponseCollectionResponse> _callback) throws ApiException {

okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, _callback);
okhttp3.Call localVarCall = getCollectionValidateBeforeCall(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr, _callback);
Type localVarReturnType = new TypeToken<BaseResponseCollectionResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/2.46.0/java");
setUserAgent("OpenAPI-Generator/2.49.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "2.46.0";
public static final String VERSION = "2.49.0";

private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
Expand Down
5 changes: 4 additions & 1 deletion src/test/java/ai/reveng/api/CollectionsApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ public void getCollectionTest() throws ApiException {
Integer collectionId = null;
Boolean includeTags = null;
Boolean includeBinaries = null;
BaseResponseCollectionResponse response = api.getCollection(collectionId, includeTags, includeBinaries);
Integer pageSize = null;
Integer pageNumber = null;
String binarySearchStr = null;
BaseResponseCollectionResponse response = api.getCollection(collectionId, includeTags, includeBinaries, pageSize, pageNumber, binarySearchStr);
// TODO: test validations
}

Expand Down