This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/emlid/updater/reachview_version.go
William Petit 6e9df8d386 Refactor reach package
- Rename reach package to emlid
- Create generic Reach websocket client
- Add 2 new subpackages 'updater' and 'reachview' to provides specific
API
2018-09-21 16:07:38 +02:00

20 lines
506 B
Go

package updater
const (
eventGetReachViewVersion = "get reachview version"
eventReachViewVersionResults = "current reachview version"
)
type reachViewVersion struct {
Version string `json:"version"`
}
// ReachViewVersion returns the ReachRS module ReachView version
func (c *Client) ReachViewVersion() (string, error) {
res := &reachViewVersion{}
if err := c.ReqResp(eventGetReachViewVersion, nil, eventReachViewVersionResults, res); err != nil {
return "", err
}
return res.Version, nil
}