Class SolarEdgeApiClientImpl

  • All Implemented Interfaces:
    SolarEdgeApiClient

    public class SolarEdgeApiClientImpl
    extends java.lang.Object
    implements SolarEdgeApiClient
    Implementation of the solar edge api client interface. Requires a provided HttpClient, endPoint URI and api key value
    • Constructor Detail

      • SolarEdgeApiClientImpl

        public SolarEdgeApiClientImpl()
    • Method Detail

      • getSiteDetails

        public java.util.concurrent.CompletableFuture<SiteDetailsResponse> getSiteDetails​(int siteId)
        Description copied from interface: SolarEdgeApiClient
        Fetch the site details from the API
        Specified by:
        getSiteDetails in interface SolarEdgeApiClient
        Parameters:
        siteId - integer id of the site
        Returns:
        future that resolve with the site details associated with the provided site id
      • getOverviewResponse

        public java.util.concurrent.CompletableFuture<OverviewResponse> getOverviewResponse​(int siteId)
        Fetch a high level summary/overview of the site
        Specified by:
        getOverviewResponse in interface SolarEdgeApiClient
        Parameters:
        siteId - integer id of the site
        Returns:
        future that resolves with the overview response
      • getVersion

        public java.util.concurrent.CompletableFuture<VersionResponse> getVersion()
        Get the current version of the API
        Specified by:
        getVersion in interface SolarEdgeApiClient
        Returns:
        response object detailing the current version of the API server
      • getSupportedVersions

        public java.util.concurrent.CompletableFuture<SupportedVersionsResponse> getSupportedVersions()
        Get the list of supported versions by the API server
        Specified by:
        getSupportedVersions in interface SolarEdgeApiClient
        Returns:
        response object detailing the list of versions that the API server supports
      • getEnvironmentalBenefits

        public java.util.concurrent.CompletionStage<EnvironmentalBenefitsResponse> getEnvironmentalBenefits​(int siteId)
        Fetches the estimated environmental benefits impact information associated with the targeted site id
        Specified by:
        getEnvironmentalBenefits in interface SolarEdgeApiClient
        Parameters:
        siteId - targeted site id
        Returns:
        response object containing the estimated environmental impacts
      • getDetailedEnergyReport

        public java.util.concurrent.CompletableFuture<DetailedEnergyResponse> getDetailedEnergyReport​(int siteId,
                                                                                                      java.util.List<MeterType> meters,
                                                                                                      TimeUnitType timeUnitType,
                                                                                                      java.time.ZonedDateTime startTime,
                                                                                                      java.time.ZonedDateTime endTime)
        Fetches a detailed energy report as recorded by the specified meter types, at the targeted site, within the time window, and in the specified time resolution. The times should be in the the same zone as the site.
        Specified by:
        getDetailedEnergyReport in interface SolarEdgeApiClient
        Parameters:
        siteId - integer id of the site id
        meters - which meters to include the response
        timeUnitType - what time resolution is desired in the response
        startTime - the start time of the data window
        endTime - the end time of the data window
        Returns:
        a response containing the energy details as specified by the query parameters