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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
package api // import "github.com/SevereCloud/vksdk/v2/api"
import (
"github.com/SevereCloud/vksdk/v2/object"
)
// AccountBan account.ban.
//
// https://vk.com/dev/account.ban
func (vk *VK) AccountBan(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.ban", &response, params)
return
}
// AccountChangePasswordResponse struct.
type AccountChangePasswordResponse struct {
Token string `json:"token"`
}
// AccountChangePassword changes a user password after access is successfully restored with the auth.restore method.
//
// https://vk.com/dev/account.changePassword
func (vk *VK) AccountChangePassword(params Params) (response AccountChangePasswordResponse, err error) {
err = vk.RequestUnmarshal("account.changePassword", &response, params)
return
}
// AccountGetActiveOffersResponse struct.
type AccountGetActiveOffersResponse struct {
Count int `json:"count"`
Items []object.AccountOffer `json:"items"`
}
// AccountGetActiveOffers returns a list of active ads (offers).
// If the user fulfill their conditions, he will be able to get
// the appropriate number of votes to his balance.
//
// https://vk.com/dev/account.getActiveOffers
func (vk *VK) AccountGetActiveOffers(params Params) (response AccountGetActiveOffersResponse, err error) {
err = vk.RequestUnmarshal("account.getActiveOffers", &response, params)
return
}
// AccountGetAppPermissions gets settings of the user in this application.
//
// https://vk.com/dev/account.getAppPermissions
func (vk *VK) AccountGetAppPermissions(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.getAppPermissions", &response, params)
return
}
// AccountGetBannedResponse struct.
type AccountGetBannedResponse struct {
Count int `json:"count"`
Items []int `json:"items"`
object.ExtendedResponse
}
// AccountGetBanned returns a user's blacklist.
//
// https://vk.com/dev/account.getBanned
func (vk *VK) AccountGetBanned(params Params) (response AccountGetBannedResponse, err error) {
err = vk.RequestUnmarshal("account.getBanned", &response, params)
return
}
// AccountGetCountersResponse struct.
type AccountGetCountersResponse object.AccountAccountCounters
// AccountGetCounters returns non-null values of user counters.
//
// https://vk.com/dev/account.getCounters
func (vk *VK) AccountGetCounters(params Params) (response AccountGetCountersResponse, err error) {
err = vk.RequestUnmarshal("account.getCounters", &response, params)
return
}
// AccountGetInfoResponse struct.
type AccountGetInfoResponse object.AccountInfo
// AccountGetInfo returns current account info.
//
// https://vk.com/dev/account.getInfo
func (vk *VK) AccountGetInfo(params Params) (response AccountGetInfoResponse, err error) {
err = vk.RequestUnmarshal("account.getInfo", &response, params)
return
}
// AccountGetProfileInfoResponse struct.
type AccountGetProfileInfoResponse object.AccountUserSettings
// AccountGetProfileInfo returns the current account info.
//
// https://vk.com/dev/account.getProfileInfo
func (vk *VK) AccountGetProfileInfo(params Params) (response AccountGetProfileInfoResponse, err error) {
err = vk.RequestUnmarshal("account.getProfileInfo", &response, params)
return
}
// AccountGetPushSettingsResponse struct.
type AccountGetPushSettingsResponse object.AccountPushSettings
// AccountGetPushSettings account.getPushSettings Gets settings of push notifications.
//
// https://vk.com/dev/account.getPushSettings
func (vk *VK) AccountGetPushSettings(params Params) (response AccountGetPushSettingsResponse, err error) {
err = vk.RequestUnmarshal("account.getPushSettings", &response, params)
return
}
// AccountRegisterDevice subscribes an iOS/Android/Windows/Mac based device to receive push notifications.
//
// https://vk.com/dev/account.registerDevice
func (vk *VK) AccountRegisterDevice(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.registerDevice", &response, params)
return
}
// AccountSaveProfileInfoResponse struct.
type AccountSaveProfileInfoResponse struct {
Changed object.BaseBoolInt `json:"changed"`
NameRequest object.AccountNameRequest `json:"name_request"`
}
// AccountSaveProfileInfo edits current profile info.
//
// https://vk.com/dev/account.saveProfileInfo
func (vk *VK) AccountSaveProfileInfo(params Params) (response AccountSaveProfileInfoResponse, err error) {
err = vk.RequestUnmarshal("account.saveProfileInfo", &response, params)
return
}
// AccountSetInfo allows to edit the current account info.
//
// https://vk.com/dev/account.setInfo
func (vk *VK) AccountSetInfo(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.setInfo", &response, params)
return
}
// AccountSetNameInMenu sets an application screen name
// (up to 17 characters), that is shown to the user in the left menu.
//
// Deprecated: This method is deprecated and may be disabled soon, please avoid
//
// https://vk.com/dev/account.setNameInMenu
func (vk *VK) AccountSetNameInMenu(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.setNameInMenu", &response, params)
return
}
// AccountSetOffline marks a current user as offline.
//
// https://vk.com/dev/account.setOffline
func (vk *VK) AccountSetOffline(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.setOffline", &response, params)
return
}
// AccountSetOnline marks the current user as online for 5 minutes.
//
// https://vk.com/dev/account.setOnline
func (vk *VK) AccountSetOnline(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.setOnline", &response, params)
return
}
// AccountSetPushSettings change push settings.
//
// https://vk.com/dev/account.setPushSettings
func (vk *VK) AccountSetPushSettings(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.setPushSettings", &response, params)
return
}
// AccountSetSilenceMode mutes push notifications for the set period of time.
//
// https://vk.com/dev/account.setSilenceMode
func (vk *VK) AccountSetSilenceMode(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.setSilenceMode", &response, params)
return
}
// AccountUnban account.unban.
//
// https://vk.com/dev/account.unban
func (vk *VK) AccountUnban(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.unban", &response, params)
return
}
// AccountUnregisterDevice unsubscribes a device from push notifications.
//
// https://vk.com/dev/account.unregisterDevice
func (vk *VK) AccountUnregisterDevice(params Params) (response int, err error) {
err = vk.RequestUnmarshal("account.unregisterDevice", &response, params)
return
}
|