eoe 移动开发者论坛

 找回密码
 加入eoe

QQ登录

只需一步,快速开始

查看: 27372|回复: 206
收起左侧

[Android实例] 中国天气api接口,全json数据(第二弹)

    [复制链接]

签到天数: 6 天

连续签到: 1 天

[LV.2]偶尔看看I

7

主题

248

帖子

3140

e币
QQ认证社区认证会员
发表于 2014-5-16 23:12:45 | 显示全部楼层 |阅读模式

没有eoe的账号,级别还太低,出门如何吹牛逼?

您需要 登录 才可以下载或查看,没有帐号?加入eoe

x
本帖最后由 江湖§相忘 于 2014-5-28 16:25 编辑

在此声明:本代码仅供网友测试使用,若用作商业用途,请申请正规api接口,若因接口产生的商业纠本人概不负责...

在上篇帖子中已经介绍了中华万年历的天气接口不知道朋友们是否过瘾????

上篇地址..........
http://www.eoeandroid.com/thread-331843-1-1.html
天气配套CityPicker,天气接口(第三弹)

现在,我又回来了,带着大数据回来了!!!

按照惯例,还是先看一下数据吧,

[mw_shl_code=java,true]weather_callback({"weatherinfo":{"city":"威海","city_en":"weihai","date_y":"2014年5月16日","date":"四月十八","week":"星期五","fchh":"18","cityid":"101121301","temp1":"14℃","temp2":"23℃~15℃","temp3":"26℃~15℃","temp4":"25℃~13℃","temp5":"22℃~12℃","temp6":"25℃~15℃","tempF1":"57.2℉~73.4℉","tempF2":"59℉~78.8℉","tempF3":"59℉~77℉","tempF4":"55.4℉~71.6℉","tempF5":"53.6℉~77℉","tempF6":"59℉~82.4℉","weather1":"多云转晴","weather2":"晴","weather3":"晴转多云","weather4":"阵雨转多云","weather5":"晴","weather6":"晴","img1":"1","img2":"0","img3":"0","img4":"99","img5":"0","img6":"1","img7":"3","img8":"1","img9":"0","img10":"99","img11":"0","img12":"99","img_single":"0","img_title1":"多云","img_title2":"晴","img_title3":"晴","img_title4":"晴","img_title5":"晴","img_title6":"多云","img_title7":"阵雨","img_title8":"多云","img_title9":"晴","img_title10":"晴","img_title11":"晴","img_title12":"晴","img_title_single":"晴","wind1":"东北风转南风3-4级","wind2":"南风3-4级","wind3":"南风3-4级","wind4":"南风3-4级转北风4-5级","wind5":"南风3-4级","wind6":"西南风4-5级","fx1":"东北风","fx2":"南风","fl1":"3-4级","fl2":"3-4级","fl3":"3-4级","fl4":"3-4级转4-5级","fl5":"3-4级","fl6":"4-5级","index":"较舒适","index_d":"建议着薄外套、开衫牛仔衫裤等服装。年老体弱者应适当添加衣物,宜着夹克衫、薄毛衣等。","index48":"","index48_d":"","index_uv":"中等","index48_uv":"","index_xc":"较适宜","index_tr":"适宜","index_co":"较不舒适","st1":"22","st2":"12","st3":"24","st4":"14","st5":"24","st6":"14","index_cl":"较适宜","index_ls":"适宜","index_ag":"易发","temp":"16","wd":"东北风","ws":"2级","sd":"74%","wse":"2","index_ct":"较舒适","index_ct_d":"建议穿薄外套或牛仔裤等服装","index_yd":"较适宜","index_yd_d":"风力较强且气温较低,请进行室内运动","index_xc_d":"无雨,风力较大,洗车后会蒙上灰尘","index_pp":"保湿","index_pp_d":"请选用中性保湿型霜类化妆品","index_gm":"较易发","index_gm_d":"风较大,较易发生感冒,注意防护","index_uv_d":"涂擦SPF大于15、PA+防晒护肤品","index_co_d":"白天风力较大,人体感觉较不舒适","index_gj":"较不宜","index_gj_d":"风力较大,坚持出门需注意避风","index_mf":"适宜","index_mf_d":"建议选择含防晒滋润成分的护发品","index_ys":"不带伞","index_ys_d":"天气较好,不用带雨伞","index_jt":"良好","index_jt_d":"气象条件良好,车辆可以正常行驶","index_lk":"干燥","index_lk_d":"天气较好,路面较干燥,路况较好","index_cl_d":"请选择避风的地点晨练,避免迎风锻炼","index_dy":"较适宜","index_dy_d":"风稍大会对垂钓产生一定影响","index_hc":"较适宜","index_hc_d":"风稍大会对划船产生一定影响","index_yh":"较不适宜","index_yh_d":"风力较大,建议尽量不要去室外约会","index_ls_d":"天气不错,抓紧时机让衣物晒太阳吧","index_fs":"中等","index_fs_d":"适合涂擦SPF大于15,PA+护肤品","rc1":"04:42","rl1":"18:53","rc2":"04:41","rl2":"18:54","pm":"85","pm-level":"良","pm-num":"2","pm-url":"http:\/\/pm25.moji001.com\/aqi\/index-1623.html"},"update_time":"2014-05-16 22:34:37","t":1400251909,"from":"cache"})[/mw_shl_code]


