功能
可查询实时台风信息 和 历史台风信息 详情见github:https://github.com/giscafer/node-typhoon
demo
'use strict';
const Typhoon=require('node-typhoon');
Typhoon.typhoonActivity().then(data=>{
console.info("============typhoonActivity()===================");
console.log(data);
}).catch(err=>{
console.error(err)
});
Typhoon.typhoonList(2016).then(data=>{
console.info("------------------typhoonList()-----------------");
console.log(data);
}).catch(err=>{
console.error(err);
});
结果
============typhoonActivity()===================
[
{
"enname": "SARIKA",
"lat": "15.10",
"lng": "122.90",
"movedirection": "西北西",
"movespeed": "25",
"name": "莎莉嘉",
"power": "14",
"pressure": "950",
"radius10": "120",
"radius7": "240",
"speed": "45",
"strong": "强台风",
"tfid": "201621",
"time": "2016-10-15 20:00:00",
"timeformate": "10月15日20时"
},
{
"enname": "HAIMA",
"lat": "9.70",
"lng": "141.50",
"movedirection": "西北西",
"movespeed": "17",
"name": "海马",
"power": "8",
"pressure": "995",
"radius10": null,
"radius7": "200",
"speed": "20",
"strong": "热带风暴",
"tfid": "201622",
"time": "2016-10-15 20:00:00",
"timeformate": "10月15日20时"
}
]
------------------typhoonList()-----------------
//内容多省略……