Last active
December 17, 2018 21:19
-
-
Save mchmielarz/0762897aad51983254f7d13bed71adf8 to your computer and use it in GitHub Desktop.
Fetch data from Airly service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Try.of(() -> Uri.create("http://airapi.airly.eu/v2/measurements/nearest/...")) | |
.flatMap(this::callAirly) | |
.map(responseBody -> new RawMeasurements(coordinates.city(), responseBody)) | |
.mapTry(this::parse); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment