Skip to content

fix: gradle version update #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,48 @@ Changes from 1.0.3 -> 2.0.0 are listed below
**How should I update my code?**
- If you still need to use `message` it will be there in the custom exceptions that could be raised when calling the various API methods. `isSuccessful` can be understood to be `true` if the API method doesn't throw any exception.

## Versioning
The SDK provides a simple interface for asset versioning. Asset versioning allows you to preserve, retrieve, and restore every version of any asset stored in your media library.

**1. Get file versions**

Check all the parameters and result structure [here](https://docs.imagekit.io/api-reference/media-api/get-file-versions)

```java
String fileId = "file_id";
ResultFileVersions resultFileVersions = ImageKit.getInstance().getFileVersions(fileId);
```

**2. Get file version details**

Check all the parameters and result structure [here](https://docs.imagekit.io/api-reference/media-api/get-file-version-details)

```java
String fileId = "file_id";
String versionId = "version_id";
ResultFileVersionDetails resultFileVersionDetails = ImageKit.getInstance().getFileVersionDetails(fileId, versionId);
```

**3. Delete file version**

Check all the parameters and result structure [here](https://docs.imagekit.io/api-reference/media-api/delete-file-version)

```java
DeleteFileVersionRequest deleteFileVersionRequest = new DeleteFileVersionRequest();
deleteFileVersionRequest.setFileId("file_id");
deleteFileVersionRequest.setVersionId("version_id");
ResultNoContent resultNoContent = ImageKit.getInstance().deleteFileVersion(deleteFileVersionRequest);
```

**4. Restore file version**

Check all the parameters and result structure [here](https://docs.imagekit.io/api-reference/media-api/restore-file-version)

```java
Result result = ImageKit.getInstance().restoreFileVersion("file_id", "version_id");
```



## URL generation

Expand Down Expand Up @@ -1125,7 +1167,7 @@ try {
}
```

## Supporttim
## Support
For any feedback or to report any issues or general implementation support, please reach out to [[email protected]]()


Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Sat Jan 04 19:50:00 IST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ public ResultOfFolderActions copyFolder(CopyFolderRequest copyFolderRequest)
RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json"),
new Gson().toJson(copyFolderRequest));

request = new Request.Builder().url(API_BASE_URL.concat("v1/bulkJobs/moveFolder")).post(requestBody)
request = new Request.Builder().url(API_BASE_URL.concat("v1/bulkJobs/copyFolder")).post(requestBody)
.headers(Headers.of(headers)).build();

try {
Expand Down