这个是"金山网址导航"上的!!有pm值的奥!!!!     


http:\\pm25.moji001.com\aqi\index-1623.html   


而这个是墨迹官网的空气质量网页,也就是说在那里,可能有好东西奥!!!哈哈   1623  是城市代码,至于怎么找到是个难题(先买个关子了),今天晚上墨迹的网页挂掉了,我也没办法说清楚,哪天好了,我另外再出个详细的教程,这样小伙伴们就不用在看我了!!!!


废话并不多说贴接口......................

http://weather.123.duba.net/static/weather_info/101121301.html


======================================================

下一个!!!!!!!!!!!!!!!!!!!!嗯   来自小米!!!!!!

[mw_shl_code=java,true]{"forecast":{"city":"威海","city_en":"weihai","cityid":"101121301","date":"","date_y":"2014年05月16日","fchh":"18","fl1":"3-4级","fl2":"3-4级","fl3":"3-4级","fl4":"3-4级转4-5级","fl5":"3-4级转4-5级","fl6":"微风","fx1":"东北风转南风","fx2":"南风","img1":"","img10":"","img11":"","img12":"","img2":"","img3":"","img4":"","img5":"","img6":"","img7":"","img8":"","img9":"","img_single":"","img_title1":"多云","img_title10":"多云","img_title11":"晴","img_title12":"晴","img_title2":"晴","img_title3":"晴","img_title4":"晴","img_title5":"晴","img_title6":"多云","img_title7":"阵雨","img_title8":"多云","img_title9":"晴","img_title_single":"","index":"较舒适","index48":"","index48_d":"","index48_uv":"","index_ag":"易发","index_cl":"较适宜","index_co":"舒适","index_d":"","index_ls":"适宜","index_tr":"适宜","index_uv":"中等","index_xc":"适宜","st1":"","st2":"","st3":"","st4":"","st5":"","st6":"","temp1":"14℃~23℃","temp2":"15℃~26℃","temp3":"15℃~25℃","temp4":"13℃~22℃","temp5":"12℃~22℃","temp6":"0℃~0℃","tempF1":"","tempF2":"","tempF3":"","tempF4":"","tempF5":"","tempF6":"","weather1":"多云转晴","weather2":"晴","weather3":"晴转多云","weather4":"阵雨转多云","weather5":"晴转多云","weather6":"晴","week":"星期二","wind1":"东北风转南风","wind2":"南风","wind3":"南风","wind4":"南风转北风","wind5":"南风转北风","wind6":"微风"},"realtime":{"SD":"73%","WD":"西北风","WS":"2级","WSE":"","city":"","cityid":"101121301","isRadar":"1","radar":"JC_RADAR_AZ9010_JB","temp":"16","time":"22:30","weather":"多云"},"alert":[],"aqi":{"city":"威海","city_id":"101121301","pub_time":"2014-05-16 22:00","aqi":"86","pm25":"57","pm10":"122","so2":"10","no2":"46","src":"中国环境监测总站","spot":""},"index":[{"code":"fs","details":"属中等强度紫外辐射天气,外出时应注意防护,建议涂擦SPF指数高于15,PA+的防晒护肤品。","index":"中等","name":"防晒指数","otherName":""},{"code":"ct","details":"建议着薄外套、开衫牛仔衫裤等服装。年老体弱者应适当添加衣物,宜着夹克衫、薄毛衣等。","index":"较舒适","name":"穿衣指数","otherName":""},{"code":"yd","details":"天气较好,但风力较大,推荐您进行室内运动,若在户外运动请注意防风。","index":"较适宜","name":"运动指数","otherName":""},{"code":"xc","details":"适宜洗车,未来持续两天无雨天气较好,适合擦洗汽车,蓝天白云、风和日丽将伴您的车子连日洁净。","index":"适宜","name":"洗车指数","otherName":""},{"code":"ls","details":"天气不错,适宜晾晒。赶紧把久未见阳光的衣物搬出来吸收一下太阳的味道吧!","index":"适宜","name":"晾晒指数","otherName":""}],"accu_cc":{"EpochTime":"1400250000","Pressure":"1006.6"},"accu_f5":{"EffectiveEpochDate":"1400281200","DailyForecasts":[{"EpochDate":"1400194800","Sun_EpochRise":"1400186520","Sun_EpochSet":"1400237640"},{"EpochDate":"1400281200","Sun_EpochRise":"1400272860","Sun_EpochSet":"1400324100"},{"EpochDate":"1400367600","Sun_EpochRise":"1400359260","Sun_EpochSet":"1400410560"},{"EpochDate":"1400454000","Sun_EpochRise":"1400445600","Sun_EpochSet":"1400497020"},{"EpochDate":"1400540400","Sun_EpochRise":"1400531940","Sun_EpochSet":"1400583420"}]},"today":{"cityCode":"101121301","date":"2014-05-16","humidityMax":74,"humidityMin":21,"precipitationMax":0,"precipitationMin":0,"tempMax":28,"tempMin":16,"weatherEnd":"多云","weatherStart":"晴","windDirectionEnd":"西北风","windDirectionStart":"南风","windMax":3,"windMin":0},"yestoday":{"cityCode":"101121301","date":"2014-05-15","humidityMax":57,"humidityMin":15,"precipitationMax":0,"precipitationMin":0,"tempMax":26,"tempMin":15,"weatherEnd":"晴","weatherStart":"多云","windDirectionEnd":"北风","windDirectionStart":"西风","windMax":5,"windMin":0}}[/mw_shl_code]



