box comment of all files
Can someone share the code snippet to list all the comments of a given file id using box V2?
While iterating the file(s) in a folder, all comments are listed.
Thanks
-
You will first need to get a list of the user's files, and then request the comments on each of the files.
Here is an example using our Java SDK that shows how to iterate over a folder's items:
BoxFolder folder = new BoxFolder(api, "id"); for (BoxItem.Info itemInfo : folder) { if (itemInfo instanceof BoxFile.Info) { BoxFile.Info fileInfo = (BoxFile.Info) itemInfo; // Do something with the file. } else if (itemInfo instanceof BoxFolder.Info) { BoxFolder.Info folderInfo = (BoxFolder.Info) itemInfo; // Do something with the folder. } }
Here is an example using our Java SDK that shows how to get all comments on a file:
BoxFile file = new BoxFile(api, "id"); List comments = file.getComments();
We have SDKs in many languages. What language do you need an example for?
サインインしてコメントを残してください。
コメント
1件のコメント