Skip to content

Commit 3621add

Browse files
Update README.md
1 parent 9272040 commit 3621add

1 file changed

Lines changed: 26 additions & 61 deletions

File tree

README.md

Lines changed: 26 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,7 @@ System.out.println(result.getResponseMetaData().getMap());
462462

463463
**3. Get File Versions**
464464

465-
It Gets the File versions as per the
466-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/get-file-versions).
467-
The argument to the `getFileVersions()` method accepts the fileId for which file has to be get or Fetched the versions.
465+
Accepts the file ID and fetches the details as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/get-file-versions).
468466

469467
```java
470468
String fileId = "62a04834c10d49825c6de9e8";
@@ -479,9 +477,7 @@ System.out.println(resultFileVersions.getResponseMetaData().getMap());
479477

480478
**4. Get File Version details**
481479

482-
It Gets the File version details as per the
483-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/get-file-version-details).
484-
The argument to the `getFileVersionDetails()` method accepts the fileId and versionId for which file has to be get or Fetched with particular version.
480+
Accepts the file ID and vesrion ID and fetches the details as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/get-file-version-details).
485481

486482
```java
487483
String fileId = "62a04834c10d49825c6de9e8";
@@ -497,8 +493,7 @@ System.out.println(resultFileVersionDetails.getResponseMetaData().getMap());
497493

498494
**5. Update File Details**
499495

500-
It updates the file properties as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/update-file-details).
501-
The argument to the `updateDetail()` method is the object of `FileUpdateRequest` class, and the constructor will take the file ID and then set the parameters to be updated.
496+
Accepts an object specifying the parameters to be used to update file details. All parameters specified in the [documentation here] (https://docs.imagekit.io/api-reference/media-api/update-file-details) can be passed as-is with the correct values to get the results.
502497

503498
```java
504499
List<String> tags = new ArrayList<>();
@@ -543,8 +538,7 @@ System.out.println(result.getResponseMetaData().getMap());
543538

544539
**6. Add tags**
545540

546-
Add tags using the FileIds and tags which we want to add in request as per the
547-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/add-tags-bulk)
541+
Accepts the file IDs and tags and add tags as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/add-tags-bulk)
548542

549543
```java
550544
List<String> fileIds = new ArrayList<>();
@@ -563,8 +557,7 @@ System.out.println(resultTags.getResponseMetaData().getMap());
563557

564558
**7. Remove tags**
565559

566-
Removed tags using the FileIds and tags which we want to remove from request as per the
567-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/remove-tags-bulk)
560+
Accepts the file IDs and tags to remove tags as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/remove-tags-bulk)
568561

569562
```java
570563
List<String> fileIds = new ArrayList<>();
@@ -583,8 +576,7 @@ System.out.println(resultTags.getResponseMetaData().getMap());
583576

584577
**8. Remove AI tags**
585578

586-
Removed AITags using the FileIds and AITags which we want to remove from request as per the
587-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/remove-aitags-bulk)
579+
Accepts the file IDs and AI tags to remove AI tags as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/remove-aitags-bulk)
588580

589581
```java
590582
List<String> fileIds = new ArrayList<>();
@@ -605,8 +597,7 @@ System.out.println(resultTags.getResponseMetaData().getMap());
605597

606598
**9. Delete File**
607599

608-
Delete a file as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-file). The method accepts the file ID of the file that has to be
609-
deleted.
600+
Accepts the file ID and delete a file as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-file).
610601

611602
```java
612603
String fileId="your-file-id";
@@ -621,9 +612,7 @@ System.out.println(result.getResponseMetaData().getMap());
621612

622613
**10. Delete FileVersion**
623614

624-
It deletes the FileVersion as per the
625-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-file-version).
626-
The argument to the `deleteFileVersion()` method accepts the id of file and versionID to delete particular version of the file except current version which we want to be deleted.
615+
Accepts the file ID and version ID (particular version of the file except current version) to delete a FileVersion as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-file-version).
627616

628617
```java
629618
DeleteFileVersionRequest deleteFileVersionRequest = new DeleteFileVersionRequest();
@@ -640,8 +629,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
640629

641630
**11. Delete files (bulk)**
642631

643-
Delete multiple files as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-files-bulk). The method accepts multiple file ID of the file that has to be
644-
deleted.
632+
Accepts the file IDs to delete files as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-files-bulk).
645633

