UNPKG

node-apple-weatherkit

Version:
20 lines 675 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WeatherEndpoint = void 0; const Base_1 = require("./Base"); const ENDPOINT_PATH = '/weather'; const DEFAULT_PARAMS = { timezone: 'Etc/UTC', dataSets: ['currentWeather', 'forecastDaily'], }; class WeatherEndpoint extends Base_1.BaseEndpoint { constructor(accessToken) { super(accessToken); this.accessToken = accessToken; } async get(lat, lon, params = DEFAULT_PARAMS, lang = 'en') { return await this.api.get(`${ENDPOINT_PATH}/${lang}/${lat}/${lon}`, params); } } exports.WeatherEndpoint = WeatherEndpoint; //# sourceMappingURL=Weather.js.map