安装它
npm install weatherman.io
需要它
var weatherman = require ( "weatherman.io" ) ;
创建气象员
var alRoker = new weatherman ( "your-forecast-io-api-key" ) ;
创建一个有选项的天气预报员
var options = {
units : "uk" ,
exclude : [ "minutely" , "alerts" ] ,
extend : "hourly"
} ;
var alRoker = new weatherman ( "your-forecast-io-api-key" , options ) ;
Forecast.io 开发人员文档中提供了有关每个选项的详细信息: :
从一个位置进行预测
var for
1