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
|
package api // import "github.com/SevereCloud/vksdk/v2/api"
import (
"github.com/SevereCloud/vksdk/v2/object"
)
// PodcastsGetCatalogResponse struct.
type PodcastsGetCatalogResponse struct {
Items []object.PodcastsItem `json:"items"`
}
// PodcastsGetCatalog method.
//
// extended=0
//
// https://vk.com/dev/podcasts.getCatalog
func (vk *VK) PodcastsGetCatalog(params Params) (response PodcastsGetCatalogResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getCatalog", &response, params, Params{"extended": false})
return
}
// PodcastsGetCatalogExtendedResponse struct.
type PodcastsGetCatalogExtendedResponse struct {
Items []object.PodcastsItem `json:"items"`
object.ExtendedResponse
}
// PodcastsGetCatalogExtended method.
//
// extended=1
//
// https://vk.com/dev/podcasts.getCatalog
func (vk *VK) PodcastsGetCatalogExtended(params Params) (response PodcastsGetCatalogExtendedResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getCatalog", &response, params, Params{"extended": true})
return
}
// PodcastsGetCategoriesResponse struct.
type PodcastsGetCategoriesResponse []object.PodcastsCategory
// PodcastsGetCategories method.
//
// https://vk.com/dev/podcasts.getCategories
func (vk *VK) PodcastsGetCategories(params Params) (response PodcastsGetCategoriesResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getCategories", &response, params)
return
}
// PodcastsGetEpisodesResponse struct.
type PodcastsGetEpisodesResponse struct {
Count int `json:"count"`
Items []object.PodcastsEpisode `json:"items"`
}
// PodcastsGetEpisodes method.
//
// https://vk.com/dev/podcasts.getEpisodes
func (vk *VK) PodcastsGetEpisodes(params Params) (response PodcastsGetEpisodesResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getEpisodes", &response, params)
return
}
// PodcastsGetFeedResponse struct.
type PodcastsGetFeedResponse struct {
Items []object.PodcastsEpisode `json:"items"`
NextFrom string `json:"next_from"`
}
// PodcastsGetFeed method.
//
// extended=0
//
// https://vk.com/dev/podcasts.getFeed
func (vk *VK) PodcastsGetFeed(params Params) (response PodcastsGetFeedResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getFeed", &response, params, Params{"extended": false})
return
}
// PodcastsGetFeedExtendedResponse struct.
type PodcastsGetFeedExtendedResponse struct {
Items []object.PodcastsEpisode `json:"items"`
NextFrom string `json:"next_from"`
object.ExtendedResponse
}
// PodcastsGetFeedExtended method.
//
// extended=1
//
// https://vk.com/dev/podcasts.getFeed
func (vk *VK) PodcastsGetFeedExtended(params Params) (response PodcastsGetFeedExtendedResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getFeed", &response, params, Params{"extended": true})
return
}
// PodcastsGetStartPageResponse struct.
type PodcastsGetStartPageResponse struct {
Order []string `json:"order"`
InProgress []object.PodcastsEpisode `json:"in_progress"`
Bookmarks []object.PodcastsEpisode `json:"bookmarks"`
Articles []object.Article `json:"articles"`
StaticHowTo []bool `json:"static_how_to"`
FriendsLiked []object.PodcastsEpisode `json:"friends_liked"`
Subscriptions []object.PodcastsEpisode `json:"subscriptions"`
CategoriesList []object.PodcastsCategory `json:"categories_list"`
RecommendedEpisodes []object.PodcastsEpisode `json:"recommended_episodes"`
Catalog []struct {
Category object.PodcastsCategory `json:"category"`
Items []object.PodcastsItem `json:"items"`
} `json:"catalog"`
}
// PodcastsGetStartPage method.
//
// extended=0
//
// https://vk.com/dev/podcasts.getStartPage
func (vk *VK) PodcastsGetStartPage(params Params) (response PodcastsGetStartPageResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getStartPage", &response, params, Params{"extended": false})
return
}
// PodcastsGetStartPageExtendedResponse struct.
type PodcastsGetStartPageExtendedResponse struct {
Order []string `json:"order"`
InProgress []object.PodcastsEpisode `json:"in_progress"`
Bookmarks []object.PodcastsEpisode `json:"bookmarks"`
Articles []object.Article `json:"articles"`
StaticHowTo []bool `json:"static_how_to"`
FriendsLiked []object.PodcastsEpisode `json:"friends_liked"`
Subscriptions []object.PodcastsEpisode `json:"subscriptions"`
CategoriesList []object.PodcastsCategory `json:"categories_list"`
RecommendedEpisodes []object.PodcastsEpisode `json:"recommended_episodes"`
Catalog []struct {
Category object.PodcastsCategory `json:"category"`
Items []object.PodcastsItem `json:"items"`
} `json:"catalog"`
object.ExtendedResponse
}
// PodcastsGetStartPageExtended method.
//
// extended=1
//
// https://vk.com/dev/podcasts.getStartPage
func (vk *VK) PodcastsGetStartPageExtended(params Params) (response PodcastsGetStartPageExtendedResponse, err error) {
err = vk.RequestUnmarshal("podcasts.getStartPage", &response, params, Params{"extended": true})
return
}
// PodcastsMarkAsListened method.
//
// https://vk.com/dev/podcasts.markAsListened
func (vk *VK) PodcastsMarkAsListened(params Params) (response int, err error) {
err = vk.RequestUnmarshal("podcasts.markAsListened", &response, params)
return
}
// PodcastsSubscribe method.
//
// https://vk.com/dev/podcasts.subscribe
func (vk *VK) PodcastsSubscribe(params Params) (response int, err error) {
err = vk.RequestUnmarshal("podcasts.subscribe", &response, params)
return
}
// PodcastsUnsubscribe method.
//
// https://vk.com/dev/podcasts.unsubscribe
func (vk *VK) PodcastsUnsubscribe(params Params) (response int, err error) {
err = vk.RequestUnmarshal("podcasts.unsubscribe", &response, params)
return
}
|