其实吧,这个更全,预报,加空气质量.......

http://weatherapi.market.xiaomi.com/wtr-v2/weather?cityId=101121301



行行好吧!!!回复一下又不会怀孕!!!!


====================================================

还有一个..........貌似挺多的啊!!!!这两天闲慌了,就搞这个了....没办法


[mw_shl_code=java,true]{"weatherinfo":{"city":"重庆","city_en":"chongqing","date_y":"2014年5月16日","date":"四月十八","week":"星期五","fchh":"18","cityid":"101040100","temp1":"17℃~23℃","temp2":"18℃~27℃","temp3":"19℃~25℃","temp4":"21℃~32℃","temp5":"20℃~26℃","temp6":"19℃~25℃","tempF1":"62.6℉~73.4℉","tempF2":"64.4℉~80.6℉","tempF3":"66.2℉~77℉","tempF4":"69.8℉~89.6℉","tempF5":"68℉~78.8℉","tempF6":"66.2℉~77℉","weather1":"阵雨转阴","weather2":"多云","weather3":"阵雨","weather4":"多云","weather5":"阵雨转阴","weather6":"阵雨转阴","img1":"3","img2":"2","img3":"1","img4":"99","img5":"3","img6":"99","img7":"1","img8":"99","img9":"3","img10":"2","img11":"3","img12":"2","img_single":"2","img_title1":"阵雨","img_title2":"阴","img_title3":"多云","img_title4":"多云","img_title5":"阵雨","img_title6":"阵雨","img_title7":"多云","img_title8":"多云","img_title9":"阵雨","img_title10":"阴","img_title11":"阵雨","img_title12":"阴","img_title_single":"阴","wind1":"微风","wind2":"微风","wind3":"微风","wind4":"微风","wind5":"微风","wind6":"微风","fx1":"微风","fx2":"微风","fl1":"小于3级","fl2":"小于3级","fl3":"小于3级","fl4":"小于3级","fl5":"小于3级","fl6":"小于3级","index":"较舒适","index_d":"建议着薄外套、开衫牛仔衫裤等服装。年老体弱者应适当添加衣物,宜着夹克衫、薄毛衣等。","index48":"","index48_d":"","index_uv":"最弱","index48_uv":"","index_xc":"较不宜","index_tr":"适宜","index_co":"舒适","st1":"24","st2":"15","st3":"27","st4":"18","st5":"24","st6":"17","index_cl":"较适宜","index_ls":"不太适宜","index_ag":"极不易发"}}[/mw_shl_code]


[mw_shl_code=java,true]{"weatherinfo":{"city":"重庆","cityid":"101040100","temp":"18","WD":"西北风","WS":"2级","SD":"88%","WSE":"2","time":"22:45","isRadar":"1","Radar":"JC_RADAR_AZ9230_JB"}}[/mw_shl_code]


