use of com.synopsys.integration.blackduck.service.request.NotificationEditor in project hub-alert by blackducksoftware.
the class BlackDuckNotificationRetriever method createNotificationsRequest.
private BlackDuckMultipleRequest<NotificationUserView> createNotificationsRequest(DateRange dateRange, List<String> notificationTypesToInclude) throws IntegrationException {
UserView currentUser = blackDuckApiClient.getResponse(apiDiscovery.metaCurrentUserLink());
UrlMultipleResponses<NotificationUserView> currentUserNotificationsUrl = currentUser.metaNotificationsLink();
NotificationEditor notificationEditor = new NotificationEditor(dateRange.getStart(), dateRange.getEnd(), notificationTypesToInclude);
BlackDuckMultipleRequest<NotificationUserView> spec = new BlackDuckRequestBuilder().commonGet().apply(notificationEditor).addQueryParameter("sort", String.format("%s asc", PAGE_SORT_FIELD)).buildBlackDuckRequest(currentUserNotificationsUrl);
return spec;
}
Aggregations