return new MeasurementCollectionImpl(restConnector, url, pageSize);
}
private PagedCollectionResource getMeasurementsBySourceAndDate(ManagedObjectRepresentation source,
Date dateFrom, Date dateTo) throws SDKException {
Map filter = new HashMap();
filter.put(SOURCE, source.getId().getValue());
filter.put(DATE_FROM, DateUtils.format(dateFrom));
filter.put(DATE_TO, DateUtils.format(dateTo));
String urlTemplate = getMeasurementApiRepresentation().getMeasurementsForSourceAndDate();
String url = templateUrlParser.replacePlaceholdersWithParams(urlTemplate, filter);
return new MeasurementCollectionImpl(restConnector, url, pageSize);
}