Golang implementation Yandex Rasp Api v3.0 - https://tech.yandex.ru/rasp/doc/concepts/about-docpage/.
go get github.com/liderman/yandex-rasp-api
Getting a schedule of flights between stations:
yapi := NewYandexRapsApi("YOUR_APIKEY")
reps, _ := yapi.Search(map[string]string{
"from": "c146",
"to": "c213",
"lang": "ru_RU",
"page": "1",
"date": "2017-05-18",
"limit": "2",
})
fmt.Println(reps);
Getting information about the nearest town to the specified point:
yapi := NewYandexRapsApi("YOUR_APIKEY")
reps, err := yapi.NearestSettlement(map[string]string{
"lat": "50.440046",
"lng": "40.4882367",
"distance": "50",
"lang": "ru_RU",
})
fmt.Println(reps);
More examples can be found in the test files.
- Full support api version 3.0
- Code is covered by tests
- Without external dependencies
- Need at least
go1.2
or newer.
You can read package documentation here. Official docs: here
Unit-tests:
go test -v