-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFolderExample.java
31 lines (25 loc) · 1.19 KB
/
FolderExample.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import com.signnow.api.folder.request.FolderDocumentsGetRequest;
import com.signnow.api.folder.response.FolderDocumentsGetResponse;
import com.signnow.core.ApiClient;
import com.signnow.core.exception.SignNowApiException;
import com.signnow.core.factory.SdkFactory;
public class FolderExample {
public static void main(String[] args) {
// Set your actual input data here
// Note: following values are dummy, just for example
//----------------------------------------------------
// if it is not specified here, a new Bearer token will be created automatically
String bearerToken = "";
String folderId = "14f2b0157ce3cb455a2d8031ccc1fc08bd32f8b5";
try {
ApiClient client = SdkFactory.createApiClientWithBearerToken(bearerToken);
FolderDocumentsGetRequest request = new FolderDocumentsGetRequest();
request.withFolderId(folderId);
FolderDocumentsGetResponse response = (FolderDocumentsGetResponse) client.send(request).getResponse();
System.out.println("Folder ID: " + response.getId());
System.out.println("Folder Name: " + response.getName());
} catch (SignNowApiException e) {
System.out.println("ERROR: " + e.getMessage());
}
}
}