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)
- Host: GitHub
- URL: https://github.com/maltegrosse/go-wagri
- Owner: maltegrosse
- License: mit
- Created: 2025-02-26T08:50:19.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-07T10:28:56.000Z (over 1 year ago)
- Last Synced: 2025-04-11T20:54:14.800Z (about 1 year ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.