forked from selectel-vds/go-vscale
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaccount.go
34 lines (27 loc) · 864 Bytes
/
account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package vscale_api_go
import (
"net/http"
)
type AccountService struct {
client Client
}
type Account struct {
Info struct {
Actdate string `json:"actdate,omitempty"`
Country string `json:"country,omitempty"`
Email string `json:"email,omitempty"`
FaceID string `json:"face_id,omitempty"`
ID string `json:"id,omitempty"`
Locale string `json:"locale,omitempty"`
Middlename string `json:"middlename,omitempty"`
Mobile string `json:"mobile,omitempty"`
Name string `json:"name,omitempty"`
State string `json:"state,omitempty"`
Surname string `json:"surname,omitempty"`
} `json:"info,omitempty"`
}
func (a *AccountService) Get() (*Account, *http.Response, error) {
account := new(Account)
res, err := a.client.ExecuteRequest("GET", "account", []byte{}, account)
return account, res, err
}