646634
```java
647635
List<String> fileIds = new ArrayList<>();
@@ -660,9 +648,8 @@ System.out.println(result.getResponseMetaData().getMap());
660648

661649
**12. Copy file**
662650

663-
It Copies the File as per the
651+
Accepts the sourceFilePath and destinationPath to copy the File as per the
664652
[API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-file).
665-
The argument to the `copyFile()` method accepts the sourceFilePath and destinationPath that where we want to be copied it.
666653

667654
```java
668655
CopyFileRequest copyFileRequest = new CopyFileRequest();
@@ -680,9 +667,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
680667

681668
**13. Move file**
682669

683-
It Moves the File as per the
684-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/move-file).
685-
The argument to the `moveFile()` method accepts the sourceFilePath and destinationPath that where we want to be moved it.
670+
Accepts the sourceFilePath and destinationPath to move the File as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/move-file).
686671

687672
```java
688673
MoveFileRequest moveFileRequest = new MoveFileRequest();
@@ -699,9 +684,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
699684

700685
**14. Rename file**
701686

702-
It Renames the File as per the
703-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/rename-file).
704-
The argument to the `renameFile()` method accepts the filePath for which you wants to rename and newFileName that with which you want to renamed it with purgeCache boolean.
687+
Accepts the filePath and newFileName to rename file as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/rename-file).
705688

706689
```java
707690
RenameFileRequest renameFileRequest = new RenameFileRequest();
@@ -719,9 +702,7 @@ System.out.println(resultRenameFile.getResponseMetaData().getMap());
719702

720703
**15. Restore file Version**
721704

722-
It Restores file version to a different version of a file as per the
723-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/restore-file-version).
724-
The argument to the `restoreFileVersion()` method accepts the fileId and versionId.
705+
Accepts the fileId and versionId to restore file version as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/restore-file-version).
725706

726707
```java
727708
Result result = ImageKit.getInstance().restoreFileVersion("fileId", "versionId");
@@ -735,9 +716,7 @@ System.out.println(result.getResponseMetaData().getMap());
735716

736717
**16. Create Folder**
737718

738-
It Creates the Folder as per the
739-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/create-folder).
740-
The argument to the `createFolder()` method accepts the folderName and parentFolderPath.
719+
Accepts the folderName and parentFolderPath to cretae folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/create-folder).
741720

742721
```java
743722
CreateFolderRequest createFolderRequest = new CreateFolderRequest();
@@ -754,9 +733,7 @@ System.out.println(resultEmptyBlock.getResponseMetaData().getMap());
754733

755734
**17. Delete Folder**
756735

757-
It Deletes the Folder as per the
758-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-folder).
759-
The argument to the `deleteFolder()` method accepts the folderPath for which the folder has to be deleted.
736+
Accepts the folderPath to delete folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-folder).
760737

761738
```java
762739
DeleteFolderRequest deleteFolderRequest = new DeleteFolderRequest();
@@ -772,9 +749,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
772749

773750
**18. Copy Folder**
774751

775-
It Copies the Folder as per the
776-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-folder).
777-
The argument to the `copyFolder()` method accepts the sourceFolderPath, destinationPath and includeFileVersions for which the folder has to be copied.
752+
Accepts the sourceFolderPath, destinationPath and includeFileVersions to copy folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-folder).
778753

779754
```java
780755
CopyFolderRequest copyFolderRequest = new CopyFolderRequest();
@@ -791,9 +766,7 @@ System.out.println(resultOfFolderActions.getResponseMetaData().getMap());
791766

792767
**19. Move Folder**
793768

794-
It Moves the Folder as per the
795-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/move-folder).
796-
The argument to the `moveFolder()` method accepts the sourceFolderPath, destinationPath for which the folder has to be moved.
769+
Accepts the sourceFolderPath and destinationPath to move folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/move-folder).
797770

798771
```java
799772
MoveFolderRequest moveFolderRequest = new MoveFolderRequest();
@@ -810,9 +783,7 @@ System.out.println(resultOfFolderActions.getResponseMetaData().getMap());
810783

811784
**20. Get Bulk Job Status**
812785

813-
It Gets the Job status as per the
814-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-move-folder-status).
815-
The argument to the `getBulkJobStatus()` method accepts the jobId for which job has to be get or Fetched the status.
786+
Accepts the jobId to get bulk job status as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-move-folder-status).
816787

817788
```java
818789
String jobId = "629f44ac7eb0fe8173622d4b";
@@ -827,8 +798,8 @@ System.out.println(resultBulkJobStatus.getResponseMetaData().getMap());
827798

