https://github.com/liderman/yandex-rasp-api
Golang api for Yandex Rasp Api
https://github.com/liderman/yandex-rasp-api
schedule timetable yandex yandex-api yandex-rasp yandex-raspisanie
Last synced: 12 months ago
JSON representation
Golang api for Yandex Rasp Api
- Host: GitHub
- URL: https://github.com/liderman/yandex-rasp-api
- Owner: liderman
- License: mit
- Created: 2017-05-14T18:31:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-19T15:12:15.000Z (about 9 years ago)
- Last Synced: 2025-04-07T15:11:09.608Z (about 1 year ago)
- Topics: schedule, timetable, yandex, yandex-api, yandex-rasp, yandex-raspisanie
- Language: Go
- Size: 23.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yandex-rasp-api
Golang implementation Yandex Rasp Api v3.0 - https://tech.yandex.ru/rasp/doc/concepts/about-docpage/.
[](https://travis-ci.org/liderman/yandex-rasp-api) [](https://godoc.org/github.com/liderman/yandex-rasp-api)
Installation
-----------
go get github.com/liderman/yandex-rasp-api
Usage
-----------
Getting a schedule of flights between stations:
```go
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:
```go
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.
Features
--------
* Full support api version 3.0
* Code is covered by tests
* Without external dependencies
Requirements
-----------
* Need at least `go1.2` or newer.
Documentation
-----------
You can read package documentation [here](http:godoc.org/github.com/liderman/yandex-rasp-api).
Official docs: [here](https://tech.yandex.ru/rasp/doc/concepts/about-docpage/)
Testing
-----------
Unit-tests:
```bash
go test -v
```