node-clima
Version:
Simple wrapper for OpenWeatherMap API
18 lines (17 loc) • 474 B
JavaScript
;
// clima.ts
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Create a new Clima instances
* @class
* @param {String} apiKey - Contains your API KEY
*/
class Clima {
constructor(apiKey) {
this.url = 'http://api.openweathermap.org/data/2.5/weather?';
if (typeof apiKey !== 'string')
throw new Error('invalid apiKey passed to constructor.');
this.apiKey = apiKey;
}
}
exports.Clima = Clima;