An open API service indexing awesome lists of open source software.

https://github.com/maltegrosse/go-wagri

A wrapper around WAGRI API (japan)
https://github.com/maltegrosse/go-wagri

Last synced: 8 months ago
JSON representation

A wrapper around WAGRI API (japan)

Awesome Lists containing this project

README

          

# Go WAGRI API Wrapper
## Description
A golang wrapper around some services provided by [WAGRI](http://wagri.naro.go.jp/), an API platform for agriculture data provided by different vendors, all under the umbrella of Ministry of Agriculture, Forestry and Fisheries (MAFF) and National Agriculture and Food Research Organization (NARO) Japan.

## Available Service
Only a few services are available and tested. PRs are welcome to extend this package for other services.
| **Endpoint** | **Service** | **Method** | **Description** |
|-----------------------------------|-----------------------|-----------------------|-----------------------------------------------------------------------|
| /API/Individual/NARO/WeatherMesh | Naro 1km Mesh Data | NewWeatherMeshClient | historically weather and weather forecast. [Link](./individual/naro) |

## Usage

1. Get the latest go package
`go get -u github.com/maltegrosse/go-wagri`
2. Create a new wagri client:
```
w := wagri.NewWagriClient("CLIENT_ID", "CLIENT_SECRET")
```

3. Create a new sub package instance using the wagri client, e.g. naro 1km mesh:
```
wm, _ := w.NewWeatherMeshClient("userid", "password")

```

4. Query some weather data
```
properties := []naro.WeatherProperty{naro.DailyMinimumTemperature, naro.DailyMaximumTemperature}
weatherData, _err_ := wm.GetWeatherPoint(properties, 34.90, 136.86, time.Date(2024, 12, 10, 0, 0, 0, 0, time.UTC), time.Date(2025, 1, 10, 0, 0, 0, 0, time.UTC))
```

## License
**[MIT license](http://opensource.org/licenses/mit-license.php)**

Copyright 2025 © Malte Grosse.

ny data as well as additional documents (e.g. pdfs) in this repository are copyrighted by their respective owners.