veterejo

Veterejo is a Go package for querying weather data from openweathermap.org
git clone git://git.swab.dev/veterejo.git
Log | Files | Refs | README | LICENSE

README.md (1044B)


      1 [![Go Report Card](https://goreportcard.com/badge/github.com/jrswab/veterejo)](https://goreportcard.com/report/github.com/jrswab/veterejo)
      2 # veterejo
      3 Veterejo is a Go package for querying weather data from Open Weather Maps.
      4 
      5 Vetero is "weather" in Esperanto and "ejo" is place.
      6 By replacing the **o** of a noun with **ejo** the word discribes a place of that thing.
      7 (eg: Computilejo = computer-place or in English a computer lab)
      8 
      9 ## Using This Package:
     10 1. Get an API Key from [OpenWeatheMap](https://openweathermap.org)
     11 2. Import this package
     12 3. Create a new `WeatherData` struct: `w := new(veterejo.WeatherData)`
     13 4. Parse the URL: `url, err := veterejo.MakeURL(yourCityID, unitsOfMeasure, yourApiId)`
     14    - `yourApiId` is required
     15    - The rest may be omitted by passing an empty string.
     16    - This package defaults the units of mesaure to metric.
     17 5. Call the data: `w.getData(url)`
     18 6. Use the appropriate method to get the most recent data needed from OpenWeatherMap.
     19 
     20 *veterejo is licensed under the BSD 3-Clause "New" or "Revised" License*