public Cursor < DataPoint > readDataPoints ( Series series , Interval interval , DateTimeZone timezone , Rollup rollup , Interpolation interpolation ) { checkNotNull ( series ) ; checkNotNull ( interval ) ; checkNotNull ( timezone ) ; URI uri = null ; try { URIBuilder builder = new URIBuilder ( String . format ( "/%s/series/key/%s/segment/" , API_VERSION , urlencode ( series . getKey ( ) ) ) ) ; addInterpolationToURI ( builder , interpolation ) ; addIntervalToURI ( builder , interval ) ; addRollupToURI ( builder , rollup ) ; addTimeZoneToURI ( builder , timezone ) ; uri = builder . build ( ) ; } catch ( URISyntaxException e ) { String message = String . format ( "Could not build URI with inputs: key: %s, interval: %s, rollup: %s, timezone: %s" , series . getKey ( ) , interval , rollup , timezone ) ; throw new IllegalArgumentException ( message , e ) ; } Cursor < DataPoint > cursor = new DataPointCursor ( uri , this ) ; return cursor ; }
Returns a cursor of datapoints specified by series .