1.2.0 • Published 1 year ago

hkojs v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

hkojs

Hong Kong Observatory API Wrapper for TypeScript (Sorry for no JS compatibility yet despite of the name hkojs)


Get started

npm i hkojs


Dataset

  • 9-day Weather Forecast
  • Current Weather Report
  • Local Weather Forecast
  • Weather Warning Information
  • Weather Warning Summary
  • Special Weather Tips

Example

import { Lang, getLocalWeatherForecast } from 'hkojs';

(async () => {
  const forecast = await getLocalWeatherForecast(Lang.EN);
  console.log(forecast);
})();

/* Response
{
  generalSituation: 'A maritime airstream is affecting the coastal areas of Guangdong.',
  forecastPeriod: 'Weather forecast for tonight and tomorrow',
  forecastDescription: 'Mainly cloudy. Foggy with one or two light rain patches in the morning and at night. Sunny intervals during the day tomorrow. Temperatures will range between 20 and 24 degrees. Light to moderate southeasterly winds.',
  outlook: 'Still humid and foggy in the following couple of days. Rather warm during the day. Temperatures will fall in the latter part of this week.',
  updateTime: '2024-02-18T18:45:00+08:00'
}
*/
1.2.0

1 year ago

1.0.2

1 year ago

1.1.0

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

2 years ago