2015-12-04 22:10:37 +00:00
|
|
|
// Copyright 2015 The Gogs Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2016-11-07 01:57:49 +00:00
|
|
|
package gitea
|
2015-12-04 22:10:37 +00:00
|
|
|
|
2016-11-10 09:44:00 +00:00
|
|
|
// MarkdownOption markdown options
|
2015-12-04 22:10:37 +00:00
|
|
|
type MarkdownOption struct {
|
|
|
|
Text string
|
|
|
|
Mode string
|
|
|
|
Context string
|
2017-02-24 15:00:14 +00:00
|
|
|
Wiki bool
|
2015-12-04 22:10:37 +00:00
|
|
|
}
|
2017-03-03 14:45:18 +00:00
|
|
|
|
2017-03-03 14:55:07 +00:00
|
|
|
// ServerVersion wraps the version of the server
|
2017-03-03 14:45:18 +00:00
|
|
|
type ServerVersion struct {
|
|
|
|
Version string
|
|
|
|
}
|
|
|
|
|
2017-03-03 14:55:07 +00:00
|
|
|
// ServerVersion returns the version of the server
|
2017-03-03 14:45:18 +00:00
|
|
|
func (c *Client) ServerVersion() (string, error) {
|
|
|
|
v := ServerVersion{}
|
|
|
|
return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v)
|
|
|
|
}
|