diff options
Diffstat (limited to 'vendor/github.com/SevereCloud')
12 files changed, 179 insertions, 109 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/README.md b/vendor/github.com/SevereCloud/vksdk/v2/README.md index 580f6a95..f4986579 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/README.md +++ b/vendor/github.com/SevereCloud/vksdk/v2/README.md @@ -1,7 +1,7 @@ # 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/)
+[![VK Developers](https://img.shields.io/badge/developers-%234a76a8.svg?logo=VK&logoColor=white)](https://dev.vk.com/)
[![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)
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/account.go b/vendor/github.com/SevereCloud/vksdk/v2/api/account.go index 7e38ce2b..5732ed61 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/account.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/account.go @@ -141,6 +141,8 @@ func (vk *VK) AccountSetInfo(params Params) (response int, err error) { // AccountSetNameInMenu sets an application screen name // (up to 17 characters), that is shown to the user in the left menu. // +// Deprecated: This method is deprecated and may be disabled soon, please avoid +// // https://vk.com/dev/account.setNameInMenu func (vk *VK) AccountSetNameInMenu(params Params) (response int, err error) { err = vk.RequestUnmarshal("account.setNameInMenu", &response, params) diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/store.go b/vendor/github.com/SevereCloud/vksdk/v2/api/store.go index a2df4ca0..4a9f5935 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/store.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/store.go @@ -1,4 +1,4 @@ -package api // import "github.com/SevereCloud/vksdk/api" +package api // import "github.com/SevereCloud/vksdk/v2/api" import ( "github.com/SevereCloud/vksdk/v2/object" diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/video.go b/vendor/github.com/SevereCloud/vksdk/v2/api/video.go index b6e85b9a..01b7f83e 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/video.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/video.go @@ -235,6 +235,17 @@ func (vk *VK) VideoGetCommentsExtended(params Params) (response VideoGetComments return } +// VideoLiveGetCategoriesResponse struct. +type VideoLiveGetCategoriesResponse []object.VideoLiveCategory + +// VideoLiveGetCategories method. +// +// https://vk.com/dev/video.liveGetCategories +func (vk *VK) VideoLiveGetCategories(params Params) (response VideoLiveGetCategoriesResponse, err error) { + err = vk.RequestUnmarshal("video.liveGetCategories", &response, params) + return +} + // VideoRemoveFromAlbum allows you to remove the video from the album. // // https://vk.com/dev/video.removeFromAlbum @@ -336,3 +347,27 @@ func (vk *VK) VideoSearchExtended(params Params) (response VideoSearchExtendedRe return } + +// VideoStartStreamingResponse struct. +type VideoStartStreamingResponse object.VideoLive + +// VideoStartStreaming method. +// +// https://vk.com/dev/video.startStreaming +func (vk *VK) VideoStartStreaming(params Params) (response VideoStartStreamingResponse, err error) { + err = vk.RequestUnmarshal("video.startStreaming", &response, params) + return +} + +// VideoStopStreamingResponse struct. +type VideoStopStreamingResponse struct { + UniqueViewers int `json:"unique_viewers"` +} + +// VideoStopStreaming method. +// +// https://vk.com/dev/video.stopStreaming +func (vk *VK) VideoStopStreaming(params Params) (response VideoStopStreamingResponse, err error) { + err = vk.RequestUnmarshal("video.stopStreaming", &response, params) + return +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/doc.go b/vendor/github.com/SevereCloud/vksdk/v2/doc.go index 9d70254e..3e3c12a1 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.13.1" + Version = "2.14.0" API = "5.131" ) diff --git a/vendor/github.com/SevereCloud/vksdk/v2/events/context.go b/vendor/github.com/SevereCloud/vksdk/v2/events/context.go index 91264cc7..3c9e69f9 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/events/context.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/events/context.go @@ -15,3 +15,8 @@ func GroupIDFromContext(ctx context.Context) int { func EventIDFromContext(ctx context.Context) string { return ctx.Value(internal.EventIDKey).(string) } + +// VersionFromContext returns the version from context. +func VersionFromContext(ctx context.Context) string { + return ctx.Value(internal.EventVersionKey).(string) +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/events/events.go b/vendor/github.com/SevereCloud/vksdk/v2/events/events.go index 3f907d48..2bda613a 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/events/events.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/events/events.go @@ -81,6 +81,7 @@ type GroupEvent struct { Object json.RawMessage `json:"object"` GroupID int `json:"group_id"` EventID string `json:"event_id"` + V string `json:"v"` Secret string `json:"secret"` } @@ -158,6 +159,7 @@ func NewFuncList() *FuncList { func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:gocyclo ctx = context.WithValue(ctx, internal.GroupIDKey, e.GroupID) ctx = context.WithValue(ctx, internal.EventIDKey, e.EventID) + ctx = context.WithValue(ctx, internal.EventVersionKey, e.V) if sliceFunc, ok := fl.special[e.Type]; ok { for _, f := range sliceFunc { diff --git a/vendor/github.com/SevereCloud/vksdk/v2/internal/transport.go b/vendor/github.com/SevereCloud/vksdk/v2/internal/transport.go index 6611b496..595b253e 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/internal/transport.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/internal/transport.go @@ -28,6 +28,7 @@ const ( CallbackRetryCounterKey CallbackRetryAfterKey CallbackRemove + EventVersionKey ) // ContextClient return *http.Client. diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/account.go b/vendor/github.com/SevereCloud/vksdk/v2/object/account.go index ca04dce1..7806a472 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/account.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/account.go @@ -84,7 +84,6 @@ type AccountAccountCounters struct { // AccountInfo struct. type AccountInfo struct { - // Country code. Country string `json:"country"` diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go b/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go index 2bf69096..e06bf51e 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/messages.go @@ -409,7 +409,6 @@ type MessageContentSource struct { Type string `json:"type"` MessageContentSourceMessage // type message MessageContentSourceURL // type url - } // NewMessageContentSourceMessage ... diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/users.go b/vendor/github.com/SevereCloud/vksdk/v2/object/users.go index 7bf93b40..91ef92be 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/users.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/users.go @@ -24,110 +24,113 @@ const ( // UsersUser struct. type UsersUser struct { - ID int `json:"id"` - FirstName string `json:"first_name"` - LastName string `json:"last_name"` - FirstNameNom string `json:"first_name_nom"` - FirstNameGen string `json:"first_name_gen"` - FirstNameDat string `json:"first_name_dat"` - FirstNameAcc string `json:"first_name_acc"` - FirstNameIns string `json:"first_name_ins"` - FirstNameAbl string `json:"first_name_abl"` - LastNameNom string `json:"last_name_nom"` - LastNameGen string `json:"last_name_gen"` - LastNameDat string `json:"last_name_dat"` - LastNameAcc string `json:"last_name_acc"` - LastNameIns string `json:"last_name_ins"` - LastNameAbl string `json:"last_name_abl"` - MaidenName string `json:"maiden_name"` - Sex int `json:"sex"` - Nickname string `json:"nickname"` - Domain string `json:"domain"` - ScreenName string `json:"screen_name"` - Bdate string `json:"bdate"` - City BaseObject `json:"city"` - Country BaseObject `json:"country"` - Photo50 string `json:"photo_50"` - Photo100 string `json:"photo_100"` - Photo200 string `json:"photo_200"` - PhotoMax string `json:"photo_max"` - Photo200Orig string `json:"photo_200_orig"` - Photo400Orig string `json:"photo_400_orig"` - PhotoMaxOrig string `json:"photo_max_orig"` - PhotoID string `json:"photo_id"` - FriendStatus int `json:"friend_status"` // see FriendStatus const - OnlineApp int `json:"online_app"` - Online BaseBoolInt `json:"online"` - OnlineMobile BaseBoolInt `json:"online_mobile"` - HasPhoto BaseBoolInt `json:"has_photo"` - HasMobile BaseBoolInt `json:"has_mobile"` - IsClosed BaseBoolInt `json:"is_closed"` - IsFriend BaseBoolInt `json:"is_friend"` - IsFavorite BaseBoolInt `json:"is_favorite"` - IsHiddenFromFeed BaseBoolInt `json:"is_hidden_from_feed"` - CanAccessClosed BaseBoolInt `json:"can_access_closed"` - CanBeInvitedGroup BaseBoolInt `json:"can_be_invited_group"` - CanPost BaseBoolInt `json:"can_post"` - CanSeeAllPosts BaseBoolInt `json:"can_see_all_posts"` - CanSeeAudio BaseBoolInt `json:"can_see_audio"` - CanWritePrivateMessage BaseBoolInt `json:"can_write_private_message"` - CanSendFriendRequest BaseBoolInt `json:"can_send_friend_request"` - CanCallFromGroup BaseBoolInt `json:"can_call_from_group"` - Verified BaseBoolInt `json:"verified"` - Trending BaseBoolInt `json:"trending"` - Blacklisted BaseBoolInt `json:"blacklisted"` - BlacklistedByMe BaseBoolInt `json:"blacklisted_by_me"` - Facebook string `json:"facebook"` - FacebookName string `json:"facebook_name"` - Twitter string `json:"twitter"` - Instagram string `json:"instagram"` - Site string `json:"site"` - Status string `json:"status"` - StatusAudio AudioAudio `json:"status_audio"` - LastSeen UsersLastSeen `json:"last_seen"` - CropPhoto UsersCropPhoto `json:"crop_photo"` - FollowersCount int `json:"followers_count"` - CommonCount int `json:"common_count"` - Occupation UsersOccupation `json:"occupation"` - Career []UsersCareer `json:"career"` - Military []UsersMilitary `json:"military"` - University int `json:"university"` - UniversityName string `json:"university_name"` - Faculty int `json:"faculty"` - FacultyName string `json:"faculty_name"` - Graduation int `json:"graduation"` - EducationForm string `json:"education_form"` - EducationStatus string `json:"education_status"` - HomeTown string `json:"home_town"` - Relation int `json:"relation"` - Personal UsersPersonal `json:"personal"` - Interests string `json:"interests"` - Music string `json:"music"` - Activities string `json:"activities"` - Movies string `json:"movies"` - Tv string `json:"tv"` - Books string `json:"books"` - Games string `json:"games"` - Universities []UsersUniversity `json:"universities"` - Schools []UsersSchool `json:"schools"` - About string `json:"about"` - Relatives []UsersRelative `json:"relatives"` - Quotes string `json:"quotes"` - Lists []int `json:"lists"` - Deactivated string `json:"deactivated"` - WallDefault string `json:"wall_default"` - Timezone int `json:"timezone"` - Exports UsersExports `json:"exports"` - Counters UsersUserCounters `json:"counters"` - MobilePhone string `json:"mobile_phone"` - HomePhone string `json:"home_phone"` - FoundWith int `json:"found_with"` // TODO: check it - OnlineInfo UsersOnlineInfo `json:"online_info"` - Mutual FriendsRequestsMutual `json:"mutual"` - TrackCode string `json:"track_code"` - RelationPartner UsersUserMin `json:"relation_partner"` - Type string `json:"type"` - Skype string `json:"skype"` + ID int `json:"id"` + FirstName string `json:"first_name"` + LastName string `json:"last_name"` + FirstNameNom string `json:"first_name_nom"` + FirstNameGen string `json:"first_name_gen"` + FirstNameDat string `json:"first_name_dat"` + FirstNameAcc string `json:"first_name_acc"` + FirstNameIns string `json:"first_name_ins"` + FirstNameAbl string `json:"first_name_abl"` + LastNameNom string `json:"last_name_nom"` + LastNameGen string `json:"last_name_gen"` + LastNameDat string `json:"last_name_dat"` + LastNameAcc string `json:"last_name_acc"` + LastNameIns string `json:"last_name_ins"` + LastNameAbl string `json:"last_name_abl"` + MaidenName string `json:"maiden_name"` + Sex int `json:"sex"` + Nickname string `json:"nickname"` + Domain string `json:"domain"` + ScreenName string `json:"screen_name"` + Bdate string `json:"bdate"` + City BaseObject `json:"city"` + Country BaseObject `json:"country"` + Photo50 string `json:"photo_50"` + Photo100 string `json:"photo_100"` + Photo200 string `json:"photo_200"` + PhotoMax string `json:"photo_max"` + Photo200Orig string `json:"photo_200_orig"` + Photo400Orig string `json:"photo_400_orig"` + PhotoMaxOrig string `json:"photo_max_orig"` + PhotoID string `json:"photo_id"` + FriendStatus int `json:"friend_status"` // see FriendStatus const + OnlineApp int `json:"online_app"` + Online BaseBoolInt `json:"online"` + OnlineMobile BaseBoolInt `json:"online_mobile"` + HasPhoto BaseBoolInt `json:"has_photo"` + HasMobile BaseBoolInt `json:"has_mobile"` + IsClosed BaseBoolInt `json:"is_closed"` + IsFriend BaseBoolInt `json:"is_friend"` + IsFavorite BaseBoolInt `json:"is_favorite"` + IsHiddenFromFeed BaseBoolInt `json:"is_hidden_from_feed"` + CanAccessClosed BaseBoolInt `json:"can_access_closed"` + CanBeInvitedGroup BaseBoolInt `json:"can_be_invited_group"` + CanPost BaseBoolInt `json:"can_post"` + CanSeeAllPosts BaseBoolInt `json:"can_see_all_posts"` + CanSeeAudio BaseBoolInt `json:"can_see_audio"` + CanWritePrivateMessage BaseBoolInt `json:"can_write_private_message"` + CanSendFriendRequest BaseBoolInt `json:"can_send_friend_request"` + CanCallFromGroup BaseBoolInt `json:"can_call_from_group"` + Verified BaseBoolInt `json:"verified"` + Trending BaseBoolInt `json:"trending"` + Blacklisted BaseBoolInt `json:"blacklisted"` + BlacklistedByMe BaseBoolInt `json:"blacklisted_by_me"` + // Deprecated: Facebook и Instagram запрещены в России, Meta признана экстремистской организацией... + Facebook string `json:"facebook"` + // Deprecated: Facebook и Instagram запрещены в России, Meta признана экстремистской организацией... + FacebookName string `json:"facebook_name"` + // Deprecated: Facebook и Instagram запрещены в России, Meta признана экстремистской организацией... + Instagram string `json:"instagram"` + Twitter string `json:"twitter"` + Site string `json:"site"` + Status string `json:"status"` + StatusAudio AudioAudio `json:"status_audio"` + LastSeen UsersLastSeen `json:"last_seen"` + CropPhoto UsersCropPhoto `json:"crop_photo"` + FollowersCount int `json:"followers_count"` + CommonCount int `json:"common_count"` + Occupation UsersOccupation `json:"occupation"` + Career []UsersCareer `json:"career"` + Military []UsersMilitary `json:"military"` + University int `json:"university"` + UniversityName string `json:"university_name"` + Faculty int `json:"faculty"` + FacultyName string `json:"faculty_name"` + Graduation int `json:"graduation"` + EducationForm string `json:"education_form"` + EducationStatus string `json:"education_status"` + HomeTown string `json:"home_town"` + Relation int `json:"relation"` + Personal UsersPersonal `json:"personal"` + Interests string `json:"interests"` + Music string `json:"music"` + Activities string `json:"activities"` + Movies string `json:"movies"` + Tv string `json:"tv"` + Books string `json:"books"` + Games string `json:"games"` + Universities []UsersUniversity `json:"universities"` + Schools []UsersSchool `json:"schools"` + About string `json:"about"` + Relatives []UsersRelative `json:"relatives"` + Quotes string `json:"quotes"` + Lists []int `json:"lists"` + Deactivated string `json:"deactivated"` + WallDefault string `json:"wall_default"` + Timezone int `json:"timezone"` + Exports UsersExports `json:"exports"` + Counters UsersUserCounters `json:"counters"` + MobilePhone string `json:"mobile_phone"` + HomePhone string `json:"home_phone"` + FoundWith int `json:"found_with"` // TODO: check it + OnlineInfo UsersOnlineInfo `json:"online_info"` + Mutual FriendsRequestsMutual `json:"mutual"` + TrackCode string `json:"track_code"` + RelationPartner UsersUserMin `json:"relation_partner"` + Type string `json:"type"` + Skype string `json:"skype"` } // ToMention return mention. diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/video.go b/vendor/github.com/SevereCloud/vksdk/v2/object/video.go index 6c48224b..d86143a9 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/video.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/video.go @@ -297,3 +297,27 @@ type VideoVideoImage struct { BaseImage WithPadding BaseBoolInt `json:"with_padding"` } + +// VideoLive struct. +type VideoLive struct { + OwnerID int `json:"owner_id"` + VideoID int `json:"video_id"` + Name string `json:"name"` + Description string `json:"description"` + AccessKey string `json:"access_key"` + Stream VideoLiveStream `json:"stream"` +} + +// VideoLiveStream struct. +type VideoLiveStream struct { + URL string `json:"url"` + Key string `json:"key"` + OKMPURL string `json:"okmp_url"` +} + +// VideoLiveCategory struct. +type VideoLiveCategory struct { + ID int `json:"id"` + Label string `json:"label"` + Sublist []VideoLiveCategory `json:"sublist,omitempty"` +} |