[libgweather] Passing an OWM api key from my Vala application

Fernando Casas Schössow via desktop-devel-list <[email protected]> Tue, 20 Apr 2021 10:33:49 +0200
Newsgroups gmane.comp.gnome.desktop
Message-ID <VI1PR03MB481450A9CFB2B02EAA450366A4489@VI1PR03MB4814.eurprd03.prod.outlook.com>
Hi there,

I'm working on a Vala application for Elementary OS Hera (Ubuntu 18.04) 
that uses libgweather (3.28) to retrieve weather information.
I would like to use OpenWeatherMap (OWM) service with my own api key 
but I wasn't able to find in the documentation (or online) any method 
or property to achieve this from the app code itself.

Should I do it while building my application with meson (like in the 
case of setting the -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE flag)?

It seems libgweather in Ubuntu is built with OWM_APIKEY defined but 
empty, since if I enable the service in my app I can see (in a network 
capture) the http request goes out with &APPID= at the end of the URL.

Apologies if my terminology is not correct, if I'm not clear enough or 
if a too simple question I'm totally new to Vala, meson, GTK, etc.

Thanks in advance for your replies.

Kind regards,

Fernando