mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
14 lines
392 B
TypeScript
Executable File
14 lines
392 B
TypeScript
Executable File
let WUNDERGROUND_API_KEY = '1cc2d3de40fa5af0';
|
|
|
|
let FORECASTIO_KEY = '4cd3c5673825a361eb5ce108103ee84a';
|
|
|
|
export class Weather {
|
|
static getAtLocation(lat, lng) {
|
|
// TODO: update to angular2 HTTP service
|
|
let url = 'https://api.forecast.io/forecast/' + FORECASTIO_KEY + '/';
|
|
return Http.get(url + lat + ',' + lng + '?callback=JSON_CALLBACK', {
|
|
method: 'jsonp'
|
|
});
|
|
}
|
|
}
|