Add new API 'ServerVersion'

This commit is contained in:
Mura Li 2017-03-03 22:45:18 +08:00
parent 577184279b
commit ec03aeb834

View File

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