Merge pull request #43 from typeless/server-version

Add new API 'ServerVersion'
This commit is contained in:
Thomas Boerger 2017-03-04 11:22:44 +01:00 committed by GitHub
commit 8807a1d2ce

View file

@ -11,3 +11,14 @@ type MarkdownOption struct {
Context string Context string
Wiki bool Wiki bool
} }
// ServerVersion wraps the version of the server
type ServerVersion struct {
Version string
}
// ServerVersion returns the version of the server
func (c *Client) ServerVersion() (string, error) {
v := ServerVersion{}
return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v)
}