diff options
author | Wim <wim@42.be> | 2021-12-12 00:05:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 00:05:15 +0100 |
commit | 3893a035be347a7687a41d2054dd1b274d3a0504 (patch) | |
tree | dfe4a3bf72a0a6356e51bd8fc2e88e9a26e52331 /vendor/github.com/SevereCloud | |
parent | 658bdd9faa835660ae407331732e9d93d8f6443b (diff) | |
download | matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.gz matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.bz2 matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.zip |
Update dependencies/vendor (#1659)
Diffstat (limited to 'vendor/github.com/SevereCloud')
15 files changed, 448 insertions, 159 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml b/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml index 95108696..cb8abdca 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml +++ b/vendor/github.com/SevereCloud/vksdk/v2/.golangci.yml @@ -48,6 +48,11 @@ linters: - nilerr - revive - wastedassign + - bidichk + - contextcheck + - ireturn + - nilnil + - tenv # - wrapcheck # TODO: v3 Fix # - testpackage # TODO: Fix testpackage @@ -75,6 +80,8 @@ linters: # - cyclop # - promlinter # - tagliatelle +# - errname +# - varnamelen # depricated # - maligned diff --git a/vendor/github.com/SevereCloud/vksdk/v2/.travis.yml b/vendor/github.com/SevereCloud/vksdk/v2/.travis.yml deleted file mode 100644 index 47727020..00000000 --- a/vendor/github.com/SevereCloud/vksdk/v2/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -language: go - -cache: - directories: - - $HOME/.cache/go-build - - $HOME/gopath/pkg/mod - -go: - - 1.x - -before_script: - - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - - git describe --tags $(git rev-list --tags --max-count=1) --always - -script: - - go test -v -race -coverprofile=coverage.txt -covermode=atomic -p=1 ./... - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md b/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md index e78a83ea..7606cad8 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md +++ b/vendor/github.com/SevereCloud/vksdk/v2/CONTRIBUTING.md @@ -39,6 +39,7 @@ golangci-lint run # CLIENT_SECRET="" # USER_TOKEN="" # WIDGET_TOKEN="" +# MARUSIA_TOKEN="" # CLIENT_ID="123456" # GROUP_ID="123456" # ACCOUNT_ID="123456" @@ -56,6 +57,7 @@ go test ./... "go.testEnvVars": { "SERVICE_TOKEN": "", "WIDGET_TOKEN": "", + "MARUSIA_TOKEN": "", "GROUP_TOKEN": "", "CLIENT_SECRET": "", "USER_TOKEN": "", diff --git a/vendor/github.com/SevereCloud/vksdk/v2/README.md b/vendor/github.com/SevereCloud/vksdk/v2/README.md index c3ddd2d3..60e89dd4 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/README.md +++ b/vendor/github.com/SevereCloud/vksdk/v2/README.md @@ -1,125 +1,124 @@ -# VK SDK for Golang - -[![Build Status](https://travis-ci.com/SevereCloud/vksdk.svg?branch=master)](https://travis-ci.com/SevereCloud/vksdk) -[![PkgGoDev](https://pkg.go.dev/badge/github.com/SevereCloud/vksdk/v2/v2)](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2?tab=subdirectories) -[![VK Developers](https://img.shields.io/badge/developers-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.com/dev/) -[![codecov](https://codecov.io/gh/SevereCloud/vksdk/branch/master/graph/badge.svg)](https://codecov.io/gh/SevereCloud/vksdk) -[![VK chat](https://img.shields.io/badge/VK%20chat-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.me/join/AJQ1d6Or8Q00Y_CSOESfbqGt) -[![release](https://img.shields.io/github/v/tag/SevereCloud/vksdk?label=release)](https://github.com/SevereCloud/vksdk/releases) -[![license](https://img.shields.io/github/license/SevereCloud/vksdk.svg?maxAge=2592000)](https://github.com/SevereCloud/vksdk/blob/master/LICENSE) - -**VK SDK for Golang** ready implementation of the main VK API functions for Go. - -[Russian documentation](https://github.com/SevereCloud/vksdk/wiki) - -## Features - -Version API 5.131. - -- [API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/api) - - 400+ methods - - Ability to change the request handler - - Ability to modify HTTP client - - Request Limiter - - Token pool -- [Callback API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/callback) - - Tracking tool for users activity in your VK communities - - Supports all events - - Auto setting callback -- [Bots Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-bot) - - Allows you to work with community events in real time - - Supports all events - - Ability to modify HTTP client -- [User Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-user) - - Allows you to work with user events in real time - - Ability to modify HTTP client -- [Streaming API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/streaming) - - Receiving public data from VK by specified keywords - - Ability to modify HTTP client -- [FOAF](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/foaf) - - Machine-readable ontology describing persons - - Works with users and groups - - The only place to get page creation date -- [Games](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/games) - - Checking launch parameters - - Intermediate http handler -- [VK Mini Apps](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/vkapps) - - Checking launch parameters - - Intermediate http handler -- [Payments API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/payments) - - Processes payment notifications -- [Marusia Skills](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/marusia) - - For creating Marusia Skills - - Support SSML - -## Install - -```bash -# go mod init mymodulename -go get github.com/SevereCloud/vksdk/v2@latest -``` - -## Use by - -- [Joe](https://github.com/go-joe/joe) adapter: <https://github.com/tdakkota/joe-vk-adapter> -- [Logrus](https://github.com/sirupsen/logrus) hook: <https://github.com/SevereCloud/vkrus> - -### Example - -```go -package main - -import ( - "context" - "log" - - "github.com/SevereCloud/vksdk/v2/api" - "github.com/SevereCloud/vksdk/v2/api/params" - "github.com/SevereCloud/vksdk/v2/events" - "github.com/SevereCloud/vksdk/v2/longpoll-bot" -) - -func main() { - token := "<TOKEN>" // use os.Getenv("TOKEN") - vk := api.NewVK(token) - - // get information about the group - group, err := vk.GroupsGetByID(nil) - if err != nil { - log.Fatal(err) - } - - // Initializing Long Poll - lp, err := longpoll.NewLongPoll(vk, group[0].ID) - if err != nil { - log.Fatal(err) - } - - // New message event - lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) { - log.Printf("%d: %s", obj.Message.PeerID, obj.Message.Text) - - if obj.Message.Text == "ping" { - b := params.NewMessagesSendBuilder() - b.Message("pong") - b.RandomID(0) - b.PeerID(obj.Message.PeerID) - - _, err := vk.MessagesSend(b.Params) - if err != nil { - log.Fatal(err) - } - } - }) - - // Run Bots Long Poll - log.Println("Start Long Poll") - if err := lp.Run(); err != nil { - log.Fatal(err) - } -} -``` - -## LICENSE - -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk?ref=badge_large) +# VK SDK for Golang
+
+[![PkgGoDev](https://pkg.go.dev/badge/github.com/SevereCloud/vksdk/v2/v2)](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2?tab=subdirectories)
+[![VK Developers](https://img.shields.io/badge/developers-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.com/dev/)
+[![codecov](https://codecov.io/gh/SevereCloud/vksdk/branch/master/graph/badge.svg)](https://codecov.io/gh/SevereCloud/vksdk)
+[![VK chat](https://img.shields.io/badge/VK%20chat-%234a76a8.svg?logo=VK&logoColor=white)](https://vk.me/join/AJQ1d6Or8Q00Y_CSOESfbqGt)
+[![release](https://img.shields.io/github/v/tag/SevereCloud/vksdk?label=release)](https://github.com/SevereCloud/vksdk/releases)
+[![license](https://img.shields.io/github/license/SevereCloud/vksdk.svg?maxAge=2592000)](https://github.com/SevereCloud/vksdk/blob/master/LICENSE)
+
+**VK SDK for Golang** ready implementation of the main VK API functions for Go.
+
+[Russian documentation](https://github.com/SevereCloud/vksdk/wiki)
+
+## Features
+
+Version API 5.131.
+
+- [API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/api)
+ - 400+ methods
+ - Ability to change the request handler
+ - Ability to modify HTTP client
+ - Request Limiter
+ - Token pool
+- [Callback API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/callback)
+ - Tracking tool for users activity in your VK communities
+ - Supports all events
+ - Auto setting callback
+- [Bots Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-bot)
+ - Allows you to work with community events in real time
+ - Supports all events
+ - Ability to modify HTTP client
+- [User Long Poll API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/longpoll-user)
+ - Allows you to work with user events in real time
+ - Ability to modify HTTP client
+- [Streaming API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/streaming)
+ - Receiving public data from VK by specified keywords
+ - Ability to modify HTTP client
+- [FOAF](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/foaf)
+ - Machine-readable ontology describing persons
+ - Works with users and groups
+ - The only place to get page creation date
+- [Games](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/games)
+ - Checking launch parameters
+ - Intermediate http handler
+- [VK Mini Apps](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/vkapps)
+ - Checking launch parameters
+ - Intermediate http handler
+- [Payments API](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/payments)
+ - Processes payment notifications
+- [Marusia Skills](https://pkg.go.dev/github.com/SevereCloud/vksdk/v2/marusia)
+ - For creating Marusia Skills
+ - Support SSML
+
+## Install
+
+```bash
+# go mod init mymodulename
+go get github.com/SevereCloud/vksdk/v2@latest
+```
+
+## Use by
+
+- [Joe](https://github.com/go-joe/joe) adapter: <https://github.com/tdakkota/joe-vk-adapter>
+- [Logrus](https://github.com/sirupsen/logrus) hook: <https://github.com/SevereCloud/vkrus>
+
+### Example
+
+```go
+package main
+
+import (
+ "context"
+ "log"
+
+ "github.com/SevereCloud/vksdk/v2/api"
+ "github.com/SevereCloud/vksdk/v2/api/params"
+ "github.com/SevereCloud/vksdk/v2/events"
+ "github.com/SevereCloud/vksdk/v2/longpoll-bot"
+)
+
+func main() {
+ token := "<TOKEN>" // use os.Getenv("TOKEN")
+ vk := api.NewVK(token)
+
+ // get information about the group
+ group, err := vk.GroupsGetByID(nil)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // Initializing Long Poll
+ lp, err := longpoll.NewLongPoll(vk, group[0].ID)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // New message event
+ lp.MessageNew(func(_ context.Context, obj events.MessageNewObject) {
+ log.Printf("%d: %s", obj.Message.PeerID, obj.Message.Text)
+
+ if obj.Message.Text == "ping" {
+ b := params.NewMessagesSendBuilder()
+ b.Message("pong")
+ b.RandomID(0)
+ b.PeerID(obj.Message.PeerID)
+
+ _, err := vk.MessagesSend(b.Params)
+ if err != nil {
+ log.Fatal(err)
+ }
+ }
+ })
+
+ // Run Bots Long Poll
+ log.Println("Start Long Poll")
+ if err := lp.Run(); err != nil {
+ log.Fatal(err)
+ }
+}
+```
+
+## LICENSE
+
+[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FSevereCloud%2Fvksdk?ref=badge_large)
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go b/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go index e9ea1310..03032aa6 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go @@ -159,6 +159,9 @@ const ( ErrRateLimit ErrorType = 29 ErrPrivateProfile ErrorType = 30 // This profile is private + // Client version deprecated. + ErrClientVersionDeprecated ErrorType = 34 + // Method execution was interrupted due to timeout. ErrExecutionTimeout ErrorType = 36 @@ -177,6 +180,9 @@ const ( // Additional signup required. ErrAdditionalSignupRequired ErrorType = 41 + // IP is not allowed. + ErrIPNotAllowed ErrorType = 42 + // One of the parameters specified was missing or invalid // // Check the required parameters list and their format on a method @@ -586,6 +592,12 @@ const ( // Can't send message, reply timed out. ErrMessagesReplyTimedOut ErrorType = 950 + // You can't access donut chat without subscription. + ErrMessagesAccessDonutChat ErrorType = 962 + + // This user can't be added to the work chat, as they aren't an employe. + ErrMessagesAccessWorkChat ErrorType = 967 + // Invalid phone number. ErrParamPhone ErrorType = 1000 @@ -598,6 +610,12 @@ const ( // Processing.. Try later. ErrAuthDelay ErrorType = 1112 + // Anonymous token has expired. + ErrAnonymousTokenExpired ErrorType = 1114 + + // Anonymous token is invalid. + ErrAnonymousTokenInvalid ErrorType = 1116 + // Invalid document id. ErrParamDocID ErrorType = 1150 @@ -724,6 +742,9 @@ const ( // Market was already disabled in this group. ErrMarketAlreadyDisabled ErrorType = 1432 + // Main album can not be hidden. + ErrMainAlbumCantHidden ErrorType = 1446 + // Story has already expired. ErrStoryExpired ErrorType = 1600 @@ -783,6 +804,33 @@ const ( // Can't set AliExpress tag to this type of object. ErrAliExpressTag ErrorType = 3800 + + // Invalid upload response. + ErrInvalidUploadResponse ErrorType = 5701 + + // Invalid upload hash. + ErrInvalidUploadHash ErrorType = 5702 + + // Invalid upload user. + ErrInvalidUploadUser ErrorType = 5703 + + // Invalid upload group. + ErrInvalidUploadGroup ErrorType = 5704 + + // Invalid crop data. + ErrInvalidCropData ErrorType = 5705 + + // To small avatar. + ErrToSmallAvatar ErrorType = 5706 + + // Photo not found. + ErrPhotoNotFound ErrorType = 5708 + + // Invalid Photo. + ErrInvalidPhoto ErrorType = 5709 + + // Invalid hash. + ErrInvalidHash ErrorType = 5710 ) // ErrorSubtype is the subtype of an error. diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go b/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go index 5bee205a..cc52cd0d 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/execute.go @@ -22,6 +22,9 @@ func (vk *VK) ExecuteWithArgs(code string, params Params, obj interface{}) error } resp, err := vk.Handler("execute", params, reqParams) + if err != nil { + return err + } jsonErr := json.Unmarshal(resp.Response, &obj) if jsonErr != nil { diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/market.go b/vendor/github.com/SevereCloud/vksdk/v2/api/market.go index f78a068d..0bb35687 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/market.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/market.go @@ -318,3 +318,19 @@ func (vk *VK) MarketSearch(params Params) (response MarketSearchResponse, err er err = vk.RequestUnmarshal("market.search", &response, params) return } + +// MarketSearchItemsResponse struct. +type MarketSearchItemsResponse struct { + Count int `json:"count"` + ViewType int `json:"view_type"` + Items []object.MarketMarketItem `json:"items"` + Groups []object.GroupsGroup `json:"groups,omitempty"` +} + +// MarketSearchItems method. +// +// https://vk.com/dev/market.searchItems +func (vk *VK) MarketSearchItems(params Params) (response MarketSearchItemsResponse, err error) { + err = vk.RequestUnmarshal("market.searchItems", &response, params) + return +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go b/vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go new file mode 100644 index 00000000..729dbc80 --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/marusia.go @@ -0,0 +1,103 @@ +package api // import "github.com/SevereCloud/vksdk/v2/api" + +import ( + "github.com/SevereCloud/vksdk/v2/object" +) + +// MarusiaGetPictureUploadLinkResponse struct. +type MarusiaGetPictureUploadLinkResponse struct { + PictureUploadLink string `json:"picture_upload_link"` // Link +} + +// MarusiaGetPictureUploadLink method. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaGetPictureUploadLink(params Params) (response MarusiaGetPictureUploadLinkResponse, err error) { + err = vk.RequestUnmarshal("marusia.getPictureUploadLink", &response, params) + return +} + +// MarusiaSavePictureResponse struct. +type MarusiaSavePictureResponse struct { + AppID int `json:"app_id"` + PhotoID int `json:"photo_id"` +} + +// MarusiaSavePicture method. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaSavePicture(params Params) (response MarusiaSavePictureResponse, err error) { + err = vk.RequestUnmarshal("marusia.savePicture", &response, params) + return +} + +// MarusiaGetPicturesResponse struct. +type MarusiaGetPicturesResponse struct { + Count int `json:"count"` + Items []object.MarusiaPicture `json:"items"` +} + +// MarusiaGetPictures method. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaGetPictures(params Params) (response MarusiaGetPicturesResponse, err error) { + err = vk.RequestUnmarshal("marusia.getPictures", &response, params) + return +} + +// MarusiaDeletePicture delete picture. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaDeletePicture(params Params) (response int, err error) { + err = vk.RequestUnmarshal("marusia.deletePicture", &response, params) + return +} + +// MarusiaGetAudioUploadLinkResponse struct. +type MarusiaGetAudioUploadLinkResponse struct { + AudioUploadLink string `json:"audio_upload_link"` // Link +} + +// MarusiaGetAudioUploadLink method. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaGetAudioUploadLink(params Params) (response MarusiaGetAudioUploadLinkResponse, err error) { + err = vk.RequestUnmarshal("marusia.getAudioUploadLink", &response, params) + return +} + +// MarusiaCreateAudioResponse struct. +type MarusiaCreateAudioResponse struct { + ID int `json:"id"` + Title string `json:"title"` +} + +// MarusiaCreateAudio method. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaCreateAudio(params Params) (response MarusiaCreateAudioResponse, err error) { + err = vk.RequestUnmarshal("marusia.createAudio", &response, params) + return +} + +// MarusiaGetAudiosResponse struct. +type MarusiaGetAudiosResponse struct { + Count int `json:"count"` + Audios []object.MarusiaAudio `json:"audios"` +} + +// MarusiaGetAudios method. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaGetAudios(params Params) (response MarusiaGetAudiosResponse, err error) { + err = vk.RequestUnmarshal("marusia.getAudios", &response, params) + return +} + +// MarusiaDeleteAudio delete audio. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) MarusiaDeleteAudio(params Params) (response int, err error) { + err = vk.RequestUnmarshal("marusia.deleteAudio", &response, params) + return +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go b/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go index 2c947c5d..59f65460 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/upload.go @@ -959,3 +959,57 @@ func (vk *VK) UploadGroupImage(imageType string, file io.Reader) (response objec return } + +// UploadMarusiaPicture uploading picture. +// +// Limits: height not more than 600 px, +// aspect ratio of at least 2:1. +func (vk *VK) UploadMarusiaPicture(file io.Reader) (response MarusiaSavePictureResponse, err error) { + uploadServer, err := vk.MarusiaGetPictureUploadLink(nil) + if err != nil { + return + } + + bodyContent, err := vk.UploadFile(uploadServer.PictureUploadLink, file, "photo", "photo.jpg") + if err != nil { + return + } + + var handler object.MarusiaPictureUploadResponse + + err = json.Unmarshal(bodyContent, &handler) + if err != nil { + return + } + + photo, _ := json.Marshal(handler.Photo) + + response, err = vk.MarusiaSavePicture(Params{ + "server": handler.Server, + "photo": string(photo), + "hash": handler.Hash, + }) + + return +} + +// UploadMarusiaAudio uploading audio. +// +// https://vk.com/dev/marusia_skill_docs10 +func (vk *VK) UploadMarusiaAudio(file io.Reader) (response MarusiaCreateAudioResponse, err error) { + uploadServer, err := vk.MarusiaGetAudioUploadLink(nil) + if err != nil { + return + } + + bodyContent, err := vk.UploadFile(uploadServer.AudioUploadLink, file, "file", "audio.mp3") + if err != nil { + return + } + + response, err = vk.MarusiaCreateAudio(Params{ + "audio_meta": string(bodyContent), + }) + + return +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/doc.go b/vendor/github.com/SevereCloud/vksdk/v2/doc.go index 1be7800e..61e19efe 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/doc.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/doc.go @@ -7,6 +7,6 @@ package vksdk // Module constants. const ( - Version = "2.10.0" + Version = "2.11.0" API = "5.131" ) diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/market.go b/vendor/github.com/SevereCloud/vksdk/v2/object/market.go index a74f8b83..a1d75213 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/market.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/market.go @@ -28,6 +28,8 @@ type MarketMarketAlbum struct { Photo PhotosPhoto `json:"photo"` Title string `json:"title"` // Market album title UpdatedTime int `json:"updated_time"` // Date when album has been updated last time in Unixtime + IsMain BaseBoolInt `json:"is_main"` + IsHidden BaseBoolInt `json:"is_hidden"` } // ToAttachment return attachment format. diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go b/vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go new file mode 100644 index 00000000..a6671d4d --- /dev/null +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/marusia.go @@ -0,0 +1,52 @@ +package object // import "github.com/SevereCloud/vksdk/v2/object" + +import ( + "encoding/json" +) + +// MarusiaPicture struct. +type MarusiaPicture struct { + ID int `json:"id"` + OwnerID int `json:"owner_id"` +} + +// MarusiaPictureUploadResponse struct. +type MarusiaPictureUploadResponse struct { + Hash string `json:"hash"` // Uploading hash + Photo json.RawMessage `json:"photo"` // Uploaded photo data + Server int `json:"server"` // Upload server number + AID int `json:"aid"` + MessageCode int `json:"message_code"` +} + +// MarusiaAudio struct. +type MarusiaAudio struct { + ID int `json:"id"` + Title string `json:"title"` + OwnerID int `json:"owner_id"` +} + +// MarusiaAudioUploadResponse struct. +type MarusiaAudioUploadResponse struct { + Sha string `json:"sha"` + Secret string `json:"secret"` + Meta MarusiaAudioMeta `json:"meta"` + Hash string `json:"hash"` + Server string `json:"server"` + UserID int `json:"user_id"` + RequestID string `json:"request_id"` +} + +// MarusiaAudioMeta struct. +type MarusiaAudioMeta struct { + Album string `json:"album"` + Artist string `json:"artist"` + Bitrate string `json:"bitrate"` + Duration string `json:"duration"` + Genre string `json:"genre"` + Kad string `json:"kad"` + Md5 string `json:"md5"` + Md5DataSize string `json:"md5_data_size"` + Samplerate string `json:"samplerate"` + Title string `json:"title"` +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go b/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go index c6fcf5d8..4c553486 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go @@ -375,17 +375,17 @@ type MessagesTemplateElement struct { // MessagesTemplateElementCarousel struct. type MessagesTemplateElementCarousel struct { - Title string `json:"title"` - Action MessagesTemplateElementCarouselAction `json:"action"` - Description string `json:"description"` - Photo PhotosPhoto `json:"photo"` - Buttons []MessagesKeyboardButton `json:"buttons"` + Title string `json:"title,omitempty"` + Action MessagesTemplateElementCarouselAction `json:"action,omitempty"` + Description string `json:"description,omitempty"` + Photo *PhotosPhoto `json:"photo,omitempty"` + Buttons []MessagesKeyboardButton `json:"buttons,omitempty"` } // MessagesTemplateElementCarouselAction struct. type MessagesTemplateElementCarouselAction struct { Type string `json:"type"` - Link string `json:"link"` + Link string `json:"link,omitempty"` } // MessageContentSourceMessage ... @@ -443,6 +443,7 @@ type MessagesChat struct { AdminID int `json:"admin_id"` // Chat creator ID ID int `json:"id"` // Chat ID IsDefaultPhoto BaseBoolInt `json:"is_default_photo"` + IsGroupChannel BaseBoolInt `json:"is_group_channel"` Photo100 string `json:"photo_100"` // URL of the preview image with 100 px in width Photo200 string `json:"photo_200"` // URL of the preview image with 200 px in width Photo50 string `json:"photo_50"` // URL of the preview image with 50 px in width diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go b/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go index 248fd8c0..c04ab653 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/stories.go @@ -251,8 +251,10 @@ type StoriesClickableSticker struct { // nolint: maligned StickerID int `json:"sticker_id,omitempty"` StickerPackID int `json:"sticker_pack_id,omitempty"` - // type=place + // type=place or geo PlaceID int `json:"place_id,omitempty"` + // Title + CategoryID int `json:"category_id,omitempty"` // type=question Question string `json:"question,omitempty"` @@ -267,8 +269,14 @@ type StoriesClickableSticker struct { // nolint: maligned Hashtag string `json:"hashtag,omitempty"` // type=link - LinkObject BaseLink `json:"link_object,omitempty"` - TooltipText string `json:"tooltip_text,omitempty"` + LinkObject BaseLink `json:"link_object,omitempty"` + TooltipText string `json:"tooltip_text,omitempty"` + TooltipTextKey string `json:"tooltip_text_key,omitempty"` + + // type=time + TimestampMs int64 `json:"timestamp_ms,omitempty"` + Date string `json:"date,omitempty"` + Title string `json:"title,omitempty"` // type=market_item Subtype string `json:"subtype,omitempty"` @@ -290,10 +298,19 @@ type StoriesClickableSticker struct { // nolint: maligned AudioStartTime int `json:"audio_start_time,omitempty"` // type=app - App AppsApp `json:"app"` - AppContext string `json:"app_context"` - HasNewInteractions BaseBoolInt `json:"has_new_interactions"` - IsBroadcastNotifyAllowed BaseBoolInt `json:"is_broadcast_notify_allowed"` + App AppsApp `json:"app,omitempty"` + AppContext string `json:"app_context,omitempty"` + HasNewInteractions BaseBoolInt `json:"has_new_interactions,omitempty"` + IsBroadcastNotifyAllowed BaseBoolInt `json:"is_broadcast_notify_allowed,omitempty"` + + // type=emoji + Emoji string `json:"emoji,omitempty"` + + // type=text + Text string `json:"text,omitempty"` + BackgroundStyle string `json:"background_style,omitempty"` + Alignment string `json:"alignment,omitempty"` + SelectionColor string `json:"selection_color,omitempty"` } // TODO: сделать несколько структур для кликабельного стикера @@ -313,6 +330,10 @@ const ( ClickableStickerPoll = "poll" ClickableStickerMusic = "music" ClickableStickerApp = "app" + ClickableStickerTime = "time" + ClickableStickerEmoji = "emoji" + ClickableStickerGeo = "geo" + ClickableStickerText = "text" ) // Subtype of clickable sticker. diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/video.go b/vendor/github.com/SevereCloud/vksdk/v2/object/video.go index 0816af24..5a7e9e8d 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/video.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/video.go @@ -213,6 +213,7 @@ type VideoVideoFull struct { Description string `json:"description"` // Video description Duration int `json:"duration"` // Video duration in seconds Files VideoVideoFiles `json:"files"` + Trailer VideoVideoFiles `json:"trailer"` ID int `json:"id"` // Video ID Likes BaseLikes `json:"likes"` Live int `json:"live"` // Returns if the video is live translation |