此地址来自一个叫做   "中央天气预报"  的应用.....不会被查水表吧????

具体数据自己看吧
http://weather.51wnl.com/weatherinfo/GetMoreWeather?cityCode=101040100&weatherType=0

http://weather.51wnl.com/weatherinfo/GetMoreWeather?cityCode=101040100&weatherType=1














评分

参与人数 1e币 +61 收起 理由
Android_UI + 61 么么哒!

查看全部评分

该用户从未签到

2

主题

10

帖子

139

e币
发表于 2014-5-26 14:17:19 | 显示全部楼层
谢谢,关注一下喔,好东西

该用户从未签到

1

主题

43

帖子

68

e币
发表于 2014-7-7 15:12:49 | 显示全部楼层
android.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.viewandroid.support.v4.view

该用户从未签到

7

主题

536

帖子

82

e币
发表于 2014-6-3 16:22:20 | 显示全部楼层
select * from weather.forecast where woeid=2502265 and u="c"select * from weather.forecast where woeid=2502265 and u="c"select * from weather.forecast where woeid=2502265 and u="c"select * from weather.forecast where woeid=2502265 and u="c"

签到天数: 233 天

连续签到: 2 天

[LV.7]常住居民III

185

主题

3917

帖子

2847

e币
圣诞限量勋章社区认证会员 QQ认证
发表于 2014-5-17 01:06:43 | 显示全部楼层
楼主 甚屌  感谢分享

该用户从未签到

4

主题

106

帖子

4

e币
发表于 2014-5-17 01:15:11 | 显示全部楼层
好东西啊!不过我想实现仿赶集网客户端的下拉指导:实现的只是下拉和弹起不知道有没有帮助啊?希望有!

签到天数: 11 天

连续签到: 1 天

[LV.3]偶尔看看II

1

主题

98

帖子

71

e币
发表于 2014-5-17 17:18:36 | 显示全部楼层
似挺多的啊!!!!这两天闲慌了,就搞这个了....没办法似挺多的啊!!!!这两天闲慌了,就搞这个了....没办法

该用户从未签到

0

主题

4

帖子

45

e币
发表于 2014-5-17 20:48:24 | 显示全部楼层
继续学习一下咯。。。。。。。。

该用户从未签到

2

主题

133

帖子

547

e币
发表于 2014-5-18 18:53:39 | 显示全部楼层
看一下了........................

该用户从未签到

0

主题

95

帖子

452

e币
发表于 2014-5-21 12:43:22 | 显示全部楼层
我做了一个是新浪的,中国的天气网实时的可以用,但看不到天气预报的关于天气的数据,如下雨或者多云

签到天数: 20 天

连续签到: 1 天

[LV.4]偶尔看看III

3

主题

806

帖子

2275

e币
发表于 2014-5-21 14:16:23 | 显示全部楼层
多谢楼主分享。。

该用户从未签到

0

主题

66

帖子

180

e币
发表于 2014-5-21 20:11:25 | 显示全部楼层
厉害,真是个好东西!!

签到天数: 1 天

连续签到: 1 天

[LV.1]初来乍到

1

主题

55

帖子

204

e币
发表于 2014-5-21 20:32:47 | 显示全部楼层
这个很喜欢

签到天数: 4 天

连续签到: 1 天

[LV.2]偶尔看看I

0

主题

175

帖子

180

e币
发表于 2014-5-21 20:53:16 | 显示全部楼层
不明角力啊啊啊啊

该用户从未签到

0

主题

4

帖子

0

e币
发表于 2014-5-22 17:00:40 | 显示全部楼层
多写楼主, 太给力了

该用户从未签到

2

主题

16

帖子

138

e币
发表于 2014-5-24 15:03:04 | 显示全部楼层
最近在做天气类的app,来给楼主顶起!

该用户从未签到

2

主题

16

帖子

138

e币
发表于 2014-5-25 13:40:07 | 显示全部楼层
为什么我点开小米的链接显示的是乱码呢?
*滑动验证:
您需要登录后才可以回帖 登录 | 加入eoe

本版积分规则

推荐阅读
赞助商们

QQ|联系我们|小黑屋|手机版|eoe 移动开发者论坛 ( 京ICP备11018032 京公网安11010802020210  

GMT+8, 2017-9-21 05:54 , Processed in 0.612937 second(s), 48 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表
关闭

扫一扫 关注eoe官方微信