Interface GreenButtonApi
- All Known Implementing Classes:
GreenButtonClient
public interface GreenButtonApi
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<com.rometools.rome.feed.synd.SyndFeed> batchSubscription(String authId, String accessToken, Iterable<String> meters, ZonedDateTime publishedMin, ZonedDateTime publishedMax) reactor.core.publisher.Mono<HistoricalCollectionResponse> collectHistoricalData(List<String> meterIds, String company) Triggers historical data collection for the meters.reactor.core.publisher.Mono<Meter> fetchMeter(String meterId, String company) Fetches the details for one meter.reactor.core.publisher.Flux<MeterListing> fetchMeters(Pages slurp, List<String> authIds, String company) Fetches all meters that have been shared with this utility user.reactor.core.publisher.Mono<Boolean> isAlive()reactor.core.publisher.Mono<org.naesb.espi.ServiceStatus> reactor.core.publisher.Mono<com.rometools.rome.feed.synd.SyndFeed> retailCustomer(String authId, String accessToken) reactor.core.publisher.Mono<Authorization>
-
Method Details
-
readServiceStatus
reactor.core.publisher.Mono<org.naesb.espi.ServiceStatus> readServiceStatus() -
isAlive
reactor.core.publisher.Mono<Boolean> isAlive() -
batchSubscription
reactor.core.publisher.Flux<com.rometools.rome.feed.synd.SyndFeed> batchSubscription(String authId, String accessToken, Iterable<String> meters, ZonedDateTime publishedMin, ZonedDateTime publishedMax) -
retailCustomer
-
collectHistoricalData
reactor.core.publisher.Mono<HistoricalCollectionResponse> collectHistoricalData(List<String> meterIds, String company) Triggers historical data collection for the meters.- Parameters:
meterIds- the meters for which the collection should be triggeredcompany- the company to which the meters belong to- Returns:
- the result of the API call
-
fetchMeters
reactor.core.publisher.Flux<MeterListing> fetchMeters(Pages slurp, List<String> authIds, String company) Fetches all meters that have been shared with this utility user. Uses the JSON API to fetch the meter data: https://utilityapi.com/docs/api/meters/list. The API supports pagination, so it's possible to only request the first page or all pages.- Parameters:
slurp- if all pages should be requestedauthIds- auth IDs of the meters of interestcompany- the company which the meters belong to- Returns:
- shared meter
-
fetchMeter
Fetches the details for one meter.- Parameters:
meterId- the UID of the metercompany- the company of the meter- Returns:
- the meter details
-
revoke
-