UNPKG

node-apple-weatherkit

Version:
16 lines 526 B
import { BaseEndpoint } from './Base'; const ENDPOINT_PATH = '/weather'; const DEFAULT_PARAMS = { timezone: 'Etc/UTC', dataSets: ['currentWeather', 'forecastDaily'], }; export class WeatherEndpoint extends 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); } } //# sourceMappingURL=Weather.js.map