sonichy / dde-dock-weather Goto Github PK
View Code? Open in Web Editor NEWDeepin Linux DDE-Dock weather forcast plugin
Deepin Linux DDE-Dock weather forcast plugin
It would be interesting to look for the city by geolocation, not just by its name.
It could have two latitude and longitude fields below the city name field, because api openweathermap accepts geolocation.
API call:
By geographic coordinates
api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}
Parameters:
lat, lon coordinates of the location of your interest
Examples of API calls:
api.openweathermap.org/data/2.5/weather?lat=35&lon=139
API response:
{"coord":{"lon":139,"lat":35},
"sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049},
"weather":[{"id":804,"main":"clouds","description":"overcast clouds","icon":"04n"}],
"main":{"temp":289.5,"humidity":89,"pressure":1013,"temp_min":287.04,"temp_max":292.04},
"wind":{"speed":7.31,"deg":187.002},
"rain":{"3h":0},
"clouds":{"all":92},
"dt":1369824698,
"id":1851632,
"name":"Shuzenji",
"cod":200}
when the city name has space does not work as
new York
apt-get install libdtkwidget-dev
36℃ 路过
如题
Widget just show N/A in all strings
(It doesn't** sorry for my engish) I was trying to install it, had some difficulty but I finally could. After doing the command "killall dde-dock" it says something like "The plugin libHTYWeather.so is not compatible with the system." (my Deepin is in Portuguese). What could I do maybe? Or is it a problem with the code?
大佬,你写的这个城市显示不对,
错误提示为:城市名返回城市id为空
获取省份的api:http://www.nmc.cn/f/rest/province 返回一个json,可以拿到山东省的code是ASD;
获取城市的api: http://www.nmc.cn/f/rest/province/ASD 返回一个json,可以拿到烟台市的code是54765
通过http://www.nmc.cn/publish/forecast/ASD/yantai.html 可以直接调用浏览器打开页面
通过 http://www.nmc.cn/f/rest/real/54765 返回json可以拿到烟台市的天气,风力和预警警报
通过http://www.nmc.cn/f/rest/tempchart/54765 返回json可以拿到前七天和后七天的最高温度和最低温度,以及天气图片(数字表示)
还一个未来七天精确到每两个小时预报的那个太复杂,就算了,好像也用不到那个
墙裂要求添加 版本分支和编译指引 (狗头
如题:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.