public Result < Summary > readSummary ( Series series , Interval interval ) { checkNotNull ( series ) ; checkNotNull ( interval ) ; DateTimeZone timezone = interval . getStart ( ) . getChronology ( ) . getZone ( ) ; URI uri = null ; try { URIBuilder builder = new URIBuilder ( String . format ( "/%s/series/key/%s/summary/" , API_VERSION , urlencode ( series . getKey ( ) ) ) ) ; addIntervalToURI ( builder , interval ) ; addTimeZoneToURI ( builder , timezone ) ; uri = builder . build ( ) ; } catch ( URISyntaxException e ) { String message = String . format ( "Could not build URI with inputs: key: %s, interval: %s, timezone: %s" , series . getKey ( ) , interval . toString ( ) , timezone . toString ( ) ) ; throw new IllegalArgumentException ( message , e ) ; } HttpRequest request = buildRequest ( uri . toString ( ) ) ; Result < Summary > result = execute ( request , Summary . class ) ; return result ; }
Reads summary statistics for a series for the specified interval .