828799
**21. Purge Cache**
829800

830-
Programmatically issue a cache clear request as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/purge-cache).
831-
Accepts the full URL of the file for which the cache has to be cleared.
801+
Accepts a full URL of the file for which the cache has to be cleared as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/purge-cache).
802+
832803
```java
833804
ResultCache result=ImageKit.getInstance().purgeCache("https://ik.imagekit.io/imagekit-id/default-image.jpg");
834805
System.out.println("======FINAL RESULT=======");
@@ -841,8 +812,7 @@ System.out.println(result.getResponseMetaData().getMap());
841812

842813
**22. Purge Cache Status**
843814

844-
Get the purge cache request status using the request ID returned when a purge cache request gets submitted as pet the
845-
[API documentation here](https://docs.imagekit.io/api-reference/media-api/purge-cache-status)
815+
Accepts a request ID and fetch purge cache status as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/purge-cache-status)
846816

847817
```java
848818
String requestId="cache-requestId";
@@ -858,6 +828,7 @@ System.out.println(result.getResponseMetaData().getMap());
858828
**23. Get File Metadata**
859829

860830
Accepts the file ID and fetches the metadata as per the [API documentation here](https://docs.imagekit.io/api-reference/metadata-api/get-image-metadata-for-uploaded-media-files)
831+
861832
```java
862833
String fileId="your-file-id";
863834
ResultMetaData result=ImageKit.getInstance().getFileMetadata(fileId);
@@ -883,11 +854,9 @@ System.out.println(result.getResponseMetaData().getMap());
883854

884855
**24. Create CustomMetaDataFields**
885856

886-
It creates the CustomMetaDataFields as per the
887-
[API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/create-custom-metadata-field).
857+
Accepts an object specifying the parameters to be used to create cusomMetaDataFields. All parameters specified in the [documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/create-custom-metadata-field) can be passed as-is with the correct values to get the results.
888858

889859
Check for the [Allowed Values In The Schema](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/create-custom-metadata-field#allowed-values-in-the-schema-object).
890-
The argument to the `createCustomMetaDataFields()` method is the object of `CustomMetaDataFieldCreateRequest` class.
891860

892861
#### Examples:
893862

@@ -958,7 +927,7 @@ ResultCustomMetaDataField resultCustomMetaDataField = ImageKit.getInstance()
958927

959928
**25. Get CustomMetaDataFields**
960929

961-
fetches the metadata as per the
930+
Fetches the metadata as per the
962931
[API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/get-custom-metadata-field)
963932

964933
```java
@@ -974,9 +943,7 @@ System.out.println(resultCustomMetaDataFieldList.getResultCustomMetaDataFields()
974943

975944
**26. Edit CustomMetaDataFields**
976945

977-
It edits the CustomMetaDataFields as per the
978-
[API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/update-custom-metadata-field).
979-
The argument to the `updateCustomMetaDataFields()` method is the object of `CustomMetaDataFieldUpdateRequest` class.
946+
Accepts an ID of customMetaDataField and object specifying the parameters to be used to edit cusomMetaDataFields as per the [API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/update-custom-metadata-field).
980947

981948
```java
982949
CustomMetaDataFieldSchemaObject schemaObject = new CustomMetaDataFieldSchemaObject();
@@ -998,9 +965,7 @@ System.out.println(resultCustomMetaDataField.getResponseMetaData().getMap());
998965

999966
**27. Delete CustomMetaDataFields**
1000967

1001-
It deletes the CustomMetaDataFields as per the
1002-
[API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/delete-custom-metadata-field).
1003-
The argument to the `deleteCustomMetaDataField()` method accepts the id of customMetaDataField which we want to be deleted.
968+
Accepts the id to delete the customMetaDataFields as per the [API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/delete-custom-metadata-field).
1004969

1005970
```java
1006971
ResultNoContent resultNoContent=ImageKit.getInstance().deleteCustomMetaDataField("id");

0 commit comments

Comments
 (0)