-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
fave.go
232 lines (202 loc) · 6.38 KB
/
fave.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
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
package api // import "github.com/SevereCloud/vksdk/5.92/api"
import (
"github.com/SevereCloud/vksdk/5.92/object"
)
// FaveAddArticle adds a link to user faves.
//
// https://vk.com/dev/fave.addArticle
func (vk *VK) FaveAddArticle(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.addArticle", params, &response, &vkErr)
return
}
// FaveAddLink adds a link to user faves.
//
// https://vk.com/dev/fave.addLink
func (vk *VK) FaveAddLink(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.addLink", params, &response, &vkErr)
return
}
// FaveAddPage method
//
// https://vk.com/dev/fave.addPage
func (vk *VK) FaveAddPage(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.addPage", params, &response, &vkErr)
return
}
// FaveAddPost method
//
// https://vk.com/dev/fave.addPost
func (vk *VK) FaveAddPost(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.addPost", params, &response, &vkErr)
return
}
// FaveAddProduct method
//
// https://vk.com/dev/fave.addProduct
func (vk *VK) FaveAddProduct(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.addProduct", params, &response, &vkErr)
return
}
// FaveAddTagResponse struct
type FaveAddTagResponse object.FaveTag
// FaveAddTag method
//
// https://vk.com/dev/fave.addTag
func (vk *VK) FaveAddTag(params map[string]string) (response FaveAddTagResponse, vkErr Error) {
vk.RequestUnmarshal("fave.addTag", params, &response, &vkErr)
return
}
// FaveAddVideo method
//
// https://vk.com/dev/fave.addVideo
func (vk *VK) FaveAddVideo(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.addVideo", params, &response, &vkErr)
return
}
// FaveEditTag method
//
// https://vk.com/dev/fave.editTag
func (vk *VK) FaveEditTag(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.editTag", params, &response, &vkErr)
return
}
// FaveGetResponse struct
type FaveGetResponse struct {
Count int `json:"count"`
Items []object.FaveItem `json:"items"`
}
// FaveGet method
//
// extended=0
//
// https://vk.com/dev/fave.get
func (vk *VK) FaveGet(params map[string]string) (response FaveGetResponse, vkErr Error) {
params["extended"] = "0"
vk.RequestUnmarshal("fave.get", params, &response, &vkErr)
return
}
// FaveGetExtendedResponse struct
type FaveGetExtendedResponse struct {
Count int `json:"count"`
Items []object.FaveItem `json:"items"`
Profiles []object.UsersUser `json:"profiles"`
Groups []object.GroupsGroup `json:"groups"`
}
// FaveGetExtended method
//
// extended=1
//
// https://vk.com/dev/fave.get
func (vk *VK) FaveGetExtended(params map[string]string) (response FaveGetExtendedResponse, vkErr Error) {
params["extended"] = "1"
vk.RequestUnmarshal("fave.get", params, &response, &vkErr)
return
}
// FaveGetPagesResponse struct
type FaveGetPagesResponse struct {
Count int `json:"count"`
Items []object.FavePage `json:"items"`
}
// FaveGetPages method
//
// https://vk.com/dev/fave.getPages
func (vk *VK) FaveGetPages(params map[string]string) (response FaveGetPagesResponse, vkErr Error) {
vk.RequestUnmarshal("fave.getPages", params, &response, &vkErr)
return
}
// FaveGetTagsResponse struct
type FaveGetTagsResponse struct {
Count int `json:"count"`
Items []object.FaveTag `json:"items"`
}
// FaveGetTags method
//
// https://vk.com/dev/fave.getTags
func (vk *VK) FaveGetTags(params map[string]string) (response FaveGetTagsResponse, vkErr Error) {
vk.RequestUnmarshal("fave.getTags", params, &response, &vkErr)
return
}
// FaveMarkSeen method
//
// https://vk.com/dev/fave.markSeen
func (vk *VK) FaveMarkSeen(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.markSeen", params, &response, &vkErr)
return
}
// FaveRemoveArticle method
//
// https://vk.com/dev/fave.removeArticle
func (vk *VK) FaveRemoveArticle(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removeArticle", params, &response, &vkErr)
return
}
// FaveRemoveLink removes link from the user's faves.
//
// https://vk.com/dev/fave.removeLink
func (vk *VK) FaveRemoveLink(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removeLink", params, &response, &vkErr)
return
}
// FaveRemovePage method
//
// https://vk.com/dev/fave.removePage
func (vk *VK) FaveRemovePage(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removePage", params, &response, &vkErr)
return
}
// FaveRemovePost method
//
// https://vk.com/dev/fave.removePost
func (vk *VK) FaveRemovePost(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removePost", params, &response, &vkErr)
return
}
// FaveRemoveProduct method
//
// https://vk.com/dev/fave.removeProduct
func (vk *VK) FaveRemoveProduct(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removeProduct", params, &response, &vkErr)
return
}
// FaveRemoveTag method
//
// https://vk.com/dev/fave.removeTag
func (vk *VK) FaveRemoveTag(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removeTag", params, &response, &vkErr)
return
}
// FaveRemoveVideo method
//
// https://vk.com/dev/fave.removeVideo
func (vk *VK) FaveRemoveVideo(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.removeVideo", params, &response, &vkErr)
return
}
// FaveReorderTags method
//
// https://vk.com/dev/fave.reorderTags
func (vk *VK) FaveReorderTags(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.reorderTags", params, &response, &vkErr)
return
}
// FaveSetPageTags method
//
// https://vk.com/dev/fave.setPageTags
func (vk *VK) FaveSetPageTags(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.setPageTags", params, &response, &vkErr)
return
}
// FaveSetTags method
//
// https://vk.com/dev/fave.setTags
func (vk *VK) FaveSetTags(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.setTags", params, &response, &vkErr)
return
}
// FaveTrackPageInteraction method
//
// https://vk.com/dev/fave.trackPageInteraction
func (vk *VK) FaveTrackPageInteraction(params map[string]string) (response int, vkErr Error) {
vk.RequestUnmarshal("fave.trackPageInteraction", params, &response, &vkErr)
return
}