Skip to content

Commit a09c676

Browse files
committed
gist markers
1 parent 4ee0cae commit a09c676

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/main/java/com/docusign/controller/monitor/examples/AbstractMonitorController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ protected String ensureUsageOfJWTToken(String accessToken, Session session) {
4040
* @return an instance of the {@link com.docusign.monitor.client.ApiClient}
4141
*/
4242
protected static ApiClient createApiClient(String accessToken, Session session) {
43+
44+
// Step 2 start
4345
ApiClient apiClient = new ApiClient(session.getBasePath());
4446
apiClient.addDefaultHeader(HttpHeaders.AUTHORIZATION, BEARER_AUTHENTICATION + accessToken);
45-
47+
// Step 2 end
4648
return apiClient;
4749
}
4850

src/main/java/com/docusign/controller/monitor/services/WebQueryEndpointService.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
import java.util.List;
1111

12+
1213
public final class WebQueryEndpointService {
14+
// Step 4 start
1315
private static final String API_VERSION = "2.0";
1416
private static final String NAME_OF_DATASET = "monitor";
1517
public static JSONObject postWebQueryMethod(
@@ -21,17 +23,18 @@ public static JSONObject postWebQueryMethod(
2123
API_VERSION,
2224
NAME_OF_DATASET,
2325
prepareWebQueryOptions(accountId, filterStartDate, filterEndDate));
24-
26+
2527
AggregateResultResult methodResult = null;
2628
List<AggregateResultResult> aggregateResultList = aggregateResult.getResult();
27-
29+
// Step 4 end
2830
if (aggregateResultList != null && !aggregateResultList.isEmpty()) {
2931
methodResult = aggregateResultList.get(0);
3032
}
3133

3234
return new JSONObject(methodResult);
3335
}
3436

37+
// Step 3 start
3538
private static WebQuery prepareWebQueryOptions(String accountId, String filterStartDate, String filterEndDate) {
3639
WebQuery webQuery = new WebQuery();
3740
webQuery.addFiltersItem(new Object(){
@@ -51,4 +54,6 @@ private static WebQuery prepareWebQueryOptions(String accountId, String filterSt
5154
});
5255
return webQuery;
5356
}
57+
// Step 3 end
5458
}
59+

0 commit comments

Comments
 (0)