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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
package api // import "github.com/SevereCloud/vksdk/v2/api"
import (
"github.com/SevereCloud/vksdk/v2/object"
)
// WallCheckCopyrightLink method.
//
// https://vk.com/dev/wall.checkCopyrightLink
func (vk *VK) WallCheckCopyrightLink(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.checkCopyrightLink", &response, params)
return
}
// WallCloseComments turn off post commenting.
//
// https://vk.com/dev/wall.closeComments
func (vk *VK) WallCloseComments(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.closeComments", &response, params)
return
}
// WallCreateCommentResponse struct.
type WallCreateCommentResponse struct {
CommentID int `json:"comment_id"`
ParentsStack []int `json:"parents_stack"`
}
// WallCreateComment adds a comment to a post on a user wall or community wall.
//
// https://vk.com/dev/wall.createComment
func (vk *VK) WallCreateComment(params Params) (response WallCreateCommentResponse, err error) {
err = vk.RequestUnmarshal("wall.createComment", &response, params)
return
}
// WallDelete deletes a post from a user wall or community wall.
//
// https://vk.com/dev/wall.delete
func (vk *VK) WallDelete(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.delete", &response, params)
return
}
// WallDeleteComment deletes a comment on a post on a user wall or community wall.
//
// https://vk.com/dev/wall.deleteComment
func (vk *VK) WallDeleteComment(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.deleteComment", &response, params)
return
}
// WallEditResponse struct.
type WallEditResponse struct {
PostID int `json:"post_id"`
}
// WallEdit edits a post on a user wall or community wall.
//
// https://vk.com/dev/wall.edit
func (vk *VK) WallEdit(params Params) (response WallEditResponse, err error) {
err = vk.RequestUnmarshal("wall.edit", &response, params)
return
}
// WallEditAdsStealth allows to edit hidden post.
//
// https://vk.com/dev/wall.editAdsStealth
func (vk *VK) WallEditAdsStealth(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.editAdsStealth", &response, params)
return
}
// WallEditComment edits a comment on a user wall or community wall.
//
// https://vk.com/dev/wall.editComment
func (vk *VK) WallEditComment(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.editComment", &response, params)
return
}
// WallGetResponse struct.
type WallGetResponse struct {
Count int `json:"count"`
Items []object.WallWallpost `json:"items"`
}
// WallGet returns a list of posts on a user wall or community wall.
//
// extended=0
//
// https://vk.com/dev/wall.get
func (vk *VK) WallGet(params Params) (response WallGetResponse, err error) {
err = vk.RequestUnmarshal("wall.get", &response, params, Params{"extended": false})
return
}
// WallGetExtendedResponse struct.
type WallGetExtendedResponse struct {
Count int `json:"count"`
Items []object.WallWallpost `json:"items"`
object.ExtendedResponse
}
// WallGetExtended returns a list of posts on a user wall or community wall.
//
// extended=1
//
// https://vk.com/dev/wall.get
func (vk *VK) WallGetExtended(params Params) (response WallGetExtendedResponse, err error) {
err = vk.RequestUnmarshal("wall.get", &response, params, Params{"extended": true})
return
}
// WallGetByIDResponse struct.
type WallGetByIDResponse []object.WallWallpost
// WallGetByID returns a list of posts from user or community walls by their IDs.
//
// extended=0
//
// https://vk.com/dev/wall.getById
func (vk *VK) WallGetByID(params Params) (response WallGetByIDResponse, err error) {
err = vk.RequestUnmarshal("wall.getById", &response, params, Params{"extended": false})
return
}
// WallGetByIDExtendedResponse struct.
type WallGetByIDExtendedResponse struct {
Items []object.WallWallpost `json:"items"`
object.ExtendedResponse
}
// WallGetByIDExtended returns a list of posts from user or community walls by their IDs.
//
// extended=1
//
// https://vk.com/dev/wall.getById
func (vk *VK) WallGetByIDExtended(params Params) (response WallGetByIDExtendedResponse, err error) {
err = vk.RequestUnmarshal("wall.getById", &response, params, Params{"extended": true})
return
}
// WallGetCommentResponse struct.
type WallGetCommentResponse struct {
Items []object.WallWallComment `json:"items"`
CanPost object.BaseBoolInt `json:"can_post"`
ShowReplyButton object.BaseBoolInt `json:"show_reply_button"`
GroupsCanPost object.BaseBoolInt `json:"groups_can_post"`
CurrentLevelCount int `json:"current_level_count"`
}
// WallGetComment allows to obtain wall comment info.
//
// extended=0
//
// https://vk.com/dev/wall.getComment
func (vk *VK) WallGetComment(params Params) (response WallGetCommentResponse, err error) {
err = vk.RequestUnmarshal("wall.getComment", &response, params, Params{"extended": false})
return
}
// WallGetCommentExtendedResponse struct.
type WallGetCommentExtendedResponse struct {
Count int `json:"count"`
Items []object.WallWallComment `json:"items"`
CanPost object.BaseBoolInt `json:"can_post"`
ShowReplyButton object.BaseBoolInt `json:"show_reply_button"`
GroupsCanPost object.BaseBoolInt `json:"groups_can_post"`
CurrentLevelCount int `json:"current_level_count"`
Profiles []object.UsersUser `json:"profiles"`
Groups []object.GroupsGroup `json:"groups"`
}
// WallGetCommentExtended allows to obtain wall comment info.
//
// extended=1
//
// https://vk.com/dev/wall.getComment
func (vk *VK) WallGetCommentExtended(params Params) (response WallGetCommentExtendedResponse, err error) {
err = vk.RequestUnmarshal("wall.getComment", &response, params, Params{"extended": true})
return
}
// WallGetCommentsResponse struct.
type WallGetCommentsResponse struct {
CanPost object.BaseBoolInt `json:"can_post"`
ShowReplyButton object.BaseBoolInt `json:"show_reply_button"`
GroupsCanPost object.BaseBoolInt `json:"groups_can_post"`
CurrentLevelCount int `json:"current_level_count"`
Count int `json:"count"`
Items []object.WallWallComment `json:"items"`
}
// WallGetComments returns a list of comments on a post on a user wall or community wall.
//
// extended=0
//
// https://vk.com/dev/wall.getComments
func (vk *VK) WallGetComments(params Params) (response WallGetCommentsResponse, err error) {
err = vk.RequestUnmarshal("wall.getComments", &response, params, Params{"extended": false})
return
}
// WallGetCommentsExtendedResponse struct.
type WallGetCommentsExtendedResponse struct {
CanPost object.BaseBoolInt `json:"can_post"`
ShowReplyButton object.BaseBoolInt `json:"show_reply_button"`
GroupsCanPost object.BaseBoolInt `json:"groups_can_post"`
CurrentLevelCount int `json:"current_level_count"`
Count int `json:"count"`
Items []object.WallWallComment `json:"items"`
object.ExtendedResponse
}
// WallGetCommentsExtended returns a list of comments on a post on a user wall or community wall.
//
// extended=1
//
// https://vk.com/dev/wall.getComments
func (vk *VK) WallGetCommentsExtended(params Params) (response WallGetCommentsExtendedResponse, err error) {
err = vk.RequestUnmarshal("wall.getComments", &response, params, Params{"extended": true})
return
}
// WallGetRepostsResponse struct.
type WallGetRepostsResponse struct {
Items []object.WallWallpost `json:"items"`
object.ExtendedResponse
}
// WallGetReposts returns information about reposts of a post on user wall or community wall.
//
// https://vk.com/dev/wall.getReposts
func (vk *VK) WallGetReposts(params Params) (response WallGetRepostsResponse, err error) {
err = vk.RequestUnmarshal("wall.getReposts", &response, params)
return
}
// WallOpenComments includes posting comments.
//
// https://vk.com/dev/wall.openComments
func (vk *VK) WallOpenComments(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.openComments", &response, params)
return
}
// WallPin pins the post on wall.
//
// https://vk.com/dev/wall.pin
func (vk *VK) WallPin(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.pin", &response, params)
return
}
// WallPostResponse struct.
type WallPostResponse struct {
PostID int `json:"post_id"`
}
// WallPost adds a new post on a user wall or community wall.Can also be used to publish suggested or scheduled posts.
//
// https://vk.com/dev/wall.post
func (vk *VK) WallPost(params Params) (response WallPostResponse, err error) {
err = vk.RequestUnmarshal("wall.post", &response, params)
return
}
// WallPostAdsStealthResponse struct.
type WallPostAdsStealthResponse struct {
PostID int `json:"post_id"`
}
// WallPostAdsStealth allows to create hidden post which will
// not be shown on the community's wall and can be used for creating
// an ad with type "Community post".
//
// https://vk.com/dev/wall.postAdsStealth
func (vk *VK) WallPostAdsStealth(params Params) (response WallPostAdsStealthResponse, err error) {
err = vk.RequestUnmarshal("wall.postAdsStealth", &response, params)
return
}
// WallReportComment reports (submits a complaint about) a comment on a post on a user wall or community wall.
//
// https://vk.com/dev/wall.reportComment
func (vk *VK) WallReportComment(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.reportComment", &response, params)
return
}
// WallReportPost reports (submits a complaint about) a post on a user wall or community wall.
//
// https://vk.com/dev/wall.reportPost
func (vk *VK) WallReportPost(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.reportPost", &response, params)
return
}
// WallRepostResponse struct.
type WallRepostResponse struct {
Success int `json:"success"`
PostID int `json:"post_id"`
RepostsCount int `json:"reposts_count"`
LikesCount int `json:"likes_count"`
WallRepostCount int `json:"wall_repost_count"`
MailRepostCount int `json:"mail_repost_count"`
}
// WallRepost reposts ( copies) an object to a user wall or community wall.
//
// https://vk.com/dev/wall.repost
func (vk *VK) WallRepost(params Params) (response WallRepostResponse, err error) {
err = vk.RequestUnmarshal("wall.repost", &response, params)
return
}
// WallRestore restores a post deleted from a user wall or community wall.
//
// https://vk.com/dev/wall.restore
func (vk *VK) WallRestore(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.restore", &response, params)
return
}
// WallRestoreComment restores a comment deleted from a user wall or community wall.
//
// https://vk.com/dev/wall.restoreComment
func (vk *VK) WallRestoreComment(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.restoreComment", &response, params)
return
}
// WallSearchResponse struct.
type WallSearchResponse struct {
Count int `json:"count"`
Items []object.WallWallpost `json:"items"`
}
// WallSearch allows to search posts on user or community walls.
//
// extended=0
//
// https://vk.com/dev/wall.search
func (vk *VK) WallSearch(params Params) (response WallSearchResponse, err error) {
err = vk.RequestUnmarshal("wall.search", &response, params, Params{"extended": false})
return
}
// WallSearchExtendedResponse struct.
type WallSearchExtendedResponse struct {
Count int `json:"count"`
Items []object.WallWallpost `json:"items"`
object.ExtendedResponse
}
// WallSearchExtended allows to search posts on user or community walls.
//
// extended=1
//
// https://vk.com/dev/wall.search
func (vk *VK) WallSearchExtended(params Params) (response WallSearchExtendedResponse, err error) {
err = vk.RequestUnmarshal("wall.search", &response, params, Params{"extended": true})
return
}
// WallUnpin unpins the post on wall.
//
// https://vk.com/dev/wall.unpin
func (vk *VK) WallUnpin(params Params) (response int, err error) {
err = vk.RequestUnmarshal("wall.unpin", &response, params)
return
}
|