summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/api/likes.go
diff options
context:
space:
mode:
authorIvanik <ivan170102@gmail.com>2021-01-29 04:25:14 +0500
committerGitHub <noreply@github.com>2021-01-29 00:25:14 +0100
commit8764be74616bde87bbbf6c32901cd9f43264d1e0 (patch)
tree88902ba17d6a6d245cadb7e0b277bee7ef424f99 /vendor/github.com/SevereCloud/vksdk/v2/api/likes.go
parent5dd15ef8e716c65accb6cd021095c0e19913d55f (diff)
downloadmatterbridge-msglm-8764be74616bde87bbbf6c32901cd9f43264d1e0.tar.gz
matterbridge-msglm-8764be74616bde87bbbf6c32901cd9f43264d1e0.tar.bz2
matterbridge-msglm-8764be74616bde87bbbf6c32901cd9f43264d1e0.zip
Add vk bridge (#1372)
* Add vk bridge * Vk bridge attachments * Vk bridge forwarded messages * Vk bridge sample config and code cleanup * Vk bridge add vendor * Vk bridge message edit * Vk bridge: fix fetching names of other bots * Vk bridge: code cleanup * Vk bridge: fix shadows declaration * Vk bridge: remove UseFileURL
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/api/likes.go')
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/api/likes.go79
1 files changed, 79 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/likes.go b/vendor/github.com/SevereCloud/vksdk/v2/api/likes.go
new file mode 100644
index 00000000..047c2935
--- /dev/null
+++ b/vendor/github.com/SevereCloud/vksdk/v2/api/likes.go
@@ -0,0 +1,79 @@
+package api // import "github.com/SevereCloud/vksdk/v2/api"
+
+import (
+ "github.com/SevereCloud/vksdk/v2/object"
+)
+
+// LikesAddResponse struct.
+type LikesAddResponse struct {
+ Likes int `json:"likes"`
+}
+
+// LikesAdd adds the specified object to the Likes list of the current user.
+//
+// https://vk.com/dev/likes.add
+func (vk *VK) LikesAdd(params Params) (response LikesAddResponse, err error) {
+ err = vk.RequestUnmarshal("likes.add", &response, params)
+ return
+}
+
+// LikesDeleteResponse struct.
+type LikesDeleteResponse struct {
+ Likes int `json:"likes"`
+}
+
+// LikesDelete deletes the specified object from the Likes list of the current user.
+//
+// https://vk.com/dev/likes.delete
+func (vk *VK) LikesDelete(params Params) (response LikesDeleteResponse, err error) {
+ err = vk.RequestUnmarshal("likes.delete", &response, params)
+ return
+}
+
+// LikesGetListResponse struct.
+type LikesGetListResponse struct {
+ Count int `json:"count"`
+ Items []int `json:"items"`
+}
+
+// LikesGetList likes.getList returns a list of IDs of users who added the specified object to their Likes list.
+//
+// extended=0
+//
+// https://vk.com/dev/likes.getList
+func (vk *VK) LikesGetList(params Params) (response LikesGetListResponse, err error) {
+ err = vk.RequestUnmarshal("likes.getList", &response, params, Params{"extended": false})
+
+ return
+}
+
+// LikesGetListExtendedResponse struct.
+type LikesGetListExtendedResponse struct {
+ Count int `json:"count"`
+ Items []object.UsersUser `json:"items"`
+}
+
+// LikesGetListExtended likes.getList returns a list of IDs of users who added the specified object to their Likes list.
+//
+// extended=1
+//
+// https://vk.com/dev/likes.getList
+func (vk *VK) LikesGetListExtended(params Params) (response LikesGetListExtendedResponse, err error) {
+ err = vk.RequestUnmarshal("likes.getList", &response, params, Params{"extended": true})
+
+ return
+}
+
+// LikesIsLikedResponse struct.
+type LikesIsLikedResponse struct {
+ Liked object.BaseBoolInt `json:"liked"`
+ Copied object.BaseBoolInt `json:"copied"`
+}
+
+// LikesIsLiked checks for the object in the Likes list of the specified user.
+//
+// https://vk.com/dev/likes.isLiked
+func (vk *VK) LikesIsLiked(params Params) (response LikesIsLikedResponse, err error) {
+ err = vk.RequestUnmarshal("likes.isLiked", &response, params)
+ return
+}