Closed Layerex closed 4 years ago
Thanks for the pull request! I would like to merge it after the following issues are addressed.
I think it's better to use HTTPS, even if the particular content (weather data) is not security-sensitive — in order not to “set a bad example” for others. Also, you never know which content will turn out to be security-sensitive in the future.
Both cURL and luacurl seem to be abandoned and unmaintained. Unfortunately, this situation is too common with Lua modules. I would rather use luasec and LuaSocket, which seem to be at least somewhat actively maintained. See the examples/*/btc-price.lua
for how to perform an HTTPS request with it.
URL encoding is no hard task; I think it’s better to implement it manually rather than introduce a dependency:
function urlencode(s)
return string.gsub(s, '[^-_.~a-zA-Z0-9]', function(c)
return string.format('%%%02X', string.byte(c))
end)
end
Merged, thanks!
nice widget and contests interesting!
Add a widget, which shows current state of weather in a specified location. That is my first pull request, I hope I did everything alright