From feb9ae58d95f9d9ec8c61bea95e39f0e8a8a069f Mon Sep 17 00:00:00 2001 From: yosoyubik Date: Sun, 1 Sep 2019 12:59:21 +0200 Subject: [PATCH] weather: updates api url to use automatic units Appends a parameter 'units=auto' to the darksky api endpoint that "automatically select[s] units based on geographic location" --- pkg/arvo/app/weather.hoon | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/arvo/app/weather.hoon b/pkg/arvo/app/weather.hoon index 4623587bc..b7a2de6a8 100644 --- a/pkg/arvo/app/weather.hoon +++ b/pkg/arvo/app/weather.hoon @@ -87,10 +87,10 @@ ++ request-darksky |= location=@t ^- request:http - =/ url/@t - %- crip %+ weld - (trip 'https://api.darksky.net/forecast/634639c10670c7376dc66b6692fe57ca/') - (trip location) + =/ base + "https://api.darksky.net/forecast/634639c10670c7376dc66b6692fe57ca/" + =/ url/@t %- crip + :(weld base (trip location) "?units=auto") =/ hed [['Accept' 'application/json']]~ [%'GET' url hed *(unit octs)] ::