Skip to content

Commit 4b8f93e

Browse files
authored
Merge pull request #20 from VishwaGhodasara/patch-1
Update README.md
2 parents 9272040 + 73eda1b commit 4b8f93e

File tree

1 file changed

+27
-64
lines changed

1 file changed

+27
-64
lines changed

README.md

Lines changed: 27 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ The SDK provides a simple interface for all the [media APIs mentioned here](http
420420

421421
**1. List & Search Files**
422422

423-
Accepts an object specifying the parameters to be used to list and search files. All parameters specified in the [documentation here](https://docs.imagekit.io/api-reference/media-api/list-and-search-files) can be passed as-is with the correct values to get the results.
423+
Accepts an object of class `GetFileListRequest` specifying the parameters to be used to list and search files. All parameters specified in the [documentation here](https://docs.imagekit.io/api-reference/media-api/list-and-search-files) can be passed via their setter functions to get the results.
424424

425425
```java
426426
String[] tags = new String[3];
@@ -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 version 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 of class `FileUpdateRequest` 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 via their setter functions 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,7 @@ System.out.println(result.getResponseMetaData().getMap());
660648

661649
**12. Copy file**
662650

663-
It Copies the File as per the
664-
[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.
651+
Accepts the sourceFilePath and destinationPath to copy the File as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-file).
666652

667653
```java
668654
CopyFileRequest copyFileRequest = new CopyFileRequest();
@@ -680,9 +666,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
680666

681667
**13. Move file**
682668

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.
669+
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).
686670

687671
```java
688672
MoveFileRequest moveFileRequest = new MoveFileRequest();
@@ -699,9 +683,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
699683

700684
**14. Rename file**
701685

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.
686+
Accepts the filePath and newFileName to rename file as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/rename-file).
705687

706688
```java
707689
RenameFileRequest renameFileRequest = new RenameFileRequest();
@@ -719,9 +701,7 @@ System.out.println(resultRenameFile.getResponseMetaData().getMap());
719701

720702
**15. Restore file Version**
721703

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.
704+
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).
725705

726706
```java
727707
Result result = ImageKit.getInstance().restoreFileVersion("fileId", "versionId");
@@ -735,9 +715,7 @@ System.out.println(result.getResponseMetaData().getMap());
735715

736716
**16. Create Folder**
737717

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.
718+
Accepts the folderName and parentFolderPath to cretae folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/create-folder).
741719

742720
```java
743721
CreateFolderRequest createFolderRequest = new CreateFolderRequest();
@@ -754,9 +732,7 @@ System.out.println(resultEmptyBlock.getResponseMetaData().getMap());
754732

755733
**17. Delete Folder**
756734

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.
735+
Accepts the folderPath to delete folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/delete-folder).
760736

761737
```java
762738
DeleteFolderRequest deleteFolderRequest = new DeleteFolderRequest();
@@ -772,9 +748,7 @@ System.out.println(resultNoContent.getResponseMetaData().getMap());
772748

773749
**18. Copy Folder**
774750

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.
751+
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).
778752

779753
```java
780754
CopyFolderRequest copyFolderRequest = new CopyFolderRequest();
@@ -791,9 +765,7 @@ System.out.println(resultOfFolderActions.getResponseMetaData().getMap());
791765

792766
**19. Move Folder**
793767

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.
768+
Accepts the sourceFolderPath and destinationPath to move folder as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/move-folder).
797769

798770
```java
799771
MoveFolderRequest moveFolderRequest = new MoveFolderRequest();
@@ -810,9 +782,7 @@ System.out.println(resultOfFolderActions.getResponseMetaData().getMap());
810782

811783
**20. Get Bulk Job Status**
812784

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.
785+
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).
816786

817787
```java
818788
String jobId = "629f44ac7eb0fe8173622d4b";
@@ -827,8 +797,8 @@ System.out.println(resultBulkJobStatus.getResponseMetaData().getMap());
827797

828798
**21. Purge Cache**
829799

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.
800+
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).
801+
832802
```java
833803
ResultCache result=ImageKit.getInstance().purgeCache("https://ik.imagekit.io/imagekit-id/default-image.jpg");
834804
System.out.println("======FINAL RESULT=======");
@@ -841,8 +811,7 @@ System.out.println(result.getResponseMetaData().getMap());
841811

842812
**22. Purge Cache Status**
843813

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)
814+
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)
846815

847816
```java
848817
String requestId="cache-requestId";
@@ -858,6 +827,7 @@ System.out.println(result.getResponseMetaData().getMap());
858827
**23. Get File Metadata**
859828

860829
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)
830+
861831
```java
862832
String fileId="your-file-id";
863833
ResultMetaData result=ImageKit.getInstance().getFileMetadata(fileId);
@@ -883,11 +853,9 @@ System.out.println(result.getResponseMetaData().getMap());
883853

884854
**24. Create CustomMetaDataFields**
885855

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).
856+
Accepts an object of class `CustomMetaDataFieldCreateRequest` 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.
888857

889858
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.
891859

892860
#### Examples:
893861

@@ -958,8 +926,7 @@ ResultCustomMetaDataField resultCustomMetaDataField = ImageKit.getInstance()
958926

959927
**25. Get CustomMetaDataFields**
960928

961-
fetches the metadata as per the
962-
[API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/get-custom-metadata-field)
929+
Accepts the includeDeleted boolean and fetches the metadata as per the [API documentation here](https://docs.imagekit.io/api-reference/custom-metadata-fields-api/get-custom-metadata-field)
963930

964931
```java
965932
ResultCustomMetaDataFieldList resultCustomMetaDataFieldList=ImageKit.getInstance().getCustomMetaDataFields(false);
@@ -974,9 +941,7 @@ System.out.println(resultCustomMetaDataFieldList.getResultCustomMetaDataFields()
974941

975942
**26. Edit CustomMetaDataFields**
976943

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.
944+
Accepts an ID of customMetaDataField and object of class `CustomMetaDataFieldUpdateRequest` 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).
980945

981946
```java
982947
CustomMetaDataFieldSchemaObject schemaObject = new CustomMetaDataFieldSchemaObject();
@@ -998,9 +963,7 @@ System.out.println(resultCustomMetaDataField.getResponseMetaData().getMap());
998963

999964
**27. Delete CustomMetaDataFields**
1000965

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.
966+
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).
1004967

1005968
```java
1006969
ResultNoContent resultNoContent=ImageKit.getInstance().deleteCustomMetaDataField("id");

0 commit comments

Comments
 (0)