diff options
author | Ivanik <ivan170102@gmail.com> | 2021-01-29 04:25:14 +0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-29 00:25:14 +0100 |
commit | 8764be74616bde87bbbf6c32901cd9f43264d1e0 (patch) | |
tree | 88902ba17d6a6d245cadb7e0b277bee7ef424f99 /vendor/github.com/SevereCloud/vksdk/v2/api/appwidgets.go | |
parent | 5dd15ef8e716c65accb6cd021095c0e19913d55f (diff) | |
download | matterbridge-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/appwidgets.go')
-rw-r--r-- | vendor/github.com/SevereCloud/vksdk/v2/api/appwidgets.go | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/appwidgets.go b/vendor/github.com/SevereCloud/vksdk/v2/api/appwidgets.go new file mode 100644 index 00000000..5500d0e2 --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/appwidgets.go @@ -0,0 +1,100 @@ +package api // import "github.com/SevereCloud/vksdk/v2/api" + +import ( + "github.com/SevereCloud/vksdk/v2/object" +) + +// AppWidgetsGetAppImageUploadServerResponse struct. +type AppWidgetsGetAppImageUploadServerResponse struct { + UploadURL string `json:"upload_url"` +} + +// AppWidgetsGetAppImageUploadServer returns a URL for uploading a +// photo to the app collection for community app widgets. +// +// https://vk.com/dev/appWidgets.getAppImageUploadServer +func (vk *VK) AppWidgetsGetAppImageUploadServer(params Params) ( + response AppWidgetsGetAppImageUploadServerResponse, + err error, +) { + err = vk.RequestUnmarshal("appWidgets.getAppImageUploadServer", &response, params) + return +} + +// AppWidgetsGetAppImagesResponse struct. +type AppWidgetsGetAppImagesResponse struct { + Count int `json:"count"` + Items []object.AppWidgetsImage `json:"items"` +} + +// AppWidgetsGetAppImages returns an app collection of images for community app widgets. +// +// https://vk.com/dev/appWidgets.getAppImages +func (vk *VK) AppWidgetsGetAppImages(params Params) (response AppWidgetsGetAppImagesResponse, err error) { + err = vk.RequestUnmarshal("appWidgets.getAppImages", &response, params) + return +} + +// AppWidgetsGetGroupImageUploadServerResponse struct. +type AppWidgetsGetGroupImageUploadServerResponse struct { + UploadURL string `json:"upload_url"` +} + +// AppWidgetsGetGroupImageUploadServer returns a URL for uploading +// a photo to the community collection for community app widgets. +// +// https://vk.com/dev/appWidgets.getGroupImageUploadServer +func (vk *VK) AppWidgetsGetGroupImageUploadServer(params Params) ( + response AppWidgetsGetGroupImageUploadServerResponse, + err error, +) { + err = vk.RequestUnmarshal("appWidgets.getGroupImageUploadServer", &response, params) + return +} + +// AppWidgetsGetGroupImagesResponse struct. +type AppWidgetsGetGroupImagesResponse struct { + Count int `json:"count"` + Items []object.AppWidgetsImage `json:"items"` +} + +// AppWidgetsGetGroupImages returns a community collection of images for community app widgets. +// +// https://vk.com/dev/appWidgets.getGroupImages +func (vk *VK) AppWidgetsGetGroupImages(params Params) (response AppWidgetsGetGroupImagesResponse, err error) { + err = vk.RequestUnmarshal("appWidgets.getGroupImages", &response, params) + return +} + +// AppWidgetsGetImagesByID returns an image for community app widgets by its ID. +// +// https://vk.com/dev/appWidgets.getImagesById +func (vk *VK) AppWidgetsGetImagesByID(params Params) (response object.AppWidgetsImage, err error) { + err = vk.RequestUnmarshal("appWidgets.getImagesById", &response, params) + return +} + +// AppWidgetsSaveAppImage allows to save image into app collection for community app widgets. +// +// https://vk.com/dev/appWidgets.saveAppImage +func (vk *VK) AppWidgetsSaveAppImage(params Params) (response object.AppWidgetsImage, err error) { + err = vk.RequestUnmarshal("appWidgets.saveAppImage", &response, params) + return +} + +// AppWidgetsSaveGroupImage allows to save image into community collection for community app widgets. +// +// https://vk.com/dev/appWidgets.saveGroupImage +func (vk *VK) AppWidgetsSaveGroupImage(params Params) (response object.AppWidgetsImage, err error) { + err = vk.RequestUnmarshal("appWidgets.saveGroupImage", &response, params) + return +} + +// AppWidgetsUpdate allows to update community app widget. +// +// https://vk.com/dev/appWidgets.update +func (vk *VK) AppWidgetsUpdate(params Params) (response int, err error) { + err = vk.RequestUnmarshal("appWidgets.update", &response, params) + + return +} |