~jrswab/veterejo

A Go package for querying Open Weather Maps API.
9d547bc0 — Jaron Swab 2 months ago
Update README.md
b05e5f24 — Jaron Swab 2 months ago
fix typo
f5bb13ff — Jaron Swab 2 months ago
formatting

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~jrswab/veterejo
read/write
git@git.sr.ht:~jrswab/veterejo

You can also use your local clone with git send-email.

veterejo

Veterejo is a Go package for querying weather data from Open Weather Maps.

Vetero is weather in Esperanto and ejo is place. By replacing the o of a noun with ejo the word discribes a place of that thing. (eg: Computilejo = computer-place or in English a computer lab)

Using This Package:

  1. Get an API Key from OpenWeatheMap
  2. Import this package
  3. Create a new WeatherData struct: w := new(veterejo.WeatherData)
  4. Parse the URL: url, err := veterejo.MakeURL(yourCityID, unitsOfMeasure, yourApiId)
    • yourApiId is required
    • The rest may be omitted by passing an empty string.
    • This package defaults the units of mesaure to metric.
  5. Call the data: w.getData(url)
  6. Use the appropriate method to get the most recent data needed from OpenWeatherMap.

veterejo is licensed under the BSD 3-Clause New or Revised License