Implement APIv4 infrastructure (#5191)

* Implement APIv4 infrastructure

* Update parameter requirement functions per feedback
Этот коммит содержится в:
Joram Wilander
2017-01-30 08:30:02 -05:00
коммит произвёл GitHub
родитель 3e2f879b77
Коммит c01d9ad6cf
31 изменённых файлов: 1826 добавлений и 272 удалений

Просмотреть файл

@@ -40,7 +40,8 @@ const (
API_URL_SUFFIX_V1 = "/api/v1"
API_URL_SUFFIX_V3 = "/api/v3"
API_URL_SUFFIX = API_URL_SUFFIX_V3
API_URL_SUFFIX_V4 = "/api/v4"
API_URL_SUFFIX = API_URL_SUFFIX_V4
)
type Result struct {
@@ -71,7 +72,7 @@ type Client struct {
// NewClient constructs a new client with convienence methods for talking to
// the server.
func NewClient(url string) *Client {
return &Client{url, url + API_URL_SUFFIX, &http.Client{}, "", "", "", "", "", ""}
return &Client{url, url + API_URL_SUFFIX_V3, &http.Client{}, "", "", "", "", "", ""}
}
func closeBody(r *http.Response) {