/** * Create a new OICP v2.0 PullEVSEStatus request. * * @param ProviderId the unique identification of the EVSE service provider for this request. * @return a new PullEVSEStatusRequest builder object. */publicPullEVSEStatusRequestPullEVSEStatus(finalEVSP_IdProviderId){...}[...]/** * Create a new OICP v2.0 PullEVSEStatus request. * * @param ProviderId the unique identification of the EV service provider for this request. * @param SearchCenter the geocoordinates of the center of the search request. * @param DistanceKM the size of the search request area. * @param EVSEStatusFilter the status of the EVSEs to return. * @return a new PullEVSEStatus request builder object. */publicPullEVSEStatusRequestPullEVSEStatus(finalEMPClientEMPClient,finalEVSP_IdProviderId,finalGeoCoordinateSearchCenter,finalDoubleDistanceKM,finalEVSEStatusEVSEStatusFilter){...}// PullEVSEStatusRequest builder methods/** * Set the geocoordinates of the search request. * * @param GeoCoordinate the geocoordinates of the center of the search request. * @param DistanceKM radius of the search request. * @return the PullEVSEStatus request builder object. */publicPullEVSEStatusRequestsetSearchCenter(finalGeoCoordinateGeoCoordinate,finalDoubleDistanceKM){...}/** * Set the geocoordinates of the search request. * * @param Longitude the longitude of the center of the search request. * @param Latitude the latitude of the center of the search request. * @param DistanceKM radius of the search request. * @return the PullEVSEStatus request builder object. */publicPullEVSEStatusRequestsetSearchCenter(finalLongitudeLongitude,finalLatitudeLatitude,finalDoubleDistanceKM){...}/** * Set the the status of the EVSEs to return. * * @param EVSEStatusFilter the status of the EVSEs to return. * @return the PullEVSEStatus request builder object. */publicPullEVSEStatusRequestsetEVSEStatusFilter(finalEVSEStatusEVSEStatusFilter){{...}
CompletableFuturereq=newEMPClient("api.playground.hubject.com").PullEVSEStatus(EVSP_Id.Parse("DE*GDF")).setSearchCenter(Latitude.Parse(49.731102),Longitude.Parse(10.142533),100.0).setEVSEStatusFilter(EVSEStatus.Available).Run(EVSEStatus->{if(EVSEStatus.getStatusCode().hasResult())System.out.println(EVSEStatus.getOperatorEVSEStatus().map(evsestatus->"'"+evsestatus.getOperatorName()+"' has "+evsestatus.getEVSEStatusRecords().count()+" available EVSEs").reduce((a,b)->a+System.lineSeparator()+b).get());else{System.out.println(EVSEStatus.getStatusCode().getCode());System.out.println(EVSEStatus.getStatusCode().getDescription());System.out.println(EVSEStatus.getStatusCode().getAdditionalInfo());}});// Wait for the future to complete...req.get();
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.