mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 12:19:23 +00:00
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
This commit is contained in:
142
vendor/github.com/SevereCloud/vksdk/v2/object/account.go
generated
vendored
Normal file
142
vendor/github.com/SevereCloud/vksdk/v2/object/account.go
generated
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// AccountNameRequest struct.
|
||||
type AccountNameRequest struct {
|
||||
FirstName string `json:"first_name"` // First name in request
|
||||
ID int `json:"id"` // Request ID needed to cancel the request
|
||||
LastName string `json:"last_name"` // Last name in request
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// AccountPushConversations struct.
|
||||
type AccountPushConversations struct {
|
||||
Count int `json:"count"` // Items count
|
||||
Items []*AccountPushConversationsItem `json:"items"`
|
||||
}
|
||||
|
||||
// AccountPushConversationsItem struct.
|
||||
type AccountPushConversationsItem struct {
|
||||
DisabledUntil int `json:"disabled_until"` // Time until that notifications are disabled in seconds
|
||||
PeerID int `json:"peer_id"` // Peer ID
|
||||
Sound int `json:"sound"` // Information whether the sound are enabled
|
||||
}
|
||||
|
||||
// AccountPushParams struct.
|
||||
type AccountPushParams struct {
|
||||
AppRequest []string `json:"app_request"`
|
||||
Birthday []string `json:"birthday"`
|
||||
Chat []string `json:"chat"`
|
||||
Comment []string `json:"comment"`
|
||||
EventSoon []string `json:"event_soon"`
|
||||
Friend []string `json:"friend"`
|
||||
FriendAccepted []string `json:"friend_accepted"`
|
||||
FriendFound []string `json:"friend_found"`
|
||||
GroupAccepted []string `json:"group_accepted"`
|
||||
GroupInvite []string `json:"group_invite"`
|
||||
Like []string `json:"like"`
|
||||
Mention []string `json:"mention"`
|
||||
Msg []string `json:"msg"`
|
||||
NewPost []string `json:"new_post"`
|
||||
PhotosTag []string `json:"photos_tag"`
|
||||
Reply []string `json:"reply"`
|
||||
Repost []string `json:"repost"`
|
||||
SdkOpen []string `json:"sdk_open"`
|
||||
WallPost []string `json:"wall_post"`
|
||||
WallPublish []string `json:"wall_publish"`
|
||||
}
|
||||
|
||||
// AccountOffer struct.
|
||||
type AccountOffer struct {
|
||||
Description string `json:"description"` // Offer description
|
||||
ID int `json:"id"` // Offer ID
|
||||
Img string `json:"img"` // URL of the preview image
|
||||
Instruction string `json:"instruction"` // Instruction how to process the offer
|
||||
InstructionHTML string `json:"instruction_html"` // Instruction how to process the offer (HTML format)
|
||||
Price int `json:"price"` // Offer price
|
||||
ShortDescription string `json:"short_description"` // Offer short description
|
||||
Tag string `json:"tag"` // Offer tag
|
||||
Title string `json:"title"` // Offer title
|
||||
}
|
||||
|
||||
// AccountAccountCounters struct.
|
||||
type AccountAccountCounters struct {
|
||||
AppRequests int `json:"app_requests"` // New app requests number
|
||||
Events int `json:"events"` // New events number
|
||||
Friends int `json:"friends"` // New friends requests number
|
||||
FriendsRecommendations int `json:"friends_recommendations"` // New friends recommendations number
|
||||
FriendsSuggestions int `json:"friends_suggestions"` // New friends suggestions number
|
||||
Gifts int `json:"gifts"` // New gifts number
|
||||
Groups int `json:"groups"` // New groups number
|
||||
Messages int `json:"messages"` // New messages number
|
||||
Notifications int `json:"notifications"` // New notifications number
|
||||
Photos int `json:"photos"` // New photo tags number
|
||||
SDK int `json:"sdk"` // New SDK number
|
||||
MenuDiscoverBadge int `json:"menu_discover_badge"` // New menu discover badge number
|
||||
MenuClipsBadge int `json:"menu_clips_badge"` // New menu clips badge number
|
||||
Videos int `json:"videos"` // New video tags number
|
||||
Faves int `json:"faves"` // New faves number
|
||||
}
|
||||
|
||||
// AccountInfo struct.
|
||||
type AccountInfo struct {
|
||||
|
||||
// Country code.
|
||||
Country string `json:"country"`
|
||||
|
||||
// Language ID.
|
||||
Lang int `json:"lang"`
|
||||
|
||||
// Information whether HTTPS-only is enabled.
|
||||
HTTPSRequired BaseBoolInt `json:"https_required"`
|
||||
|
||||
// Information whether user has been processed intro.
|
||||
Intro BaseBoolInt `json:"intro"`
|
||||
|
||||
// Information whether wall comments should be hidden.
|
||||
NoWallReplies BaseBoolInt `json:"no_wall_replies"`
|
||||
|
||||
// Information whether only owners posts should be shown.
|
||||
OwnPostsDefault BaseBoolInt `json:"own_posts_default"`
|
||||
|
||||
// Two factor authentication is enabled.
|
||||
TwoFactorRequired BaseBoolInt `json:"2fa_required"`
|
||||
EuUser BaseBoolInt `json:"eu_user"`
|
||||
CommunityComments BaseBoolInt `json:"community_comments"`
|
||||
IsLiveStreamingEnabled BaseBoolInt `json:"is_live_streaming_enabled"`
|
||||
IsNewLiveStreamingEnabled BaseBoolInt `json:"is_new_live_streaming_enabled"`
|
||||
LinkRedirects map[string]string `json:"link_redirects"`
|
||||
}
|
||||
|
||||
// AccountPushSettings struct.
|
||||
type AccountPushSettings struct {
|
||||
Conversations AccountPushConversations `json:"conversations"`
|
||||
|
||||
// Information whether notifications are disabled.
|
||||
Disabled BaseBoolInt `json:"disabled"`
|
||||
|
||||
// Time until that notifications are disabled in Unixtime.
|
||||
DisabledUntil int `json:"disabled_until"`
|
||||
Settings AccountPushParams `json:"settings"`
|
||||
}
|
||||
|
||||
// AccountUserSettings struct.
|
||||
type AccountUserSettings struct {
|
||||
Bdate string `json:"bdate"` // User's date of birth
|
||||
BdateVisibility int `json:"bdate_visibility"` // Information whether user's birthdate are hidden
|
||||
City BaseObject `json:"city"`
|
||||
Country BaseCountry `json:"country"`
|
||||
FirstName string `json:"first_name"` // User first name
|
||||
HomeTown string `json:"home_town"` // User's hometown
|
||||
LastName string `json:"last_name"` // User last name
|
||||
MaidenName string `json:"maiden_name"` // User maiden name
|
||||
NameRequest AccountNameRequest `json:"name_request"`
|
||||
Phone string `json:"phone"` // User phone number with some hidden digits
|
||||
Relation int `json:"relation"` // User relationship status
|
||||
RelationPartner UsersUserMin `json:"relation_partner"`
|
||||
RelationPending BaseBoolInt `json:"relation_pending"` // Information whether relation status is pending
|
||||
RelationRequests []UsersUserMin `json:"relation_requests"`
|
||||
ScreenName string `json:"screen_name"` // Domain name of the user's page
|
||||
Sex int `json:"sex"` // User sex
|
||||
Status string `json:"status"` // User status
|
||||
ID int `json:"id"` // TODO: Check it https://vk.com/bug230405 (always return 0)
|
||||
}
|
321
vendor/github.com/SevereCloud/vksdk/v2/object/ads.go
generated
vendored
Normal file
321
vendor/github.com/SevereCloud/vksdk/v2/object/ads.go
generated
vendored
Normal file
@ -0,0 +1,321 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// AdsAccesses struct.
|
||||
type AdsAccesses struct {
|
||||
ClientID string `json:"client_id"`
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
// AdsAccount struct.
|
||||
type AdsAccount struct {
|
||||
AccessRole string `json:"access_role"`
|
||||
AccountID int `json:"account_id"` // Account ID
|
||||
AccountName string `json:"account_name"`
|
||||
AccountStatus BaseBoolInt `json:"account_status"` // Information whether account is active
|
||||
CanViewBudget BaseBoolInt `json:"can_view_budget"`
|
||||
AccountType string `json:"account_type"`
|
||||
}
|
||||
|
||||
// AdsAdLayout struct.
|
||||
type AdsAdLayout struct {
|
||||
AdFormat interface{} `json:"ad_format"` // Ad format
|
||||
Description string `json:"description"` // Ad description
|
||||
ImageSrc string `json:"image_src"` // Image URL
|
||||
ImageSrc2x string `json:"image_src_2x"` // URL of the preview image in double size
|
||||
LinkDomain string `json:"link_domain"` // Domain of advertised object
|
||||
LinkURL string `json:"link_url"` // URL of advertised object
|
||||
PreviewLink string `json:"preview_link"` // preview an ad as it is shown on the website
|
||||
Title string `json:"title"` // Ad title
|
||||
Video BaseBoolInt `json:"video"` // Information whether the ad is a video
|
||||
ID string `json:"id"`
|
||||
CampaignID int `json:"campaign_id"`
|
||||
GoalType int `json:"goal_type"`
|
||||
CostType int `json:"cost_type"`
|
||||
AgeRestriction string `json:"age_restriction"`
|
||||
LinkType string `json:"link_type"`
|
||||
}
|
||||
|
||||
// AdsCampaign struct.
|
||||
type AdsCampaign struct {
|
||||
AllLimit string `json:"all_limit"` // Campaign's total limit, rubles
|
||||
DayLimit string `json:"day_limit"` // Campaign's day limit, rubles
|
||||
ID int `json:"id"` // Campaign ID
|
||||
Name string `json:"name"` // Campaign title
|
||||
StartTime int `json:"start_time"` // Campaign start time, as Unixtime
|
||||
Status int `json:"status"`
|
||||
StopTime int `json:"stop_time"` // Campaign stop time, as Unixtime
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// AdsCategory struct.
|
||||
type AdsCategory struct {
|
||||
ID int `json:"id"` // Category ID
|
||||
Name string `json:"name"` // Category name
|
||||
Subcategories []BaseObjectWithName `json:"subcategories"`
|
||||
}
|
||||
|
||||
// AdsClient struct.
|
||||
type AdsClient struct {
|
||||
AllLimit string `json:"all_limit"` // Client's total limit, rubles
|
||||
DayLimit string `json:"day_limit"` // Client's day limit, rubles
|
||||
ID int `json:"id"` // Client ID
|
||||
Name string `json:"name"` // Client name
|
||||
}
|
||||
|
||||
// AdsCriteria struct.
|
||||
type AdsCriteria struct {
|
||||
AgeFrom int `json:"age_from"` // Age from
|
||||
AgeTo int `json:"age_to"` // Age to
|
||||
Apps string `json:"apps"` // Apps IDs
|
||||
AppsNot string `json:"apps_not"` // Apps IDs to except
|
||||
Birthday int `json:"birthday"` // Days to birthday
|
||||
Cities string `json:"cities"` // Cities IDs
|
||||
CitiesNot string `json:"cities_not"` // Cities IDs to except
|
||||
Country int `json:"country"` // Country ID
|
||||
Districts string `json:"districts"` // Districts IDs
|
||||
Groups string `json:"groups"` // Communities IDs
|
||||
InterestCategories string `json:"interest_categories"` // Interests categories IDs
|
||||
Interests string `json:"interests"` // Interests
|
||||
|
||||
// Information whether the user has proceeded VK payments before.
|
||||
Paying BaseBoolInt `json:"paying"`
|
||||
Positions string `json:"positions"` // Positions IDs
|
||||
Religions string `json:"religions"` // Religions IDs
|
||||
RetargetingGroups string `json:"retargeting_groups"` // Retargeting groups IDs
|
||||
RetargetingGroupsNot string `json:"retargeting_groups_not"` // Retargeting groups IDs to except
|
||||
SchoolFrom int `json:"school_from"` // School graduation year from
|
||||
SchoolTo int `json:"school_to"` // School graduation year to
|
||||
Schools string `json:"schools"` // Schools IDs
|
||||
Sex int `json:"sex"`
|
||||
Stations string `json:"stations"` // Stations IDs
|
||||
Statuses string `json:"statuses"` // Relationship statuses
|
||||
Streets string `json:"streets"` // Streets IDs
|
||||
Travellers int `json:"travellers"` // Travellers only
|
||||
UniFrom int `json:"uni_from"` // University graduation year from
|
||||
UniTo int `json:"uni_to"` // University graduation year to
|
||||
UserBrowsers string `json:"user_browsers"` // Browsers
|
||||
UserDevices string `json:"user_devices"` // Devices
|
||||
UserOs string `json:"user_os"` // Operating systems
|
||||
}
|
||||
|
||||
// AdsDemoStats struct.
|
||||
type AdsDemoStats struct {
|
||||
ID int `json:"id"` // Object ID
|
||||
Stats AdsDemostatsFormat `json:"stats"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// AdsDemostatsFormat struct.
|
||||
type AdsDemostatsFormat struct {
|
||||
Age []AdsStatsAge `json:"age"`
|
||||
Cities []AdsStatsCities `json:"cities"`
|
||||
Day string `json:"day"` // Day as YYYY-MM-DD
|
||||
Month string `json:"month"` // Month as YYYY-MM
|
||||
Overall int `json:"overall"` // 1 if period=overall
|
||||
Sex []AdsStatsSex `json:"sex"`
|
||||
SexAge []AdsStatsSexAge `json:"sex_age"`
|
||||
}
|
||||
|
||||
// AdsFloodStats struct.
|
||||
type AdsFloodStats struct {
|
||||
Left int `json:"left"` // Requests left
|
||||
Refresh int `json:"refresh"` // Time to refresh in seconds
|
||||
}
|
||||
|
||||
// AdsLinkStatus link status.
|
||||
type AdsLinkStatus string
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
// allowed to use in ads.
|
||||
AdsLinkAllowed AdsLinkStatus = "allowed"
|
||||
|
||||
// prohibited to use for this type of the object.
|
||||
AdsLinkDisallowed AdsLinkStatus = "disallowed"
|
||||
|
||||
// checking, wait please.
|
||||
AdsLinkInProgress AdsLinkStatus = "in_progress"
|
||||
)
|
||||
|
||||
// AdsParagraphs struct.
|
||||
type AdsParagraphs struct {
|
||||
Paragraph string `json:"paragraph"` // Rules paragraph
|
||||
}
|
||||
|
||||
// AdsRejectReason struct.
|
||||
type AdsRejectReason struct {
|
||||
Comment string `json:"comment"` // Comment text
|
||||
Rules []AdsRules `json:"rules"`
|
||||
}
|
||||
|
||||
// AdsRules struct.
|
||||
type AdsRules struct {
|
||||
Paragraphs []AdsParagraphs `json:"paragraphs"`
|
||||
Title string `json:"title"` // Comment
|
||||
}
|
||||
|
||||
// AdsStats struct.
|
||||
type AdsStats struct {
|
||||
ID int `json:"id"` // Object ID
|
||||
Stats AdsStatsFormat `json:"stats"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// AdsStatsAge struct.
|
||||
type AdsStatsAge struct {
|
||||
ClicksRate float64 `json:"clicks_rate"` // Clicks rate
|
||||
ImpressionsRate float64 `json:"impressions_rate"` // Impressions rate
|
||||
Value string `json:"value"` // Age interval
|
||||
}
|
||||
|
||||
// AdsStatsCities struct.
|
||||
type AdsStatsCities struct {
|
||||
ClicksRate float64 `json:"clicks_rate"` // Clicks rate
|
||||
ImpressionsRate float64 `json:"impressions_rate"` // Impressions rate
|
||||
Name string `json:"name"` // City name
|
||||
Value int `json:"value"` // City ID
|
||||
}
|
||||
|
||||
// AdsStatsFormat struct.
|
||||
type AdsStatsFormat struct {
|
||||
Clicks int `json:"clicks"` // Clicks number
|
||||
Day string `json:"day"` // Day as YYYY-MM-DD
|
||||
Impressions int `json:"impressions"` // Impressions number
|
||||
JoinRate int `json:"join_rate"` // Events number
|
||||
Month string `json:"month"` // Month as YYYY-MM
|
||||
Overall int `json:"overall"` // 1 if period=overall
|
||||
Reach int `json:"reach"` // Reach
|
||||
Spent int `json:"spent"` // Spent funds
|
||||
VideoClicksSite int `json:"video_clicks_site"` // Click-thoughts to the advertised site
|
||||
VideoViews int `json:"video_views"` // Video views number
|
||||
VideoViewsFull int `json:"video_views_full"` // Video views (full video)
|
||||
VideoViewsHalf int `json:"video_views_half"` // Video views (half of video)
|
||||
}
|
||||
|
||||
// AdsStatsSex struct.
|
||||
type AdsStatsSex struct {
|
||||
ClicksRate float64 `json:"clicks_rate"` // Clicks rate
|
||||
ImpressionsRate float64 `json:"impressions_rate"` // Impressions rate
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// AdsStatsSexAge struct.
|
||||
type AdsStatsSexAge struct {
|
||||
ClicksRate float64 `json:"clicks_rate"` // Clicks rate
|
||||
ImpressionsRate float64 `json:"impressions_rate"` // Impressions rate
|
||||
Value string `json:"value"` // Sex and age interval
|
||||
}
|
||||
|
||||
// AdsTargSettings struct.
|
||||
type AdsTargSettings struct {
|
||||
}
|
||||
|
||||
// AdsTargStats struct.
|
||||
type AdsTargStats struct {
|
||||
AudienceCount int `json:"audience_count"` // Audience
|
||||
RecommendedCpc float64 `json:"recommended_cpc"` // Recommended CPC value
|
||||
RecommendedCpm float64 `json:"recommended_cpm"` // Recommended CPM value
|
||||
}
|
||||
|
||||
// AdsTargSuggestions struct.
|
||||
type AdsTargSuggestions struct {
|
||||
ID int `json:"id"` // Object ID
|
||||
Name string `json:"name"` // Object name
|
||||
}
|
||||
|
||||
// AdsTargSuggestionsCities struct.
|
||||
type AdsTargSuggestionsCities struct {
|
||||
ID int `json:"id"` // Object ID
|
||||
Name string `json:"name"` // Object name
|
||||
Parent string `json:"parent"` // Parent object
|
||||
}
|
||||
|
||||
// AdsTargSuggestionsRegions struct.
|
||||
type AdsTargSuggestionsRegions struct {
|
||||
ID int `json:"id"` // Object ID
|
||||
Name string `json:"name"` // Object name
|
||||
Type string `json:"type"` // Object type
|
||||
}
|
||||
|
||||
// AdsTargSuggestionsSchools struct.
|
||||
type AdsTargSuggestionsSchools struct {
|
||||
Desc string `json:"desc"` // Full school title
|
||||
ID int `json:"id"` // School ID
|
||||
Name string `json:"name"` // School title
|
||||
Parent string `json:"parent"` // City name
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// AdsTargetGroup struct.
|
||||
type AdsTargetGroup struct {
|
||||
AudienceCount int `json:"audience_count"` // Audience
|
||||
ID int `json:"id"` // Group ID
|
||||
Lifetime int `json:"lifetime"` // Number of days for user to be in group
|
||||
Name string `json:"name"` // Group name
|
||||
LastUpdated int `json:"last_updated"`
|
||||
IsAudience BaseBoolInt `json:"is_audience"`
|
||||
IsShared BaseBoolInt `json:"is_shared"`
|
||||
FileSource BaseBoolInt `json:"file_source"`
|
||||
APISource BaseBoolInt `json:"api_source"`
|
||||
LookalikeSource BaseBoolInt `json:"lookalike_source"`
|
||||
Domain string `json:"domain,omitempty"` // Site domain
|
||||
Pixel string `json:"pixel,omitempty"` // Pixel code
|
||||
}
|
||||
|
||||
// AdsUsers struct.
|
||||
type AdsUsers struct {
|
||||
Accesses []AdsAccesses `json:"accesses"`
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// AdsAd struct.
|
||||
type AdsAd struct {
|
||||
Approved string `json:"approved"`
|
||||
AllLimit string `json:"all_limit"`
|
||||
Category1ID string `json:"category1_id"`
|
||||
Category2ID string `json:"category2_id"`
|
||||
Cpm string `json:"cpm"`
|
||||
AdFormat int `json:"ad_format"` // Ad format
|
||||
AdPlatform interface{} `json:"ad_platform"` // Ad platform
|
||||
CampaignID int `json:"campaign_id"` // Campaign ID
|
||||
CostType int `json:"cost_type"`
|
||||
Cpc int `json:"cpc"` // Cost of a click, kopecks
|
||||
DisclaimerMedical BaseBoolInt `json:"disclaimer_medical"` // Information whether disclaimer is enabled
|
||||
DisclaimerSpecialist BaseBoolInt `json:"disclaimer_specialist"` // Information whether disclaimer is enabled
|
||||
DisclaimerSupplements BaseBoolInt `json:"disclaimer_supplements"` // Information whether disclaimer is enabled
|
||||
Video BaseBoolInt `json:"video"` // Information whether the ad is a video
|
||||
ImpressionsLimited BaseBoolInt `json:"impressions_limited"` // Information whether impressions are limited
|
||||
Autobidding BaseBoolInt `json:"autobidding"`
|
||||
ImpressionsLimit int `json:"impressions_limit"` // Impressions limit
|
||||
ID string `json:"id"` // Ad ID
|
||||
Name string `json:"name"` // Ad title
|
||||
Status int `json:"status"`
|
||||
CreateTime string `json:"create_time"`
|
||||
UpdateTime string `json:"update_time"`
|
||||
GoalType int `json:"goal_type"`
|
||||
DayLimit string `json:"day_limit"`
|
||||
StartTime string `json:"start_time"`
|
||||
StopTime string `json:"stop_time"`
|
||||
AgeRestriction string `json:"age_restriction"`
|
||||
EventsRetargetingGroups interface{} `json:"events_retargeting_groups"`
|
||||
ImpressionsLimitPeriod string `json:"impressions_limit_period"`
|
||||
}
|
||||
|
||||
// AdsPromotedPostReach struct.
|
||||
type AdsPromotedPostReach struct {
|
||||
Hide int `json:"hide"` // Hides amount
|
||||
ID int `json:"id"` // Object ID from 'ids' parameter
|
||||
JoinGroup int `json:"join_group"` // Community joins
|
||||
Links int `json:"links"` // Link clicks
|
||||
ReachSubscribers int `json:"reach_subscribers"` // Subscribers reach
|
||||
ReachTotal int `json:"reach_total"` // Total reach
|
||||
Report int `json:"report"` // Reports amount
|
||||
ToGroup int `json:"to_group"` // Community clicks
|
||||
Unsubscribe int `json:"unsubscribe"` // 'Unsubscribe' events amount
|
||||
VideoViews100p int `json:"video_views_100p"` // Video views for 100 percent
|
||||
VideoViews25p int `json:"video_views_25p"` // Video views for 25 percent
|
||||
VideoViews3s int `json:"video_views_3s"` // Video views for 3 seconds
|
||||
VideoViews50p int `json:"video_views_50p"` // Video views for 50 percent
|
||||
VideoViews75p int `json:"video_views_75p"` // Video views for 75 percent
|
||||
VideoViewsStart int `json:"video_views_start"` // Video starts
|
||||
}
|
101
vendor/github.com/SevereCloud/vksdk/v2/object/apps.go
generated
vendored
Normal file
101
vendor/github.com/SevereCloud/vksdk/v2/object/apps.go
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// AppsApp type application type.
|
||||
const (
|
||||
AppTypeApp = "app"
|
||||
AppTypeGame = "game"
|
||||
AppTypeSite = "site"
|
||||
AppTypeStandalone = "standalone"
|
||||
AppTypeVkApp = "vk_app"
|
||||
AppTypeCommunityApp = "community_app"
|
||||
AppTypeHTML5Game = "html5_game"
|
||||
)
|
||||
|
||||
// AppsLeaderboardType leaderboardType type.
|
||||
const (
|
||||
AppsLeaderboardTypeNotSupported = iota
|
||||
AppsLeaderboardTypeLevels
|
||||
AppsLeaderboardTypePoints
|
||||
)
|
||||
|
||||
// AppsScreenOrientation supported screen orientation.
|
||||
type AppsScreenOrientation int
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
AppsScreenOrientationBoth AppsScreenOrientation = iota
|
||||
AppsScreenOrientationLandscape
|
||||
AppsScreenOrientationPortrait
|
||||
)
|
||||
|
||||
// AppsCatalogBanner struct.
|
||||
type AppsCatalogBanner struct {
|
||||
BackgroundColor string `json:"background_color"`
|
||||
DescriptionColor string `json:"description_color"`
|
||||
Description string `json:"description"`
|
||||
TitleColor string `json:"title_color"`
|
||||
}
|
||||
|
||||
// AppsApp struct.
|
||||
type AppsApp struct {
|
||||
AuthorOwnerID int `json:"author_owner_id"`
|
||||
AuthorURL string `json:"author_url"`
|
||||
Banner1120 string `json:"banner_1120"` // URL of the app banner with 1120 px in width
|
||||
Banner560 string `json:"banner_560"` // URL of the app banner with 560 px in width
|
||||
CatalogPosition int `json:"catalog_position"` // Catalog position
|
||||
Description string `json:"description"` // Application description
|
||||
Friends []int `json:"friends"`
|
||||
Genre string `json:"genre"` // Genre name
|
||||
GenreID int `json:"genre_id"` // Genre ID
|
||||
Icon139 string `json:"icon_139"` // URL of the app icon with 139 px in width
|
||||
Icon150 string `json:"icon_150"` // URL of the app icon with 150 px in width
|
||||
Icon278 string `json:"icon_278"` // URL of the app icon with 279 px in width
|
||||
Icon75 string `json:"icon_75"` // URL of the app icon with 75 px in width
|
||||
ID int `json:"id"` // Application ID
|
||||
International BaseBoolInt `json:"international"` // Information whether the application is multi language
|
||||
IsInCatalog BaseBoolInt `json:"is_in_catalog"` // Information whether application is in mobile catalog
|
||||
Installed BaseBoolInt `json:"installed"`
|
||||
PushEnabled BaseBoolInt `json:"push_enabled"`
|
||||
HideTabbar BaseBoolInt `json:"hide_tabbar"`
|
||||
IsNew BaseBoolInt `json:"is_new"`
|
||||
New BaseBoolInt `json:"new"`
|
||||
IsInstalled BaseBoolInt `json:"is_installed"`
|
||||
LeaderboardType int `json:"leaderboard_type"`
|
||||
MembersCount int `json:"members_count"` // Members number
|
||||
PlatformID int `json:"platform_id"` // Application ID in store
|
||||
|
||||
// Date when the application has been published in Unixtime.
|
||||
PublishedDate int `json:"published_date"`
|
||||
ScreenName string `json:"screen_name"` // Screen name
|
||||
Screenshots []PhotosPhoto `json:"screenshots"`
|
||||
Section string `json:"section"` // Application section name
|
||||
Title string `json:"title"` // Application title
|
||||
Type string `json:"type"`
|
||||
Icon16 string `json:"icon_16"`
|
||||
Icon576 string `json:"icon_576"`
|
||||
ScreenOrientation AppsScreenOrientation `json:"screen_orientation"`
|
||||
CatalogBanner AppsCatalogBanner `json:"catalog_banner"`
|
||||
|
||||
// mobile_controls_type = 0 - прозрачный элемент управления поверх области с игрой;
|
||||
// mobile_controls_type = 1 - чёрная полоска над областью с игрой;
|
||||
// mobile_controls_type = 2 - только для vk apps, без контроллов.
|
||||
MobileControlsType int `json:"mobile_controls_type"`
|
||||
|
||||
// mobile_view_support_type = 0 - игра не использует нижнюю часть экрана на iPhoneX, черная полоса есть.
|
||||
// mobile_view_support_type = 1 - игра использует нижнюю часть экрана на iPhoneX, черной полосы нет.
|
||||
MobileViewSupportType int `json:"mobile_view_support_type"`
|
||||
}
|
||||
|
||||
// AppsLeaderboard struct.
|
||||
type AppsLeaderboard struct {
|
||||
Level int `json:"level"` // Level
|
||||
Points int `json:"points"` // Points number
|
||||
Score int `json:"score"` // Score number
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// AppsScope Scope description.
|
||||
type AppsScope struct {
|
||||
Name string `json:"name"` // Scope name
|
||||
Title string `json:"title"` // Scope title
|
||||
}
|
20
vendor/github.com/SevereCloud/vksdk/v2/object/appwidgets.go
generated
vendored
Normal file
20
vendor/github.com/SevereCloud/vksdk/v2/object/appwidgets.go
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
package object
|
||||
|
||||
// AppWidgetsAppImageUploadResponse struct.
|
||||
type AppWidgetsAppImageUploadResponse struct {
|
||||
Image string `json:"image"`
|
||||
Hash string `json:"hash"`
|
||||
}
|
||||
|
||||
// AppWidgetsGroupImageUploadResponse struct.
|
||||
type AppWidgetsGroupImageUploadResponse struct {
|
||||
Image string `json:"image"`
|
||||
Hash string `json:"hash"`
|
||||
}
|
||||
|
||||
// AppWidgetsImage struct.
|
||||
type AppWidgetsImage struct {
|
||||
ID string `json:"id"`
|
||||
Type string `json:"type"`
|
||||
Images []BaseImage `json:"images"`
|
||||
}
|
67
vendor/github.com/SevereCloud/vksdk/v2/object/audio.go
generated
vendored
Normal file
67
vendor/github.com/SevereCloud/vksdk/v2/object/audio.go
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// AudioAudio struct.
|
||||
type AudioAudio struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the audio
|
||||
ID int `json:"id"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
Artist string `json:"artist"`
|
||||
Title string `json:"title"`
|
||||
Duration int `json:"duration"`
|
||||
Date int `json:"date"`
|
||||
URL string `json:"url"`
|
||||
IsHq BaseBoolInt `json:"is_hq"`
|
||||
IsExplicit BaseBoolInt `json:"is_explicit"`
|
||||
StoriesAllowed BaseBoolInt `json:"stories_allowed"`
|
||||
ShortVideosAllowed BaseBoolInt `json:"short_videos_allowed"`
|
||||
IsFocusTrack BaseBoolInt `json:"is_focus_track"`
|
||||
IsLicensed BaseBoolInt `json:"is_licensed"`
|
||||
StoriesCoverAllowed BaseBoolInt `json:"stories_cover_allowed"`
|
||||
LyricsID int `json:"lyrics_id"`
|
||||
AlbumID int `json:"album_id"`
|
||||
GenreID int `json:"genre_id"`
|
||||
TrackCode string `json:"track_code"`
|
||||
NoSearch int `json:"no_search"`
|
||||
MainArtists []AudioAudioArtist `json:"main_artists"`
|
||||
Ads AudioAds `json:"ads"`
|
||||
Subtitle string `json:"subtitle"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (audio AudioAudio) ToAttachment() string {
|
||||
return fmt.Sprintf("audio%d_%d", audio.OwnerID, audio.ID)
|
||||
}
|
||||
|
||||
// AudioAds struct.
|
||||
type AudioAds struct {
|
||||
ContentID string `json:"content_id"`
|
||||
Duration string `json:"duration"`
|
||||
AccountAgeType string `json:"account_age_type"`
|
||||
PUID1 string `json:"puid1"`
|
||||
PUID22 string `json:"puid22"`
|
||||
}
|
||||
|
||||
// AudioAudioArtist struct.
|
||||
type AudioAudioArtist struct {
|
||||
Name string `json:"name"`
|
||||
ID string `json:"id"`
|
||||
Domain string `json:"domain"`
|
||||
}
|
||||
|
||||
// AudioAudioUploadResponse struct.
|
||||
type AudioAudioUploadResponse struct {
|
||||
Audio string `json:"audio"`
|
||||
Hash string `json:"hash"`
|
||||
Redirect string `json:"redirect"`
|
||||
Server int `json:"server"`
|
||||
}
|
||||
|
||||
// AudioLyrics struct.
|
||||
type AudioLyrics struct {
|
||||
LyricsID int `json:"lyrics_id"`
|
||||
Text string `json:"text"`
|
||||
}
|
40
vendor/github.com/SevereCloud/vksdk/v2/object/board.go
generated
vendored
Normal file
40
vendor/github.com/SevereCloud/vksdk/v2/object/board.go
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// BoardTopic struct.
|
||||
type BoardTopic struct {
|
||||
Comments int `json:"comments"` // Comments number
|
||||
Created int `json:"created"` // Date when the topic has been created in Unixtime
|
||||
CreatedBy int `json:"created_by"` // Creator ID
|
||||
ID int `json:"id"` // Topic ID
|
||||
IsClosed BaseBoolInt `json:"is_closed"` // Information whether the topic is closed
|
||||
IsFixed BaseBoolInt `json:"is_fixed"` // Information whether the topic is fixed
|
||||
Title string `json:"title"` // Topic title
|
||||
Updated int `json:"updated"` // Date when the topic has been updated in Unixtime
|
||||
UpdatedBy int `json:"updated_by"` // ID of user who updated the topic
|
||||
}
|
||||
|
||||
// BoardTopicComment struct.
|
||||
type BoardTopicComment struct {
|
||||
Attachments []WallCommentAttachment `json:"attachments"`
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
FromID int `json:"from_id"` // Author ID
|
||||
ID int `json:"id"` // Comment ID
|
||||
// RealOffset int `json:"real_offset"` // Real position of the comment
|
||||
Text string `json:"text"` // Comment text
|
||||
// TopicID int `json:"topic_id"`
|
||||
// TopicOwnerID int `json:"topic_owner_id"`
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
CanEdit BaseBoolInt `json:"can_edit"` // Information whether current user can edit the comment
|
||||
}
|
||||
|
||||
// BoardTopicPoll struct.
|
||||
type BoardTopicPoll struct {
|
||||
AnswerID int `json:"answer_id"` // Current user's answer ID
|
||||
Answers []PollsAnswer `json:"answers"`
|
||||
Created int `json:"created"` // Date when poll has been created in Unixtime
|
||||
IsClosed BaseBoolInt `json:"is_closed"` // Information whether the poll is closed
|
||||
OwnerID int `json:"owner_id"` // Poll owner's ID
|
||||
PollID int `json:"poll_id"` // Poll ID
|
||||
Question string `json:"question"` // Poll question
|
||||
Votes string `json:"votes"` // Votes number
|
||||
}
|
50
vendor/github.com/SevereCloud/vksdk/v2/object/database.go
generated
vendored
Normal file
50
vendor/github.com/SevereCloud/vksdk/v2/object/database.go
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// DatabaseCity struct.
|
||||
type DatabaseCity struct {
|
||||
ID int `json:"id"` // City ID
|
||||
Title string `json:"title"` // City title
|
||||
Area string `json:"area"`
|
||||
Region string `json:"region"`
|
||||
Important BaseBoolInt `json:"important"`
|
||||
}
|
||||
|
||||
// DatabaseMetroStation struct.
|
||||
type DatabaseMetroStation struct {
|
||||
ID int `json:"id"` // Metro station ID
|
||||
Name string `json:"name"` // Metro station name
|
||||
Color string `json:"color"` // Metro station color
|
||||
CityID int `json:"city_id"` // Metro station city ID
|
||||
}
|
||||
|
||||
// DatabaseFaculty struct.
|
||||
type DatabaseFaculty struct {
|
||||
ID int `json:"id"` // Faculty ID
|
||||
Title string `json:"title"` // Faculty title
|
||||
}
|
||||
|
||||
// DatabaseRegion struct.
|
||||
type DatabaseRegion struct {
|
||||
ID int `json:"id"` // Region ID
|
||||
Title string `json:"title"` // Region title
|
||||
}
|
||||
|
||||
// DatabaseSchool struct.
|
||||
type DatabaseSchool struct {
|
||||
ID int `json:"id"` // School ID
|
||||
Title string `json:"title"` // School title
|
||||
}
|
||||
|
||||
// DatabaseStation struct.
|
||||
type DatabaseStation struct {
|
||||
CityID int `json:"city_id"` // City ID
|
||||
Color string `json:"color"` // Hex color code without #
|
||||
ID int `json:"id"` // Station ID
|
||||
Name string `json:"name"` // Station name
|
||||
}
|
||||
|
||||
// DatabaseUniversity struct.
|
||||
type DatabaseUniversity struct {
|
||||
ID int `json:"id"` // University ID
|
||||
Title string `json:"title"` // University title
|
||||
}
|
117
vendor/github.com/SevereCloud/vksdk/v2/object/docs.go
generated
vendored
Normal file
117
vendor/github.com/SevereCloud/vksdk/v2/object/docs.go
generated
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// DocsDoc struct.
|
||||
type DocsDoc struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the document
|
||||
Date int `json:"date"` // Date when file has been uploaded in Unixtime
|
||||
Ext string `json:"ext"` // File extension
|
||||
ID int `json:"id"` // Document ID
|
||||
IsLicensed BaseBoolInt `json:"is_licensed"`
|
||||
OwnerID int `json:"owner_id"` // Document owner ID
|
||||
Preview DocsDocPreview `json:"preview"`
|
||||
Size int `json:"size"` // File size in bites
|
||||
Title string `json:"title"` // Document title
|
||||
Type int `json:"type"` // Document type
|
||||
URL string `json:"url"` // File URL
|
||||
DocsDocPreviewAudioMessage
|
||||
DocsDocPreviewGraffiti
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (doc DocsDoc) ToAttachment() string {
|
||||
return fmt.Sprintf("doc%d_%d", doc.OwnerID, doc.ID)
|
||||
}
|
||||
|
||||
// DocsDocPreview struct.
|
||||
type DocsDocPreview struct {
|
||||
Photo DocsDocPreviewPhoto `json:"photo"`
|
||||
Graffiti DocsDocPreviewGraffiti `json:"graffiti"`
|
||||
Video DocsDocPreviewVideo `json:"video"`
|
||||
AudioMessage DocsDocPreviewAudioMessage `json:"audio_message"`
|
||||
}
|
||||
|
||||
// DocsDocPreviewPhoto struct.
|
||||
type DocsDocPreviewPhoto struct {
|
||||
Sizes []DocsDocPreviewPhotoSizes `json:"sizes"`
|
||||
}
|
||||
|
||||
// MaxSize return the largest DocsDocPreviewPhotoSizes.
|
||||
func (photo DocsDocPreviewPhoto) MaxSize() (maxPhotoSize DocsDocPreviewPhotoSizes) {
|
||||
var max float64
|
||||
|
||||
for _, photoSize := range photo.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size > max {
|
||||
max = size
|
||||
maxPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MinSize return the smallest DocsDocPreviewPhotoSizes.
|
||||
func (photo DocsDocPreviewPhoto) MinSize() (minPhotoSize DocsDocPreviewPhotoSizes) {
|
||||
var min float64
|
||||
|
||||
for _, photoSize := range photo.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size < min || min == 0 {
|
||||
min = size
|
||||
minPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// DocsDocPreviewPhotoSizes struct.
|
||||
type DocsDocPreviewPhotoSizes struct {
|
||||
// BUG(VK): json: cannot unmarshal number 162.000000 into Go struct field
|
||||
// DocsDocPreviewPhotoSizes.doc.preview.photo.sizes.height of type Int
|
||||
Height float64 `json:"height"` // Height in px
|
||||
Src string `json:"src"` // URL of the image
|
||||
Type string `json:"type"`
|
||||
Width float64 `json:"width"` // Width in px
|
||||
}
|
||||
|
||||
// DocsDocPreviewGraffiti struct.
|
||||
type DocsDocPreviewGraffiti struct {
|
||||
Src string `json:"src"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
}
|
||||
|
||||
// DocsDocPreviewVideo struct.
|
||||
type DocsDocPreviewVideo struct {
|
||||
FileSize int `json:"file_size"` // Video file size in bites
|
||||
Height int `json:"height"` // Video's height in pixels
|
||||
Src string `json:"src"` // Video URL
|
||||
Width int `json:"width"` // Video's width in pixels
|
||||
}
|
||||
|
||||
// DocsDocPreviewAudioMessage struct.
|
||||
type DocsDocPreviewAudioMessage struct {
|
||||
Duration int `json:"duration"`
|
||||
Waveform []int `json:"waveform"`
|
||||
LinkOgg string `json:"link_ogg"`
|
||||
LinkMp3 string `json:"link_mp3"`
|
||||
Transcript string `json:"transcript"`
|
||||
TranscriptState string `json:"transcript_state"`
|
||||
}
|
||||
|
||||
// DocsDocTypes struct.
|
||||
type DocsDocTypes struct {
|
||||
Count int `json:"count"` // Number of docs
|
||||
ID int `json:"id"` // Doc type ID
|
||||
Name string `json:"name"` // Doc type Title
|
||||
}
|
||||
|
||||
// DocsDocUploadResponse struct.
|
||||
type DocsDocUploadResponse struct {
|
||||
File string `json:"file"` // Uploaded file data
|
||||
}
|
9
vendor/github.com/SevereCloud/vksdk/v2/object/donut.go
generated
vendored
Normal file
9
vendor/github.com/SevereCloud/vksdk/v2/object/donut.go
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
package object
|
||||
|
||||
// DonutDonatorSubscriptionInfo struct.
|
||||
type DonutDonatorSubscriptionInfo struct {
|
||||
OwnerID int `json:"owner_id"`
|
||||
NextPaymentDate int `json:"next_payment_date"`
|
||||
Amount int `json:"amount"`
|
||||
Status string `json:"status"`
|
||||
}
|
41
vendor/github.com/SevereCloud/vksdk/v2/object/fave.go
generated
vendored
Normal file
41
vendor/github.com/SevereCloud/vksdk/v2/object/fave.go
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
package object
|
||||
|
||||
// FaveTag struct.
|
||||
type FaveTag struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// FavePage struct.
|
||||
type FavePage struct {
|
||||
Type string `json:"type"`
|
||||
Description string `json:"description"`
|
||||
Tags []FaveTag `json:"tags"`
|
||||
UpdatedDate int `json:"updated_date"`
|
||||
User UsersUser `json:"user"`
|
||||
Group GroupsGroup `json:"group"`
|
||||
}
|
||||
|
||||
// FaveFavesLink struct.
|
||||
type FaveFavesLink struct {
|
||||
URL string `json:"url"`
|
||||
Title string `json:"title"`
|
||||
Caption string `json:"caption"`
|
||||
Description string `json:"description"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
// FaveItem struct.
|
||||
type FaveItem struct {
|
||||
Type string `json:"type"`
|
||||
Seen BaseBoolInt `json:"seen"`
|
||||
AddedDate int `json:"added_date"`
|
||||
Tags []FaveTag `json:"tags"`
|
||||
Link FaveFavesLink `json:"link,omitempty"`
|
||||
Post WallWallpost `json:"post,omitempty"`
|
||||
Video VideoVideo `json:"video,omitempty"`
|
||||
Product MarketMarketItem `json:"product,omitempty"`
|
||||
Article Article `json:"article,omitempty"`
|
||||
}
|
63
vendor/github.com/SevereCloud/vksdk/v2/object/friends.go
generated
vendored
Normal file
63
vendor/github.com/SevereCloud/vksdk/v2/object/friends.go
generated
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// FriendsFriendStatus FriendStatus type.
|
||||
const (
|
||||
FriendsStatusNotFriend = iota // not a friend
|
||||
FriendsStatusOutComingRequest // out coming request
|
||||
FriendsStatusInComingRequest // incoming request
|
||||
FriendsStatusIsFriend // is friend
|
||||
)
|
||||
|
||||
// FriendsFriendStatus struct.
|
||||
type FriendsFriendStatus struct {
|
||||
FriendStatus int `json:"friend_status"`
|
||||
ReadState BaseBoolInt `json:"read_state"` // Information whether request is unviewed
|
||||
RequestMessage string `json:"request_message"` // Message sent with request
|
||||
Sign string `json:"sign"` // MD5 hash for the result validation
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// FriendsFriendsList struct.
|
||||
type FriendsFriendsList struct {
|
||||
ID int `json:"id"` // List ID
|
||||
Name string `json:"name"` // List title
|
||||
}
|
||||
|
||||
// type friendsMutualFriend struct {
|
||||
// CommonCount int `json:"common_count"` // Total mutual friends number
|
||||
// CommonFriends []int `json:"common_friends"`
|
||||
// ID int `json:"id"` // User ID
|
||||
// }
|
||||
|
||||
// FriendsRequests struct.
|
||||
type FriendsRequests struct {
|
||||
UsersUser
|
||||
From string `json:"from"` // ID of the user by whom friend has been suggested
|
||||
Mutual FriendsRequestsMutual `json:"mutual"`
|
||||
UserID int `json:"user_id"` // User ID
|
||||
TrackCode string `json:"track_code"`
|
||||
}
|
||||
|
||||
// FriendsRequestsMutual struct.
|
||||
type FriendsRequestsMutual struct {
|
||||
Count int `json:"count"` // Total mutual friends number
|
||||
Users []int `json:"users"`
|
||||
}
|
||||
|
||||
// FriendsRequestsXtrMessage struct.
|
||||
type FriendsRequestsXtrMessage struct {
|
||||
FriendsRequests
|
||||
Message string `json:"message"` // Message sent with a request
|
||||
}
|
||||
|
||||
// FriendsUserXtrLists struct.
|
||||
type FriendsUserXtrLists struct {
|
||||
UsersUser
|
||||
Lists []int `json:"lists"` // IDs of friend lists with user
|
||||
}
|
||||
|
||||
// FriendsUserXtrPhone struct.
|
||||
type FriendsUserXtrPhone struct {
|
||||
UsersUser
|
||||
Phone string `json:"phone"` // User phone
|
||||
}
|
34
vendor/github.com/SevereCloud/vksdk/v2/object/gifts.go
generated
vendored
Normal file
34
vendor/github.com/SevereCloud/vksdk/v2/object/gifts.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// GiftsGift Privacy type.
|
||||
const (
|
||||
GiftsGiftPrivacyForAll = iota // name and message for all
|
||||
GiftsGiftPrivacyNameForAll // name for all
|
||||
GiftsGiftPrivacyRecipientOnly // name and message for recipient only
|
||||
)
|
||||
|
||||
// GiftsGift struct.
|
||||
type GiftsGift struct {
|
||||
Date int `json:"date"` // Date when gist has been sent in Unixtime
|
||||
FromID int `json:"from_id"` // Gift sender ID
|
||||
Gift GiftsLayout `json:"gift"`
|
||||
GiftHash string `json:"gift_hash"` // Hash
|
||||
ID int `json:"id"` // Gift ID
|
||||
Message string `json:"message"` // Comment text
|
||||
Privacy int `json:"privacy"`
|
||||
|
||||
Description string `json:"description"`
|
||||
PaymentType string `json:"payment_type"`
|
||||
Price int `json:"price"`
|
||||
PriceStr string `json:"price_str"`
|
||||
}
|
||||
|
||||
// GiftsLayout struct.
|
||||
type GiftsLayout struct {
|
||||
ID int `json:"id"`
|
||||
Thumb256 string `json:"thumb_256"` // URL of the preview image with 256 px in width
|
||||
Thumb48 string `json:"thumb_48"` // URL of the preview image with 48 px in width
|
||||
Thumb96 string `json:"thumb_96"` // URL of the preview image with 96 px in width
|
||||
StickersProductID int `json:"stickers_product_id"`
|
||||
IsStickersStyle BaseBoolInt `json:"is_stickers_style"`
|
||||
}
|
807
vendor/github.com/SevereCloud/vksdk/v2/object/groups.go
generated
vendored
Normal file
807
vendor/github.com/SevereCloud/vksdk/v2/object/groups.go
generated
vendored
Normal file
@ -0,0 +1,807 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
// GroupsAddress WorkInfoStatus of information about timetable.
|
||||
const (
|
||||
WorkStatusNoInformation = "no_information"
|
||||
WorkStatusTemporarilyClosed = "temporarily_closed"
|
||||
WorkStatusAlwaysOpened = "always_opened"
|
||||
WorkStatusTimetable = "timetable"
|
||||
WorkStatusForeverClosed = "forever_closed"
|
||||
)
|
||||
|
||||
// GroupsAddress struct.
|
||||
type GroupsAddress struct {
|
||||
// Additional address to the place (6 floor, left door).
|
||||
AdditionalAddress string `json:"additional_address"`
|
||||
Address string `json:"address"` // String address to the place (Nevsky, 28)
|
||||
CityID int `json:"city_id"` // City id of address
|
||||
CountryID int `json:"country_id"` // Country id of address
|
||||
Distance int `json:"distance"` // Distance from the point
|
||||
ID int `json:"id"` // Address id
|
||||
Latitude float64 `json:"latitude"` // Address latitude
|
||||
Longitude float64 `json:"longitude"` // Address longitude
|
||||
MetroStationID int `json:"metro_station_id"` // Metro id of address
|
||||
Phone string `json:"phone"` // Address phone
|
||||
TimeOffset int `json:"time_offset"` // Time offset int minutes from utc time
|
||||
Timetable GroupsAddressTimetable `json:"timetable"` // Week timetable for the address
|
||||
Title string `json:"title"` // Title of the place (Zinger, etc)
|
||||
WorkInfoStatus string `json:"work_info_status"` // Status of information about timetable
|
||||
}
|
||||
|
||||
// GroupsAddressTimetable Timetable for a week.
|
||||
type GroupsAddressTimetable struct {
|
||||
Fri GroupsAddressTimetableDay `json:"fri"` // Timetable for friday
|
||||
Mon GroupsAddressTimetableDay `json:"mon"` // Timetable for monday
|
||||
Sat GroupsAddressTimetableDay `json:"sat"` // Timetable for saturday
|
||||
Sun GroupsAddressTimetableDay `json:"sun"` // Timetable for sunday
|
||||
Thu GroupsAddressTimetableDay `json:"thu"` // Timetable for thursday
|
||||
Tue GroupsAddressTimetableDay `json:"tue"` // Timetable for tuesday
|
||||
Wed GroupsAddressTimetableDay `json:"wed"` // Timetable for wednesday
|
||||
}
|
||||
|
||||
// GroupsAddressTimetableDay Timetable for one day.
|
||||
type GroupsAddressTimetableDay struct {
|
||||
BreakCloseTime int `json:"break_close_time"` // Close time of the break in minutes
|
||||
BreakOpenTime int `json:"break_open_time"` // Start time of the break in minutes
|
||||
CloseTime int `json:"close_time"` // Close time in minutes
|
||||
OpenTime int `json:"open_time"` // Open time in minutes
|
||||
}
|
||||
|
||||
// GroupsAddressesInfo struct.
|
||||
type GroupsAddressesInfo struct {
|
||||
IsEnabled BaseBoolInt `json:"is_enabled"` // Information whether addresses is enabled
|
||||
MainAddressID int `json:"main_address_id"` // Main address id for group
|
||||
}
|
||||
|
||||
// GroupsGroup AdminLevel type.
|
||||
const (
|
||||
GroupsAdminLevelModerator = iota
|
||||
GroupsAdminLevelEditor
|
||||
GroupsAdminLevelAdministrator
|
||||
)
|
||||
|
||||
// GroupsGroup MainSection type.
|
||||
const (
|
||||
GroupsMainSectionAbsent = iota
|
||||
GroupsMainSectionPhotos
|
||||
GroupsMainSectionTopics
|
||||
GroupsMainSectionAudio
|
||||
GroupsMainSectionVideo
|
||||
GroupsMainSectionMarket
|
||||
)
|
||||
|
||||
// GroupsGroup MemberStatus(events_event_attach, newsfeed_event_activity).
|
||||
const (
|
||||
GroupsMemberStatusNotMember = iota
|
||||
GroupsMemberStatusMember
|
||||
GroupsMemberStatusNotSure
|
||||
GroupsMemberStatusDeclined
|
||||
GroupsMemberStatusHasSentRequest
|
||||
GroupsMemberStatusInvited
|
||||
)
|
||||
|
||||
// GroupsGroup Access or IsClosed type.
|
||||
const (
|
||||
GroupsGroupOpen = iota
|
||||
GroupsGroupClosed
|
||||
GroupsGroupPrivate
|
||||
)
|
||||
|
||||
// GroupsGroup AgeLimits.
|
||||
const (
|
||||
GroupsAgeLimitsNo = iota
|
||||
GroupsAgeLimitsOver16
|
||||
GroupsAgeLimitsOver18
|
||||
)
|
||||
|
||||
// GroupsGroup type.
|
||||
const (
|
||||
GroupsTypeGroup = "group"
|
||||
GroupsTypePage = "page"
|
||||
GroupsTypeEvent = "event"
|
||||
)
|
||||
|
||||
// GroupsGroup struct.
|
||||
type GroupsGroup struct {
|
||||
AdminLevel int `json:"admin_level"`
|
||||
Deactivated string `json:"deactivated"` // Information whether community is banned
|
||||
FinishDate int `json:"finish_date"` // Finish date in Unixtime format
|
||||
ID int `json:"id"` // Community ID
|
||||
Name string `json:"name"` // Community name
|
||||
Photo100 string `json:"photo_100"` // URL of square photo of the community with 100 pixels in width
|
||||
Photo200 string `json:"photo_200"` // URL of square photo of the community with 200 pixels in width
|
||||
Photo50 string `json:"photo_50"` // URL of square photo of the community with 50 pixels in width
|
||||
ScreenName string `json:"screen_name"` // Domain of the community page
|
||||
StartDate int `json:"start_date"` // Start date in Unixtime format
|
||||
Type string `json:"type"`
|
||||
Market GroupsMarketInfo `json:"market"`
|
||||
MemberStatus int `json:"member_status"` // Current user's member status
|
||||
IsClosed int `json:"is_closed"`
|
||||
City BaseObject `json:"city"`
|
||||
Country BaseCountry `json:"country"`
|
||||
|
||||
// Information whether current user is administrator.
|
||||
IsAdmin BaseBoolInt `json:"is_admin"`
|
||||
|
||||
// Information whether current user is advertiser.
|
||||
IsAdvertiser BaseBoolInt `json:"is_advertiser"`
|
||||
|
||||
// Information whether current user is member.
|
||||
IsMember BaseBoolInt `json:"is_member"`
|
||||
|
||||
// Information whether community is in faves.
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
|
||||
// Information whether community is adult.
|
||||
IsAdult BaseBoolInt `json:"is_adult"`
|
||||
|
||||
// Information whether current user is subscribed.
|
||||
IsSubscribed BaseBoolInt `json:"is_subscribed"`
|
||||
|
||||
// Information whether current user can post on community's wall.
|
||||
CanPost BaseBoolInt `json:"can_post"`
|
||||
|
||||
// Information whether current user can see all posts on community's wall.
|
||||
CanSeeAllPosts BaseBoolInt `json:"can_see_all_posts"`
|
||||
|
||||
// Information whether current user can create topic.
|
||||
CanCreateTopic BaseBoolInt `json:"can_create_topic"`
|
||||
|
||||
// Information whether current user can upload video.
|
||||
CanUploadVideo BaseBoolInt `json:"can_upload_video"`
|
||||
|
||||
// Information whether current user can upload doc.
|
||||
CanUploadDoc BaseBoolInt `json:"can_upload_doc"`
|
||||
|
||||
// Information whether community has photo.
|
||||
HasPhoto BaseBoolInt `json:"has_photo"`
|
||||
|
||||
// Information whether current user can send a message to community.
|
||||
CanMessage BaseBoolInt `json:"can_message"`
|
||||
|
||||
// Information whether community can send a message to current user.
|
||||
IsMessagesBlocked BaseBoolInt `json:"is_messages_blocked"`
|
||||
|
||||
// Information whether community can send notifications by phone number to current user.
|
||||
CanSendNotify BaseBoolInt `json:"can_send_notify"`
|
||||
|
||||
// Information whether current user is subscribed to podcasts.
|
||||
IsSubscribedPodcasts BaseBoolInt `json:"is_subscribed_podcasts"`
|
||||
|
||||
// Owner in whitelist or not.
|
||||
CanSubscribePodcasts BaseBoolInt `json:"can_subscribe_podcasts"`
|
||||
|
||||
// Can subscribe to wall.
|
||||
CanSubscribePosts BaseBoolInt `json:"can_subscribe_posts"`
|
||||
|
||||
// Information whether community has market app.
|
||||
HasMarketApp BaseBoolInt `json:"has_market_app"`
|
||||
IsHiddenFromFeed BaseBoolInt `json:"is_hidden_from_feed"`
|
||||
IsMarketCartEnabled BaseBoolInt `json:"is_market_cart_enabled"`
|
||||
Verified BaseBoolInt `json:"verified"` // Information whether community is verified
|
||||
|
||||
// Information whether the community has a fire pictogram.
|
||||
Trending BaseBoolInt `json:"trending"`
|
||||
Description string `json:"description"` // Community description
|
||||
WikiPage string `json:"wiki_page"` // Community's main wiki page title
|
||||
MembersCount int `json:"members_count"` // Community members number
|
||||
Counters GroupsCountersGroup `json:"counters"`
|
||||
Cover GroupsCover `json:"cover"`
|
||||
|
||||
// Type of group, start date of event or category of public page.
|
||||
Activity string `json:"activity"`
|
||||
FixedPost int `json:"fixed_post"` // Fixed post ID
|
||||
Status string `json:"status"` // Community status
|
||||
MainAlbumID int `json:"main_album_id"` // Community's main photo album ID
|
||||
Links []GroupsLinksItem `json:"links"`
|
||||
Contacts []GroupsContactsItem `json:"contacts"`
|
||||
Site string `json:"site"` // Community's website
|
||||
MainSection int `json:"main_section"`
|
||||
OnlineStatus GroupsOnlineStatus `json:"online_status"` // Status of replies in community messages
|
||||
AgeLimits int `json:"age_limits"` // Information whether age limit
|
||||
BanInfo GroupsGroupBanInfo `json:"ban_info"` // User ban info
|
||||
Addresses GroupsAddressesInfo `json:"addresses"` // Info about addresses in Groups
|
||||
LiveCovers GroupsLiveCovers `json:"live_covers"`
|
||||
CropPhoto UsersCropPhoto `json:"crop_photo"`
|
||||
Wall int `json:"wall"`
|
||||
ActionButton GroupsActionButton `json:"action_button"`
|
||||
TrackCode string `json:"track_code"`
|
||||
PublicDateLabel string `json:"public_date_label"`
|
||||
AuthorID int `json:"author_id"`
|
||||
Phone string `json:"phone"`
|
||||
}
|
||||
|
||||
// ToMention return mention.
|
||||
func (group GroupsGroup) ToMention() string {
|
||||
return fmt.Sprintf("[club%d|%s]", group.ID, group.Name)
|
||||
}
|
||||
|
||||
// GroupsLiveCovers struct.
|
||||
type GroupsLiveCovers struct {
|
||||
IsEnabled BaseBoolInt `json:"is_enabled"`
|
||||
IsScalable BaseBoolInt `json:"is_scalable"`
|
||||
StoryIds []string `json:"story_ids"`
|
||||
}
|
||||
|
||||
// GroupsBanInfo reason type.
|
||||
const (
|
||||
GroupsBanReasonOther = iota
|
||||
GroupsBanReasonSpam
|
||||
GroupsBanReasonVerbalAbuse
|
||||
GroupsBanReasonStrongLanguage
|
||||
GroupsBanReasonFlood
|
||||
)
|
||||
|
||||
// GroupsBanInfo struct.
|
||||
type GroupsBanInfo struct {
|
||||
AdminID int `json:"admin_id"` // Administrator ID
|
||||
Comment string `json:"comment"` // Comment for a ban
|
||||
Date int `json:"date"` // Date when user has been added to blacklist in Unixtime
|
||||
EndDate int `json:"end_date"` // Date when user will be removed from blacklist in Unixtime
|
||||
Reason int `json:"reason"`
|
||||
CommentVisible BaseBoolInt `json:"comment_visible"`
|
||||
}
|
||||
|
||||
// GroupsCallbackServer struct.
|
||||
type GroupsCallbackServer struct {
|
||||
CreatorID int `json:"creator_id"`
|
||||
ID int `json:"id"`
|
||||
SecretKey string `json:"secret_key"`
|
||||
Status string `json:"status"`
|
||||
Title string `json:"title"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// GroupsCallbackSettings struct.
|
||||
type GroupsCallbackSettings struct {
|
||||
APIVersion string `json:"api_version"` // API version used for the events
|
||||
Events GroupsLongPollEvents `json:"events"`
|
||||
}
|
||||
|
||||
// GroupsContactsItem struct.
|
||||
type GroupsContactsItem struct {
|
||||
Desc string `json:"desc"` // Contact description
|
||||
Email string `json:"email"` // Contact email
|
||||
Phone string `json:"phone"` // Contact phone
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// GroupsCountersGroup struct.
|
||||
type GroupsCountersGroup struct {
|
||||
Addresses int `json:"addresses"` // Addresses number
|
||||
Albums int `json:"albums"` // Photo albums number
|
||||
Articles int `json:"articles"` // Articles number
|
||||
Audios int `json:"audios"` // Audios number
|
||||
Docs int `json:"docs"` // Docs number
|
||||
Market int `json:"market"` // Market items number
|
||||
Photos int `json:"photos"` // Photos number
|
||||
Topics int `json:"topics"` // Topics number
|
||||
Videos int `json:"videos"` // Videos number
|
||||
Narratives int `json:"narratives"` // Narratives number
|
||||
}
|
||||
|
||||
// GroupsCover struct.
|
||||
type GroupsCover struct {
|
||||
Enabled BaseBoolInt `json:"enabled"` // Information whether cover is enabled
|
||||
Images []BaseImage `json:"images"`
|
||||
}
|
||||
|
||||
// GroupsGroupBanInfo struct.
|
||||
type GroupsGroupBanInfo struct {
|
||||
Comment string `json:"comment"` // Ban comment
|
||||
EndDate int `json:"end_date"` // End date of ban in Unixtime
|
||||
}
|
||||
|
||||
// GroupsGroupCategory struct.
|
||||
type GroupsGroupCategory struct {
|
||||
ID int `json:"id"` // Category ID
|
||||
Name string `json:"name"` // Category name
|
||||
Subcategories []BaseObjectWithName `json:"subcategories"`
|
||||
}
|
||||
|
||||
// GroupsGroupCategoryFull struct.
|
||||
type GroupsGroupCategoryFull struct {
|
||||
ID int `json:"id"` // Category ID
|
||||
Name string `json:"name"` // Category name
|
||||
PageCount int `json:"page_count"` // Pages number
|
||||
PagePreviews []GroupsGroup `json:"page_previews"`
|
||||
Subcategories []GroupsGroupCategoryFull `json:"subcategories"`
|
||||
}
|
||||
|
||||
// GroupsGroupCategoryType struct.
|
||||
type GroupsGroupCategoryType struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// GroupsGroupLink struct.
|
||||
type GroupsGroupLink struct {
|
||||
Desc string `json:"desc"` // Link description
|
||||
EditTitle BaseBoolInt `json:"edit_title"` // Information whether the title can be edited
|
||||
ImageProcessing BaseBoolInt `json:"image_processing"` // Information whether the image on processing
|
||||
Name string `json:"name"`
|
||||
ID int `json:"id"` // Link ID
|
||||
URL string `json:"url"` // Link URL
|
||||
}
|
||||
|
||||
// GroupsGroupPublicCategoryList struct.
|
||||
type GroupsGroupPublicCategoryList struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Subcategories []GroupsGroupCategoryType `json:"subcategories"`
|
||||
}
|
||||
|
||||
// GroupsGroupSettings Photos type.
|
||||
const (
|
||||
GroupsGroupPhotosDisabled = iota
|
||||
GroupsGroupPhotosOpen
|
||||
GroupsGroupPhotosLimited
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Subject type.
|
||||
const (
|
||||
_ = iota
|
||||
GroupsGroupSubjectAuto
|
||||
GroupsGroupSubjectActivityHolidays
|
||||
GroupsGroupSubjectBusiness
|
||||
GroupsGroupSubjectPets
|
||||
GroupsGroupSubjectHealth
|
||||
GroupsGroupSubjectDatingAndCommunication
|
||||
GroupsGroupSubjectGames
|
||||
GroupsGroupSubjectIt
|
||||
GroupsGroupSubjectCinema
|
||||
GroupsGroupSubjectBeautyAndFashion
|
||||
GroupsGroupSubjectCooking
|
||||
GroupsGroupSubjectArtAndCulture
|
||||
GroupsGroupSubjectLiterature
|
||||
GroupsGroupSubjectMobileServicesAndInternet
|
||||
GroupsGroupSubjectMusic
|
||||
GroupsGroupSubjectScienceAndTechnology
|
||||
GroupsGroupSubjectRealEstate
|
||||
GroupsGroupSubjectNewsAndMedia
|
||||
GroupsGroupSubjectSecurity
|
||||
GroupsGroupSubjectEducation
|
||||
GroupsGroupSubjectHomeAndRenovations
|
||||
GroupsGroupSubjectPolitics
|
||||
GroupsGroupSubjectFood
|
||||
GroupsGroupSubjectIndustry
|
||||
GroupsGroupSubjectTravel
|
||||
GroupsGroupSubjectWork
|
||||
GroupsGroupSubjectEntertainment
|
||||
GroupsGroupSubjectReligion
|
||||
GroupsGroupSubjectFamily
|
||||
GroupsGroupSubjectSports
|
||||
GroupsGroupSubjectInsurance
|
||||
GroupsGroupSubjectTelevision
|
||||
GroupsGroupSubjectGoodsAndServices
|
||||
GroupsGroupSubjectHobbies
|
||||
GroupsGroupSubjectFinance
|
||||
GroupsGroupSubjectPhoto
|
||||
GroupsGroupSubjectEsoterics
|
||||
GroupsGroupSubjectElectronicsAndAppliances
|
||||
GroupsGroupSubjectErotic
|
||||
GroupsGroupSubjectHumor
|
||||
GroupsGroupSubjectSocietyHumanities
|
||||
GroupsGroupSubjectDesignAndGraphics
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Topics type.
|
||||
const (
|
||||
GroupsGroupTopicsDisabled = iota
|
||||
GroupsGroupTopicsOpen
|
||||
GroupsGroupTopicsLimited
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Docs type.
|
||||
const (
|
||||
GroupsGroupDocsDisabled = iota
|
||||
GroupsGroupDocsOpen
|
||||
GroupsGroupDocsLimited
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Audio type.
|
||||
const (
|
||||
GroupsGroupAudioDisabled = iota
|
||||
GroupsGroupAudioOpen
|
||||
GroupsGroupAudioLimited
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Video type.
|
||||
const (
|
||||
GroupsGroupVideoDisabled = iota
|
||||
GroupsGroupVideoOpen
|
||||
GroupsGroupVideoLimited
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Wall type.
|
||||
const (
|
||||
GroupsGroupWallDisabled = iota
|
||||
GroupsGroupWallOpen
|
||||
GroupsGroupWallLimited
|
||||
GroupsGroupWallClosed
|
||||
)
|
||||
|
||||
// GroupsGroupSettings Wiki type.
|
||||
const (
|
||||
GroupsGroupWikiDisabled = iota
|
||||
GroupsGroupWikiOpen
|
||||
GroupsGroupWikiLimited
|
||||
)
|
||||
|
||||
// GroupsGroupSettings struct.
|
||||
type GroupsGroupSettings struct {
|
||||
Access int `json:"access"` // Community access settings
|
||||
Address string `json:"address"` // Community's page domain
|
||||
Audio int `json:"audio"` // Audio settings
|
||||
Description string `json:"description"` // Community description
|
||||
Docs int `json:"docs"` // Docs settings
|
||||
ObsceneWords []string `json:"obscene_words"` // The list of stop words
|
||||
Photos int `json:"photos"` // Photos settings
|
||||
PublicCategory int `json:"public_category"` // Information about the group category
|
||||
PublicCategoryList []GroupsGroupPublicCategoryList `json:"public_category_list"`
|
||||
|
||||
// Information about the group subcategory.
|
||||
PublicSubcategory int `json:"public_subcategory"`
|
||||
Rss string `json:"rss"` // URL of the RSS feed
|
||||
Subject int `json:"subject"` // Community subject ID
|
||||
SubjectList []GroupsSubjectItem `json:"subject_list"`
|
||||
Title string `json:"title"` // Community title
|
||||
Topics int `json:"topics"` // Topics settings
|
||||
Video int `json:"video"` // Video settings
|
||||
Wall int `json:"wall"` // Wall settings
|
||||
Website string `json:"website"` // Community website
|
||||
Wiki int `json:"wiki"` // Wiki settings
|
||||
CountryID int `json:"country_id"`
|
||||
CityID int `json:"city_id"`
|
||||
Messages int `json:"messages"`
|
||||
Articles int `json:"articles"`
|
||||
Events int `json:"events"`
|
||||
AgeLimits int `json:"age_limits"`
|
||||
|
||||
// Information whether the obscene filter is enabled.
|
||||
ObsceneFilter BaseBoolInt `json:"obscene_filter"`
|
||||
|
||||
// Information whether the stopwords filter is enabled.
|
||||
ObsceneStopwords BaseBoolInt `json:"obscene_stopwords"`
|
||||
LiveCovers struct {
|
||||
IsEnabled BaseBoolInt `json:"is_enabled"`
|
||||
} `json:"live_covers"`
|
||||
Market GroupsMarketInfo `json:"market"`
|
||||
SectionsList []GroupsSectionsList `json:"sections_list"`
|
||||
MainSection int `json:"main_section"`
|
||||
SecondarySection int `json:"secondary_section"`
|
||||
ActionButton GroupsActionButton `json:"action_button"`
|
||||
Phone string `json:"phone"`
|
||||
}
|
||||
|
||||
// GroupsSectionsList struct.
|
||||
type GroupsSectionsList struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON need for unmarshal dynamic array (Example: [1, "Фотографии"]) to struct.
|
||||
//
|
||||
// To unmarshal JSON into a value implementing the Unmarshaler interface,
|
||||
// Unmarshal calls that value's UnmarshalJSON method.
|
||||
// See more https://golang.org/pkg/encoding/json/#Unmarshal
|
||||
func (g *GroupsSectionsList) UnmarshalJSON(data []byte) error {
|
||||
var alias []interface{}
|
||||
if err := json.Unmarshal(data, &alias); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(alias) != 2 {
|
||||
return &json.UnmarshalTypeError{
|
||||
Value: string(data),
|
||||
Type: reflect.TypeOf((*GroupsSectionsList)(nil)),
|
||||
}
|
||||
}
|
||||
|
||||
// default concrete Go type float64 for JSON numbers
|
||||
id, ok := alias[0].(float64)
|
||||
if !ok {
|
||||
return &json.UnmarshalTypeError{
|
||||
Value: string(data),
|
||||
Type: reflect.TypeOf((*GroupsSectionsList)(nil)),
|
||||
Struct: "GroupsSectionsList",
|
||||
Field: "ID",
|
||||
}
|
||||
}
|
||||
|
||||
name, ok := alias[1].(string)
|
||||
if !ok {
|
||||
return &json.UnmarshalTypeError{
|
||||
Value: string(data),
|
||||
Type: reflect.TypeOf((*GroupsSectionsList)(nil)),
|
||||
Struct: "GroupsSectionsList",
|
||||
Field: "Name",
|
||||
}
|
||||
}
|
||||
|
||||
g.ID = int(id)
|
||||
g.Name = name
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// GroupsActionType for action_button in groups.
|
||||
type GroupsActionType string
|
||||
|
||||
// GroupsActionType enums.
|
||||
const (
|
||||
GroupsActionTypeOpenURL GroupsActionType = "open_url"
|
||||
GroupsActionTypeSendEmail GroupsActionType = "send_email"
|
||||
GroupsActionTypeCallPhone GroupsActionType = "call_phone"
|
||||
GroupsActionTypeCallVK GroupsActionType = "call_vk"
|
||||
GroupsActionTypeOpenGroupApp GroupsActionType = "open_group_app"
|
||||
GroupsActionTypeOpenApp GroupsActionType = "open_app"
|
||||
)
|
||||
|
||||
// GroupsActionButton struct.
|
||||
type GroupsActionButton struct {
|
||||
ActionType GroupsActionType `json:"action_type"`
|
||||
Target GroupsActionButtonTarget `json:"target"`
|
||||
Title string `json:"title"`
|
||||
|
||||
// IsEnabled for GroupsGroupSettings
|
||||
IsEnabled BaseBoolInt `json:"is_enabled,omitempty"`
|
||||
}
|
||||
|
||||
// GroupsActionButtonTarget struct.
|
||||
type GroupsActionButtonTarget struct {
|
||||
// ActionType == ActionTypeSendEmail
|
||||
Email string `json:"email"`
|
||||
|
||||
// ActionType == ActionTypeCallPhone
|
||||
Phone string `json:"phone"`
|
||||
|
||||
// ActionType == ActionTypeCallVK
|
||||
UserID int `json:"user_id"`
|
||||
|
||||
// ActionType == ActionTypeOpenURL
|
||||
URL string `json:"url"`
|
||||
|
||||
// ActionType == ActionTypeOpenApp
|
||||
GoogleStoreURL string `json:"google_store_url"`
|
||||
ItunesURL string `json:"itunes_url"`
|
||||
// URL string `json:"url"`
|
||||
|
||||
// ActionType == ActionTypeOpenGroupApp
|
||||
AppID int `json:"app_id"`
|
||||
|
||||
IsInternal BaseBoolInt `json:"is_internal"`
|
||||
}
|
||||
|
||||
// GroupsGroupXtrInvitedBy struct.
|
||||
type GroupsGroupXtrInvitedBy struct {
|
||||
AdminLevel int `json:"admin_level"`
|
||||
ID int `json:"id"` // Community ID
|
||||
InvitedBy int `json:"invited_by"` // Inviter ID
|
||||
Name string `json:"name"` // Community name
|
||||
Photo100 string `json:"photo_100"` // URL of square photo of the community with 100 pixels in width
|
||||
Photo200 string `json:"photo_200"` // URL of square photo of the community with 200 pixels in width
|
||||
Photo50 string `json:"photo_50"` // URL of square photo of the community with 50 pixels in width
|
||||
ScreenName string `json:"screen_name"` // Domain of the community page
|
||||
Type string `json:"type"`
|
||||
IsClosed int `json:"is_closed"` // Information whether community is closed
|
||||
IsAdmin BaseBoolInt `json:"is_admin"` // Information whether current user is manager
|
||||
IsMember BaseBoolInt `json:"is_member"` // Information whether current user is member
|
||||
IsAdvertiser BaseBoolInt `json:"is_advertiser"` // Information whether current user is advertiser
|
||||
}
|
||||
|
||||
// ToMention return mention.
|
||||
func (group GroupsGroupXtrInvitedBy) ToMention() string {
|
||||
return fmt.Sprintf("[club%d|%s]", group.ID, group.Name)
|
||||
}
|
||||
|
||||
// GroupsLinksItem struct.
|
||||
type GroupsLinksItem struct {
|
||||
Desc string `json:"desc"` // Link description
|
||||
EditTitle BaseBoolInt `json:"edit_title"` // Information whether the link title can be edited
|
||||
ID int `json:"id"` // Link ID
|
||||
Name string `json:"name"` // Link title
|
||||
Photo100 string `json:"photo_100"` // URL of square image of the link with 100 pixels in width
|
||||
Photo50 string `json:"photo_50"` // URL of square image of the link with 50 pixels in width
|
||||
URL string `json:"url"` // Link URL
|
||||
}
|
||||
|
||||
// GroupsLongPollEvents struct.
|
||||
type GroupsLongPollEvents struct {
|
||||
MessageNew BaseBoolInt `json:"message_new"`
|
||||
MessageReply BaseBoolInt `json:"message_reply"`
|
||||
PhotoNew BaseBoolInt `json:"photo_new"`
|
||||
AudioNew BaseBoolInt `json:"audio_new"`
|
||||
VideoNew BaseBoolInt `json:"video_new"`
|
||||
WallReplyNew BaseBoolInt `json:"wall_reply_new"`
|
||||
WallReplyEdit BaseBoolInt `json:"wall_reply_edit"`
|
||||
WallReplyDelete BaseBoolInt `json:"wall_reply_delete"`
|
||||
WallReplyRestore BaseBoolInt `json:"wall_reply_restore"`
|
||||
WallPostNew BaseBoolInt `json:"wall_post_new"`
|
||||
BoardPostNew BaseBoolInt `json:"board_post_new"`
|
||||
BoardPostEdit BaseBoolInt `json:"board_post_edit"`
|
||||
BoardPostRestore BaseBoolInt `json:"board_post_restore"`
|
||||
BoardPostDelete BaseBoolInt `json:"board_post_delete"`
|
||||
PhotoCommentNew BaseBoolInt `json:"photo_comment_new"`
|
||||
PhotoCommentEdit BaseBoolInt `json:"photo_comment_edit"`
|
||||
PhotoCommentDelete BaseBoolInt `json:"photo_comment_delete"`
|
||||
PhotoCommentRestore BaseBoolInt `json:"photo_comment_restore"`
|
||||
VideoCommentNew BaseBoolInt `json:"video_comment_new"`
|
||||
VideoCommentEdit BaseBoolInt `json:"video_comment_edit"`
|
||||
VideoCommentDelete BaseBoolInt `json:"video_comment_delete"`
|
||||
VideoCommentRestore BaseBoolInt `json:"video_comment_restore"`
|
||||
MarketCommentNew BaseBoolInt `json:"market_comment_new"`
|
||||
MarketCommentEdit BaseBoolInt `json:"market_comment_edit"`
|
||||
MarketCommentDelete BaseBoolInt `json:"market_comment_delete"`
|
||||
MarketCommentRestore BaseBoolInt `json:"market_comment_restore"`
|
||||
MarketOrderNew BaseBoolInt `json:"market_order_new"`
|
||||
MarketOrderEdit BaseBoolInt `json:"market_order_edit"`
|
||||
PollVoteNew BaseBoolInt `json:"poll_vote_new"`
|
||||
GroupJoin BaseBoolInt `json:"group_join"`
|
||||
GroupLeave BaseBoolInt `json:"group_leave"`
|
||||
GroupChangeSettings BaseBoolInt `json:"group_change_settings"`
|
||||
GroupChangePhoto BaseBoolInt `json:"group_change_photo"`
|
||||
GroupOfficersEdit BaseBoolInt `json:"group_officers_edit"`
|
||||
MessageAllow BaseBoolInt `json:"message_allow"`
|
||||
MessageDeny BaseBoolInt `json:"message_deny"`
|
||||
WallRepost BaseBoolInt `json:"wall_repost"`
|
||||
UserBlock BaseBoolInt `json:"user_block"`
|
||||
UserUnblock BaseBoolInt `json:"user_unblock"`
|
||||
MessageEdit BaseBoolInt `json:"message_edit"`
|
||||
MessageTypingState BaseBoolInt `json:"message_typing_state"`
|
||||
LeadFormsNew BaseBoolInt `json:"lead_forms_new"`
|
||||
LikeAdd BaseBoolInt `json:"like_add"`
|
||||
LikeRemove BaseBoolInt `json:"like_remove"`
|
||||
VkpayTransaction BaseBoolInt `json:"vkpay_transaction"`
|
||||
AppPayload BaseBoolInt `json:"app_payload"`
|
||||
MessageRead BaseBoolInt `json:"message_read"`
|
||||
MessageEvent BaseBoolInt `json:"message_event"`
|
||||
DonutSubscriptionCreate BaseBoolInt `json:"donut_subscription_create"`
|
||||
DonutSubscriptionProlonged BaseBoolInt `json:"donut_subscription_prolonged"`
|
||||
DonutSubscriptionExpired BaseBoolInt `json:"donut_subscription_expired"`
|
||||
DonutSubscriptionCancelled BaseBoolInt `json:"donut_subscription_cancelled"`
|
||||
DonutSubscriptionPriceChanged BaseBoolInt `json:"donut_subscription_price_changed"`
|
||||
DonutMoneyWithdraw BaseBoolInt `json:"donut_money_withdraw"`
|
||||
DonutMoneyWithdrawError BaseBoolInt `json:"donut_money_withdraw_error"`
|
||||
|
||||
// Bugs
|
||||
// MessagesEdit BaseBoolInt `json:"messages_edit"`
|
||||
// WallNew BaseBoolInt `json:"wall_new"`
|
||||
// WallNewReply BaseBoolInt `json:"wall_new_reply"`
|
||||
// WallEditReply BaseBoolInt `json:"wall_edit_reply"`
|
||||
}
|
||||
|
||||
// GroupsLongPollServer struct.
|
||||
type GroupsLongPollServer struct {
|
||||
Key string `json:"key"` // Long Poll key
|
||||
Server string `json:"server"` // Long Poll server address
|
||||
Ts string `json:"ts"` // Number of the last event
|
||||
}
|
||||
|
||||
// TODO: func (g GroupsLongPollServer) GetURL() string {
|
||||
|
||||
// GroupsLongPollSettings struct.
|
||||
type GroupsLongPollSettings struct {
|
||||
APIVersion string `json:"api_version"` // API version used for the events
|
||||
Events GroupsLongPollEvents `json:"events"`
|
||||
IsEnabled BaseBoolInt `json:"is_enabled"` // Shows whether Long Poll is enabled
|
||||
}
|
||||
|
||||
// GroupsMarketType ...
|
||||
type GroupsMarketType string
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
GroupsMarketBasic GroupsMarketType = "basic"
|
||||
GroupsMarketAdvanced GroupsMarketType = "advanced"
|
||||
)
|
||||
|
||||
// GroupsMarketInfo struct.
|
||||
type GroupsMarketInfo struct {
|
||||
// information about the type of store. Returned if the group includes
|
||||
// the "Products" section.
|
||||
Type GroupsMarketType `json:"type,omitempty"`
|
||||
ContactID int `json:"contact_id,omitempty"` // Contact person ID
|
||||
Currency MarketCurrency `json:"currency,omitempty"`
|
||||
CurrencyText string `json:"currency_text,omitempty"` // Currency name
|
||||
Enabled BaseBoolInt `json:"enabled"` // Information whether the market is enabled
|
||||
CommentsEnabled BaseBoolInt `json:"comments_enabled,omitempty"`
|
||||
CanMessage BaseBoolInt `json:"can_message,omitempty"`
|
||||
MainAlbumID int `json:"main_album_id,omitempty"` // Main market album ID
|
||||
PriceMax string `json:"price_max,omitempty"` // Maximum price
|
||||
PriceMin string `json:"price_min,omitempty"` // Minimum price
|
||||
Wiki PagesWikipageFull `json:"wiki,omitempty"`
|
||||
CityIDs []int `json:"city_ids"`
|
||||
CountryIDs []int `json:"country_ids,omitempty"`
|
||||
}
|
||||
|
||||
// GroupsGroupRole Role type.
|
||||
const (
|
||||
GroupsGroupRoleModerator = "moderator"
|
||||
GroupsGroupRoleEditor = "editor"
|
||||
GroupsGroupRoleAdministrator = "administrator"
|
||||
GroupsGroupRoleCreator = "creator"
|
||||
)
|
||||
|
||||
// GroupsMemberRole struct.
|
||||
type GroupsMemberRole struct {
|
||||
ID int `json:"id"` // User ID
|
||||
Role string `json:"role"`
|
||||
Permissions []string `json:"permissions"`
|
||||
}
|
||||
|
||||
// GroupsMemberRoleXtrUsersUser struct.
|
||||
type GroupsMemberRoleXtrUsersUser struct {
|
||||
UsersUser
|
||||
Role string `json:"role"`
|
||||
Permissions []string `json:"permissions"`
|
||||
}
|
||||
|
||||
// GroupsMemberStatus struct.
|
||||
type GroupsMemberStatus struct {
|
||||
Member BaseBoolInt `json:"member"` // Information whether user is a member of the group
|
||||
UserID int `json:"user_id"` // User ID
|
||||
Permissions []string `json:"permissions"`
|
||||
}
|
||||
|
||||
// GroupsMemberStatusFull struct.
|
||||
type GroupsMemberStatusFull struct {
|
||||
Invitation BaseBoolInt `json:"invitation"` // Information whether user has been invited to the group
|
||||
Member BaseBoolInt `json:"member"` // Information whether user is a member of the group
|
||||
Request BaseBoolInt `json:"request"` // Information whether user has send request to the group
|
||||
CanInvite BaseBoolInt `json:"can_invite"` // Information whether user can be invite
|
||||
CanRecall BaseBoolInt `json:"can_recall"` // Information whether user's invite to the group can be recalled
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// GroupsOnlineStatus Status type.
|
||||
const (
|
||||
GroupsOnlineStatusTypeNone = "none"
|
||||
GroupsOnlineStatusTypeOnline = "online"
|
||||
GroupsOnlineStatusTypeAnswerMark = "answer_mark"
|
||||
)
|
||||
|
||||
// GroupsOnlineStatus struct.
|
||||
type GroupsOnlineStatus struct {
|
||||
Minutes int `json:"minutes"` // Estimated time of answer (for status = answer_mark)
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// GroupsOwnerXtrBanInfo struct.
|
||||
type GroupsOwnerXtrBanInfo struct {
|
||||
BanInfo GroupsBanInfo `json:"ban_info"`
|
||||
Group GroupsGroup `json:"group"`
|
||||
Profile UsersUser `json:"profile"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// GroupsSubjectItem struct.
|
||||
type GroupsSubjectItem struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// GroupsTokenPermissionSetting struct.
|
||||
type GroupsTokenPermissionSetting struct {
|
||||
Name string `json:"name"`
|
||||
Setting int `json:"setting"`
|
||||
}
|
||||
|
||||
// GroupsTokenPermissions struct.
|
||||
type GroupsTokenPermissions struct {
|
||||
Mask int `json:"mask"`
|
||||
Permissions []GroupsTokenPermissionSetting `json:"permissions"`
|
||||
}
|
||||
|
||||
// GroupsTag struct.
|
||||
type GroupsTag struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
}
|
44
vendor/github.com/SevereCloud/vksdk/v2/object/leadforms.go
generated
vendored
Normal file
44
vendor/github.com/SevereCloud/vksdk/v2/object/leadforms.go
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
package object
|
||||
|
||||
// LeadFormsForm struct.
|
||||
type LeadFormsForm struct {
|
||||
FormID int `json:"form_id"`
|
||||
GroupID int `json:"group_id"`
|
||||
Photo interface{} `json:"photo"`
|
||||
Name string `json:"name"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Confirmation string `json:"confirmation"`
|
||||
SiteLinkURL string `json:"site_link_url"`
|
||||
PolicyLinkURL string `json:"policy_link_url"`
|
||||
Questions []struct {
|
||||
Type string `json:"type"`
|
||||
Key string `json:"key"`
|
||||
Label string `json:"label,omitempty"`
|
||||
Options []struct {
|
||||
Label string `json:"label"`
|
||||
Key string `json:"key"`
|
||||
} `json:"options,omitempty"`
|
||||
} `json:"questions"`
|
||||
Active int `json:"active"`
|
||||
LeadsCount int `json:"leads_count"`
|
||||
PixelCode string `json:"pixel_code"`
|
||||
OncePerUser int `json:"once_per_user"`
|
||||
NotifyAdmins string `json:"notify_admins"`
|
||||
NotifyEmails string `json:"notify_emails"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// LeadFormsLead struct.
|
||||
type LeadFormsLead struct {
|
||||
LeadID string `json:"lead_id"`
|
||||
UserID string `json:"user_id"`
|
||||
Date string `json:"date"`
|
||||
Answers []struct {
|
||||
Key string `json:"key"`
|
||||
Answer struct {
|
||||
Value string `json:"value"`
|
||||
} `json:"answer"`
|
||||
} `json:"answers"`
|
||||
AdID string `json:"ad_id"`
|
||||
}
|
55
vendor/github.com/SevereCloud/vksdk/v2/object/leads.go
generated
vendored
Normal file
55
vendor/github.com/SevereCloud/vksdk/v2/object/leads.go
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// LeadsChecked struct.
|
||||
type LeadsChecked struct {
|
||||
Reason string `json:"reason"` // Reason why user can't start the lead
|
||||
Result string `json:"result"`
|
||||
Sid string `json:"sid"` // Session ID
|
||||
StartLink string `json:"start_link"` // URL user should open to start the lead
|
||||
}
|
||||
|
||||
// LeadsComplete struct.
|
||||
type LeadsComplete struct {
|
||||
Cost int `json:"cost"` // Offer cost
|
||||
Limit int `json:"limit"` // Offer limit
|
||||
Spent int `json:"spent"` // Amount of spent votes
|
||||
Success BaseBoolInt `json:"success"`
|
||||
TestMode BaseBoolInt `json:"test_mode"` // Information whether test mode is enabled
|
||||
}
|
||||
|
||||
// LeadsEntry struct.
|
||||
type LeadsEntry struct {
|
||||
Aid int `json:"aid"` // Application ID
|
||||
Comment string `json:"comment"` // Comment text
|
||||
Date int `json:"date"` // Date when the action has been started in Unixtime
|
||||
Sid string `json:"sid"` // Session string ID
|
||||
StartDate int `json:"start_date"` // Start date in Unixtime (for status=2)
|
||||
Status int `json:"status"` // Action type
|
||||
TestMode BaseBoolInt `json:"test_mode"` // Information whether test mode is enabled
|
||||
UID int `json:"uid"` // User ID
|
||||
}
|
||||
|
||||
// LeadsLead struct.
|
||||
type LeadsLead struct {
|
||||
Completed int `json:"completed"` // Completed offers number
|
||||
Cost int `json:"cost"` // Offer cost
|
||||
Days LeadsLeadDays `json:"days"`
|
||||
Impressions int `json:"impressions"` // Impressions number
|
||||
Limit int `json:"limit"` // Lead limit
|
||||
Spent int `json:"spent"` // Amount of spent votes
|
||||
Started int `json:"started"` // Started offers number
|
||||
}
|
||||
|
||||
// LeadsLeadDays struct.
|
||||
type LeadsLeadDays struct {
|
||||
Completed int `json:"completed"` // Completed offers number
|
||||
Impressions int `json:"impressions"` // Impressions number
|
||||
Spent int `json:"spent"` // Amount of spent votes
|
||||
Started int `json:"started"` // Started offers number
|
||||
}
|
||||
|
||||
// LeadsStart struct.
|
||||
type LeadsStart struct {
|
||||
TestMode BaseBoolInt `json:"test_mode"` // Information whether test mode is enabled
|
||||
VkSid string `json:"vk_sid"` // Session data
|
||||
}
|
244
vendor/github.com/SevereCloud/vksdk/v2/object/market.go
generated
vendored
Normal file
244
vendor/github.com/SevereCloud/vksdk/v2/object/market.go
generated
vendored
Normal file
@ -0,0 +1,244 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Information whether the MarketMarketItem is available.
|
||||
const (
|
||||
MarketItemAvailable = iota
|
||||
MarketItemRemoved
|
||||
MarketItemUnavailable
|
||||
)
|
||||
|
||||
// MarketCurrency struct.
|
||||
type MarketCurrency struct {
|
||||
ID int `json:"id"` // Currency ID
|
||||
Name string `json:"name"` // Currency sign
|
||||
}
|
||||
|
||||
// MarketMarketAlbum struct.
|
||||
type MarketMarketAlbum struct {
|
||||
Count int `json:"count"` // Items number
|
||||
ID int `json:"id"` // Market album ID
|
||||
OwnerID int `json:"owner_id"` // Market album owner's ID
|
||||
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
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (marketAlbum MarketMarketAlbum) ToAttachment() string {
|
||||
return fmt.Sprintf("market_album%d_%d", marketAlbum.OwnerID, marketAlbum.ID)
|
||||
}
|
||||
|
||||
// MarketMarketCategory struct.
|
||||
type MarketMarketCategory struct {
|
||||
ID int `json:"id"` // Category ID
|
||||
Name string `json:"name"` // Category name
|
||||
Section MarketSection `json:"section"`
|
||||
}
|
||||
|
||||
// MarketMarketItem struct.
|
||||
type MarketMarketItem struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the market item
|
||||
Availability int `json:"availability"` // Information whether the item is available
|
||||
Category MarketMarketCategory `json:"category"`
|
||||
|
||||
// Date when the item has been created in Unixtime.
|
||||
Date int `json:"date,omitempty"`
|
||||
Description string `json:"description"` // Item description
|
||||
ID int `json:"id"` // Item ID
|
||||
OwnerID int `json:"owner_id"` // Item owner's ID
|
||||
Price MarketPrice `json:"price"`
|
||||
ThumbPhoto string `json:"thumb_photo"` // URL of the preview image
|
||||
Title string `json:"title"` // Item title
|
||||
CanComment BaseBoolInt `json:"can_comment"`
|
||||
CanRepost BaseBoolInt `json:"can_repost"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
IsMainVariant BaseBoolInt `json:"is_main_variant"`
|
||||
AlbumsIDs []int `json:"albums_ids"`
|
||||
Photos []PhotosPhoto `json:"photos"`
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
Reposts BaseRepostsInfo `json:"reposts"`
|
||||
ViewsCount int `json:"views_count,omitempty"`
|
||||
URL string `json:"url"` // URL to item
|
||||
ButtonTitle string `json:"button_title"`
|
||||
ExternalID string `json:"external_id"`
|
||||
Dimensions MarketDimensions `json:"dimensions"`
|
||||
Weight int `json:"weight"`
|
||||
VariantsGroupingID int `json:"variants_grouping_id"`
|
||||
PropertyValues []MarketMarketItemProperty `json:"property_values"`
|
||||
CartQuantity int `json:"cart_quantity"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON MarketMarketItem.
|
||||
//
|
||||
// BUG(VK): https://github.com/SevereCloud/vksdk/issues/147
|
||||
func (market *MarketMarketItem) UnmarshalJSON(data []byte) error {
|
||||
if bytes.Equal(data, []byte("false")) {
|
||||
return nil
|
||||
}
|
||||
|
||||
type renamedMarketMarketItem MarketMarketItem
|
||||
|
||||
var r renamedMarketMarketItem
|
||||
|
||||
err := json.Unmarshal(data, &r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*market = MarketMarketItem(r)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarketMarketItemProperty struct.
|
||||
type MarketMarketItemProperty struct {
|
||||
VariantID int `json:"variant_id"`
|
||||
VariantName string `json:"variant_name"`
|
||||
PropertyName string `json:"property_name"`
|
||||
}
|
||||
|
||||
// MarketDimensions struct.
|
||||
type MarketDimensions struct {
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
Length int `json:"length"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (market MarketMarketItem) ToAttachment() string {
|
||||
return fmt.Sprintf("market%d_%d", market.OwnerID, market.ID)
|
||||
}
|
||||
|
||||
// MarketPrice struct.
|
||||
type MarketPrice struct {
|
||||
Amount string `json:"amount"` // Amount
|
||||
Currency MarketCurrency `json:"currency"`
|
||||
DiscountRate int `json:"discount_rate"`
|
||||
OldAmount string `json:"old_amount"`
|
||||
Text string `json:"text"` // Text
|
||||
OldAmountText string `json:"old_amount_text"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON MarketPrice.
|
||||
//
|
||||
// BUG(VK): unavailable product, in fave.get return [].
|
||||
func (m *MarketPrice) UnmarshalJSON(data []byte) error {
|
||||
if bytes.Equal(data, []byte("[]")) {
|
||||
return nil
|
||||
}
|
||||
|
||||
type renamedMarketPrice MarketPrice
|
||||
|
||||
var r renamedMarketPrice
|
||||
|
||||
err := json.Unmarshal(data, &r)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*m = MarketPrice(r)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarketSection struct.
|
||||
type MarketSection struct {
|
||||
ID int `json:"id"` // Section ID
|
||||
Name string `json:"name"` // Section name
|
||||
}
|
||||
|
||||
// MarketOrderStatus order status.
|
||||
type MarketOrderStatus int
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
MarketOrderNew MarketOrderStatus = iota
|
||||
MarketOrderPending
|
||||
MarketOrderProcessing
|
||||
MarketOrderShipped
|
||||
MarketOrderComplete
|
||||
MarketOrderCanceled
|
||||
MarketOrderRefund
|
||||
)
|
||||
|
||||
// MarketOrder struct.
|
||||
type MarketOrder struct {
|
||||
ID int `json:"id"`
|
||||
GroupID int `json:"group_id"`
|
||||
UserID int `json:"user_id"`
|
||||
Date int `json:"date"`
|
||||
Status MarketOrderStatus `json:"status"`
|
||||
ItemsCount int `json:"items_count"`
|
||||
TotalPrice MarketPrice `json:"total_price"`
|
||||
DisplayOrderID string `json:"display_order_id"`
|
||||
Comment string `json:"comment"`
|
||||
PreviewOrderItems []MarketOrderItem `json:"preview_order_items"`
|
||||
PriceDetails []MarketPriceDetail `json:"price_details"`
|
||||
Delivery MarketOrderDelivery `json:"delivery"`
|
||||
Recipient MarketOrderRecipient `json:"recipient"`
|
||||
}
|
||||
|
||||
// MarketOrderDelivery struct.
|
||||
type MarketOrderDelivery struct {
|
||||
TrackNumber string `json:"track_number"`
|
||||
TrackLink string `json:"track_link"`
|
||||
Address string `json:"address"`
|
||||
Type string `json:"type"`
|
||||
DeliveryPoint MarketDeliveryPoint `json:"delivery_point,omitempty"`
|
||||
}
|
||||
|
||||
// MarketDeliveryPoint struct.
|
||||
type MarketDeliveryPoint struct {
|
||||
ID int `json:"id"`
|
||||
ExternalID string `json:"external_id"`
|
||||
OutpostOnly BaseBoolInt `json:"outpost_only"`
|
||||
CashOnly BaseBoolInt `json:"cash_only"`
|
||||
Address MarketDeliveryPointAddress `json:"address"`
|
||||
DisplayTitle string `json:"display_title"`
|
||||
ServiceID int `json:"service_id"`
|
||||
}
|
||||
|
||||
// MarketDeliveryPointAddress struct.
|
||||
type MarketDeliveryPointAddress struct {
|
||||
ID int `json:"id"`
|
||||
Address string `json:"address"`
|
||||
CityID int `json:"city_id"`
|
||||
CountryID int `json:"country_id"`
|
||||
Latitude float64 `json:"latitude"`
|
||||
Longitude float64 `json:"longitude"`
|
||||
Phone string `json:"phone"`
|
||||
Title string `json:"title"`
|
||||
WorkInfoStatus string `json:"work_info_status"`
|
||||
}
|
||||
|
||||
// MarketOrderRecipient struct.
|
||||
type MarketOrderRecipient struct {
|
||||
Name string `json:"name"`
|
||||
Phone string `json:"phone"`
|
||||
DisplayText string `json:"display_text"`
|
||||
}
|
||||
|
||||
// MarketOrderItem struct.
|
||||
type MarketOrderItem struct {
|
||||
OwnerID int `json:"owner_id"`
|
||||
ItemID int `json:"item_id"`
|
||||
Price MarketPrice `json:"price"`
|
||||
Quantity int `json:"quantity"`
|
||||
Item MarketMarketItem `json:"item"`
|
||||
Title string `json:"title"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Variants []string `json:"variants"`
|
||||
}
|
||||
|
||||
// MarketPriceDetail struct.
|
||||
type MarketPriceDetail struct {
|
||||
Title string `json:"title"`
|
||||
Price MarketPrice `json:"price"`
|
||||
IsAccent BaseBoolInt `json:"is_accent,omitempty"`
|
||||
}
|
756
vendor/github.com/SevereCloud/vksdk/v2/object/messages.go
generated
vendored
Normal file
756
vendor/github.com/SevereCloud/vksdk/v2/object/messages.go
generated
vendored
Normal file
@ -0,0 +1,756 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// MessagesAudioMessage struct.
|
||||
type MessagesAudioMessage struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the document
|
||||
ID int `json:"id"` // Document ID
|
||||
OwnerID int `json:"owner_id"` // Document owner ID
|
||||
Duration int `json:"duration"` // Audio message duration in seconds
|
||||
LinkMp3 string `json:"link_mp3"` // MP3 file URL
|
||||
LinkOgg string `json:"link_ogg"` // OGG file URL
|
||||
Waveform []int `json:"waveform"` // Sound visualisation
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (doc MessagesAudioMessage) ToAttachment() string {
|
||||
return fmt.Sprintf("doc%d_%d", doc.OwnerID, doc.ID)
|
||||
}
|
||||
|
||||
// MessagesGraffiti struct.
|
||||
type MessagesGraffiti struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the document
|
||||
ID int `json:"id"` // Document ID
|
||||
OwnerID int `json:"owner_id"` // Document owner ID
|
||||
URL string `json:"url"` // Graffiti URL
|
||||
Width int `json:"width"` // Graffiti width
|
||||
Height int `json:"height"` // Graffiti height
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (doc MessagesGraffiti) ToAttachment() string {
|
||||
return fmt.Sprintf("doc%d_%d", doc.OwnerID, doc.ID)
|
||||
}
|
||||
|
||||
// MessagesMessage struct.
|
||||
type MessagesMessage struct {
|
||||
// Only for messages from community. Contains user ID of community admin,
|
||||
// who sent this message.
|
||||
AdminAuthorID int `json:"admin_author_id"`
|
||||
Action MessagesMessageAction `json:"action"`
|
||||
Attachments []MessagesMessageAttachment `json:"attachments"`
|
||||
|
||||
// Unique auto-incremented number for all messages with this peer.
|
||||
ConversationMessageID int `json:"conversation_message_id"`
|
||||
|
||||
// Date when the message has been sent in Unixtime.
|
||||
Date int `json:"date"`
|
||||
|
||||
// Message author's ID.
|
||||
FromID int `json:"from_id"`
|
||||
|
||||
// Forwarded messages.
|
||||
FwdMessages []MessagesMessage `json:"fwd_Messages"`
|
||||
ReplyMessage *MessagesMessage `json:"reply_message"`
|
||||
Geo BaseMessageGeo `json:"geo"`
|
||||
PinnedAt int `json:"pinned_at,omitempty"`
|
||||
ID int `json:"id"` // Message ID
|
||||
Deleted BaseBoolInt `json:"deleted"` // Is it an deleted message
|
||||
Important BaseBoolInt `json:"important"` // Is it an important message
|
||||
IsHidden BaseBoolInt `json:"is_hidden"`
|
||||
IsCropped BaseBoolInt `json:"is_cropped"`
|
||||
Out BaseBoolInt `json:"out"` // Information whether the message is outcoming
|
||||
WasListened BaseBoolInt `json:"was_listened,omitempty"`
|
||||
Keyboard MessagesKeyboard `json:"keyboard"`
|
||||
Template MessagesTemplate `json:"template"`
|
||||
Payload string `json:"payload"`
|
||||
PeerID int `json:"peer_id"` // Peer ID
|
||||
|
||||
// ID used for sending messages. It returned only for outgoing messages.
|
||||
RandomID int `json:"random_id"`
|
||||
Ref string `json:"ref"`
|
||||
RefSource string `json:"ref_source"`
|
||||
Text string `json:"text"` // Message text
|
||||
UpdateTime int `json:"update_time"` // Date when the message has been updated in Unixtime
|
||||
MembersCount int `json:"members_count"` // Members number
|
||||
ExpireTTL int `json:"expire_ttl"`
|
||||
}
|
||||
|
||||
// MessagesBasePayload struct.
|
||||
type MessagesBasePayload struct {
|
||||
ButtonType string `json:"button_type,omitempty"`
|
||||
Command string `json:"command,omitempty"`
|
||||
Payload string `json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
// Command for MessagesBasePayload.
|
||||
const (
|
||||
CommandNotSupportedButton = "not_supported_button"
|
||||
)
|
||||
|
||||
// MessagesKeyboard struct.
|
||||
type MessagesKeyboard struct {
|
||||
AuthorID int `json:"author_id,omitempty"` // Community or bot, which set this keyboard
|
||||
Buttons [][]MessagesKeyboardButton `json:"buttons"`
|
||||
OneTime BaseBoolInt `json:"one_time,omitempty"` // Should this keyboard disappear on first use
|
||||
Inline BaseBoolInt `json:"inline,omitempty"`
|
||||
}
|
||||
|
||||
// NewMessagesKeyboard returns a new MessagesKeyboard.
|
||||
func NewMessagesKeyboard(oneTime BaseBoolInt) *MessagesKeyboard {
|
||||
return &MessagesKeyboard{
|
||||
Buttons: [][]MessagesKeyboardButton{},
|
||||
OneTime: oneTime,
|
||||
}
|
||||
}
|
||||
|
||||
// NewMessagesKeyboardInline returns a new inline MessagesKeyboard.
|
||||
func NewMessagesKeyboardInline() *MessagesKeyboard {
|
||||
return &MessagesKeyboard{
|
||||
Buttons: [][]MessagesKeyboardButton{},
|
||||
Inline: true,
|
||||
}
|
||||
}
|
||||
|
||||
// AddRow add row in MessagesKeyboard.
|
||||
func (keyboard *MessagesKeyboard) AddRow() *MessagesKeyboard {
|
||||
if len(keyboard.Buttons) == 0 {
|
||||
keyboard.Buttons = make([][]MessagesKeyboardButton, 1)
|
||||
} else {
|
||||
row := make([]MessagesKeyboardButton, 0)
|
||||
keyboard.Buttons = append(keyboard.Buttons, row)
|
||||
}
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// AddTextButton add Text button in last row.
|
||||
func (keyboard *MessagesKeyboard) AddTextButton(label string, payload interface{}, color string) *MessagesKeyboard {
|
||||
b, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button := MessagesKeyboardButton{
|
||||
Action: MessagesKeyboardButtonAction{
|
||||
Type: ButtonText,
|
||||
Label: label,
|
||||
Payload: string(b),
|
||||
},
|
||||
Color: color,
|
||||
}
|
||||
|
||||
lastRow := len(keyboard.Buttons) - 1
|
||||
keyboard.Buttons[lastRow] = append(keyboard.Buttons[lastRow], button)
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// AddOpenLinkButton add Open Link button in last row.
|
||||
func (keyboard *MessagesKeyboard) AddOpenLinkButton(link, label string, payload interface{}) *MessagesKeyboard {
|
||||
b, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button := MessagesKeyboardButton{
|
||||
Action: MessagesKeyboardButtonAction{
|
||||
Type: ButtonOpenLink,
|
||||
Payload: string(b),
|
||||
Label: label,
|
||||
Link: link,
|
||||
},
|
||||
}
|
||||
|
||||
lastRow := len(keyboard.Buttons) - 1
|
||||
keyboard.Buttons[lastRow] = append(keyboard.Buttons[lastRow], button)
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// AddLocationButton add Location button in last row.
|
||||
func (keyboard *MessagesKeyboard) AddLocationButton(payload interface{}) *MessagesKeyboard {
|
||||
b, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button := MessagesKeyboardButton{
|
||||
Action: MessagesKeyboardButtonAction{
|
||||
Type: ButtonLocation,
|
||||
Payload: string(b),
|
||||
},
|
||||
}
|
||||
|
||||
lastRow := len(keyboard.Buttons) - 1
|
||||
keyboard.Buttons[lastRow] = append(keyboard.Buttons[lastRow], button)
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// AddVKPayButton add VK Pay button in last row.
|
||||
func (keyboard *MessagesKeyboard) AddVKPayButton(payload interface{}, hash string) *MessagesKeyboard {
|
||||
b, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button := MessagesKeyboardButton{
|
||||
Action: MessagesKeyboardButtonAction{
|
||||
Type: ButtonVKPay,
|
||||
Payload: string(b),
|
||||
Hash: hash,
|
||||
},
|
||||
}
|
||||
|
||||
lastRow := len(keyboard.Buttons) - 1
|
||||
keyboard.Buttons[lastRow] = append(keyboard.Buttons[lastRow], button)
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// AddVKAppsButton add VK Apps button in last row.
|
||||
func (keyboard *MessagesKeyboard) AddVKAppsButton(
|
||||
appID, ownerID int,
|
||||
payload interface{},
|
||||
label, hash string,
|
||||
) *MessagesKeyboard {
|
||||
b, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button := MessagesKeyboardButton{
|
||||
Action: MessagesKeyboardButtonAction{
|
||||
Type: ButtonVKApp,
|
||||
AppID: appID,
|
||||
OwnerID: ownerID,
|
||||
Payload: string(b),
|
||||
Label: label,
|
||||
Hash: hash,
|
||||
},
|
||||
}
|
||||
|
||||
lastRow := len(keyboard.Buttons) - 1
|
||||
keyboard.Buttons[lastRow] = append(keyboard.Buttons[lastRow], button)
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// AddCallbackButton add Callback button in last row.
|
||||
func (keyboard *MessagesKeyboard) AddCallbackButton(label string, payload interface{}, color string) *MessagesKeyboard {
|
||||
b, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
button := MessagesKeyboardButton{
|
||||
Action: MessagesKeyboardButtonAction{
|
||||
Type: ButtonCallback,
|
||||
Label: label,
|
||||
Payload: string(b),
|
||||
},
|
||||
Color: color,
|
||||
}
|
||||
|
||||
lastRow := len(keyboard.Buttons) - 1
|
||||
keyboard.Buttons[lastRow] = append(keyboard.Buttons[lastRow], button)
|
||||
|
||||
return keyboard
|
||||
}
|
||||
|
||||
// ToJSON returns the JSON encoding of MessagesKeyboard.
|
||||
func (keyboard MessagesKeyboard) ToJSON() string {
|
||||
b, _ := json.Marshal(keyboard)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// MessagesKeyboardButton struct.
|
||||
type MessagesKeyboardButton struct {
|
||||
Action MessagesKeyboardButtonAction `json:"action"`
|
||||
Color string `json:"color,omitempty"` // Button color
|
||||
}
|
||||
|
||||
// MessagesKeyboardButtonAction struct.
|
||||
type MessagesKeyboardButtonAction struct {
|
||||
AppID int `json:"app_id,omitempty"` // Fragment value in app link like vk.com/app{app_id}_-654321#hash
|
||||
Hash string `json:"hash,omitempty"` // Fragment value in app link like vk.com/app123456_-654321#{hash}
|
||||
Label string `json:"label,omitempty"` // Label for button
|
||||
OwnerID int `json:"owner_id,omitempty"` // Fragment value in app link like vk.com/app123456_{owner_id}#hash
|
||||
Payload string `json:"payload,omitempty"` // Additional data sent along with message for developer convenience
|
||||
Type string `json:"type"` // Button type
|
||||
Link string `json:"link,omitempty"` // Link URL
|
||||
}
|
||||
|
||||
// MessagesEventDataShowSnackbar struct.
|
||||
type MessagesEventDataShowSnackbar struct {
|
||||
Text string `json:"text,omitempty"`
|
||||
}
|
||||
|
||||
// MessagesEventDataOpenLink struct.
|
||||
type MessagesEventDataOpenLink struct {
|
||||
Link string `json:"link,omitempty"`
|
||||
}
|
||||
|
||||
// MessagesEventDataOpenApp struct.
|
||||
type MessagesEventDataOpenApp struct {
|
||||
AppID int `json:"app_id,omitempty"`
|
||||
OwnerID int `json:"owner_id,omitempty"`
|
||||
Hash string `json:"hash,omitempty"`
|
||||
}
|
||||
|
||||
// MessagesEventData struct.
|
||||
type MessagesEventData struct {
|
||||
Type string `json:"type"`
|
||||
MessagesEventDataShowSnackbar
|
||||
MessagesEventDataOpenLink
|
||||
MessagesEventDataOpenApp
|
||||
}
|
||||
|
||||
// NewMessagesEventDataShowSnackbar show disappearing message.
|
||||
//
|
||||
// Contains the field text - the text you want to print
|
||||
// (maximum 90 characters). Snackbar is shown for 10 seconds and automatically
|
||||
// hides, while the user has the ability to flick it off the screen.
|
||||
func NewMessagesEventDataShowSnackbar(text string) *MessagesEventData {
|
||||
return &MessagesEventData{
|
||||
Type: "show_snackbar",
|
||||
MessagesEventDataShowSnackbar: MessagesEventDataShowSnackbar{
|
||||
Text: text,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewMessagesEventDataOpenLink open the link. Click on the specified address.
|
||||
func NewMessagesEventDataOpenLink(link string) *MessagesEventData {
|
||||
return &MessagesEventData{
|
||||
Type: "open_link",
|
||||
MessagesEventDataOpenLink: MessagesEventDataOpenLink{
|
||||
Link: link,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewMessagesEventDataOpenApp open the link. Click on the specified address.
|
||||
func NewMessagesEventDataOpenApp(appID, ownerID int, hash string) *MessagesEventData {
|
||||
return &MessagesEventData{
|
||||
Type: "open_app",
|
||||
MessagesEventDataOpenApp: MessagesEventDataOpenApp{
|
||||
AppID: appID,
|
||||
OwnerID: ownerID,
|
||||
Hash: hash,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ToJSON returns the JSON encoding of MessagesEventData.
|
||||
func (eventData MessagesEventData) ToJSON() string {
|
||||
b, _ := json.Marshal(eventData)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// MessagesTemplate struct.
|
||||
//
|
||||
// https://vk.com/dev/bot_docs_templates
|
||||
type MessagesTemplate struct {
|
||||
Type string `json:"type"`
|
||||
Elements []MessagesTemplateElement `json:"elements"`
|
||||
}
|
||||
|
||||
// ToJSON returns the JSON encoding of MessagesKeyboard.
|
||||
func (template MessagesTemplate) ToJSON() string {
|
||||
b, _ := json.Marshal(template)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// MessagesTemplateElement struct.
|
||||
type MessagesTemplateElement struct {
|
||||
MessagesTemplateElementCarousel
|
||||
}
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
||||
// MessagesTemplateElementCarouselAction struct.
|
||||
type MessagesTemplateElementCarouselAction struct {
|
||||
Type string `json:"type"`
|
||||
Link string `json:"link"`
|
||||
}
|
||||
|
||||
// MessageContentSourceMessage ...
|
||||
type MessageContentSourceMessage struct {
|
||||
OwnerID int `json:"owner_id,omitempty"`
|
||||
PeerID int `json:"peer_id,omitempty"`
|
||||
ConversationMessageID int `json:"conversation_message_id,omitempty"`
|
||||
}
|
||||
|
||||
// MessageContentSourceURL ...
|
||||
type MessageContentSourceURL struct {
|
||||
URL string `json:"url,omitempty"`
|
||||
}
|
||||
|
||||
// MessageContentSource struct.
|
||||
//
|
||||
// https://vk.com/dev/bots_docs_2
|
||||
type MessageContentSource struct {
|
||||
Type string `json:"type"`
|
||||
MessageContentSourceMessage // type message
|
||||
MessageContentSourceURL // type url
|
||||
|
||||
}
|
||||
|
||||
// NewMessageContentSourceMessage ...
|
||||
func NewMessageContentSourceMessage(ownerID, peerID, conversationMessageID int) *MessageContentSource {
|
||||
return &MessageContentSource{
|
||||
Type: "message",
|
||||
MessageContentSourceMessage: MessageContentSourceMessage{
|
||||
OwnerID: ownerID,
|
||||
PeerID: peerID,
|
||||
ConversationMessageID: conversationMessageID,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// NewMessageContentSourceURL ...
|
||||
func NewMessageContentSourceURL(u string) *MessageContentSource {
|
||||
return &MessageContentSource{
|
||||
Type: "url",
|
||||
MessageContentSourceURL: MessageContentSourceURL{
|
||||
URL: u,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// ToJSON returns the JSON encoding of MessageContentSource.
|
||||
func (contentSource MessageContentSource) ToJSON() string {
|
||||
b, _ := json.Marshal(contentSource)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// MessagesChat struct.
|
||||
type MessagesChat struct {
|
||||
AdminID int `json:"admin_id"` // Chat creator ID
|
||||
ID int `json:"id"` // Chat ID
|
||||
IsDefaultPhoto BaseBoolInt `json:"is_default_photo"`
|
||||
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
|
||||
Title string `json:"title"` // Chat title
|
||||
Type string `json:"type"` // Chat type
|
||||
Users []int `json:"users"`
|
||||
MembersCount int `json:"members_count"`
|
||||
}
|
||||
|
||||
// MessagesChatPreview struct.
|
||||
type MessagesChatPreview struct {
|
||||
AdminID int `json:"admin_id"`
|
||||
MembersCount int `json:"members_count"`
|
||||
Members []int `json:"members"`
|
||||
Title string `json:"title"`
|
||||
Photo MessagesChatSettingsPhoto `json:"photo"`
|
||||
LocalID int `json:"local_id"`
|
||||
Joined bool `json:"joined"`
|
||||
ChatSettings MessagesConversationChatSettings `json:"chat_settings"`
|
||||
}
|
||||
|
||||
// MessagesChatPushSettings struct.
|
||||
type MessagesChatPushSettings struct {
|
||||
DisabledUntil int `json:"disabled_until"` // Time until that notifications are disabled
|
||||
Sound BaseBoolInt `json:"sound"` // Information whether the sound is on
|
||||
}
|
||||
|
||||
// MessagesChatSettingsPhoto struct.
|
||||
type MessagesChatSettingsPhoto struct {
|
||||
Photo100 string `json:"photo_100"`
|
||||
Photo200 string `json:"photo_200"`
|
||||
Photo50 string `json:"photo_50"`
|
||||
IsDefaultPhoto BaseBoolInt `json:"is_default_photo"`
|
||||
}
|
||||
|
||||
// MessagesConversation struct.
|
||||
type MessagesConversation struct {
|
||||
CanWrite MessagesConversationCanWrite `json:"can_write"`
|
||||
ChatSettings MessagesConversationChatSettings `json:"chat_settings"`
|
||||
InRead int `json:"in_read"` // Last message user have read
|
||||
LastMessageID int `json:"last_message_id"` // ID of the last message in conversation
|
||||
Mentions []int `json:"mentions"` // IDs of messages with mentions
|
||||
MessageRequest string `json:"message_request"`
|
||||
|
||||
// Last outcoming message have been read by the opponent.
|
||||
OutRead int `json:"out_read"`
|
||||
Peer MessagesConversationPeer `json:"peer"`
|
||||
PushSettings MessagesConversationPushSettings `json:"push_settings"`
|
||||
Important BaseBoolInt `json:"important"`
|
||||
Unanswered BaseBoolInt `json:"unanswered"`
|
||||
IsMarkedUnread BaseBoolInt `json:"is_marked_unread"`
|
||||
UnreadCount int `json:"unread_count"` // Unread messages number
|
||||
CurrentKeyboard MessagesKeyboard `json:"current_keyboard"`
|
||||
SortID struct {
|
||||
MajorID int `json:"major_id"`
|
||||
MinorID int `json:"minor_id"`
|
||||
} `json:"sort_id"`
|
||||
}
|
||||
|
||||
// MessagesConversationCanWrite struct.
|
||||
type MessagesConversationCanWrite struct {
|
||||
Allowed BaseBoolInt `json:"allowed"`
|
||||
Reason int `json:"reason"`
|
||||
}
|
||||
|
||||
// MessagesConversationChatSettings struct.
|
||||
type MessagesConversationChatSettings struct {
|
||||
MembersCount int `json:"members_count"`
|
||||
Photo MessagesChatSettingsPhoto `json:"photo"`
|
||||
PinnedMessage MessagesPinnedMessage `json:"pinned_message"`
|
||||
State string `json:"state"`
|
||||
Title string `json:"title"`
|
||||
ActiveIDs []int `json:"active_ids"`
|
||||
ACL struct {
|
||||
CanInvite BaseBoolInt `json:"can_invite"`
|
||||
CanChangeInfo BaseBoolInt `json:"can_change_info"`
|
||||
CanChangePin BaseBoolInt `json:"can_change_pin"`
|
||||
CanPromoteUsers BaseBoolInt `json:"can_promote_users"`
|
||||
CanSeeInviteLink BaseBoolInt `json:"can_see_invite_link"`
|
||||
CanChangeInviteLink BaseBoolInt `json:"can_change_invite_link"`
|
||||
CanCopyChat BaseBoolInt `json:"can_copy_chat"`
|
||||
CanModerate BaseBoolInt `json:"can_moderate"`
|
||||
CanCall BaseBoolInt `json:"can_call"`
|
||||
CanUseMassMentions BaseBoolInt `json:"can_use_mass_mentions"`
|
||||
CanChangeServiceType BaseBoolInt `json:"can_change_service_type"`
|
||||
} `json:"acl"`
|
||||
IsGroupChannel BaseBoolInt `json:"is_group_channel"`
|
||||
IsDisappearing BaseBoolInt `json:"is_disappearing"`
|
||||
IsService BaseBoolInt `json:"is_service"`
|
||||
IsCreatedForCall BaseBoolInt `json:"is_created_for_call"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
AdminIDs []int `json:"admin_ids"`
|
||||
Permissions MessagesChatPermissions `json:"permissions"`
|
||||
}
|
||||
|
||||
// MessagesChatPermission struct.
|
||||
type MessagesChatPermission string
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
OwnerChatPermission MessagesChatPermission = "owner"
|
||||
OwnerAndAdminsChatPermission MessagesChatPermission = "owner_and_admins"
|
||||
AllChatPermission MessagesChatPermission = "all"
|
||||
)
|
||||
|
||||
// MessagesChatPermissions struct.
|
||||
type MessagesChatPermissions struct {
|
||||
Invite MessagesChatPermission `json:"invite"`
|
||||
ChangeInfo MessagesChatPermission `json:"change_info"`
|
||||
ChangePin MessagesChatPermission `json:"change_pin"`
|
||||
UseMassMentions MessagesChatPermission `json:"use_mass_mentions"`
|
||||
SeeInviteLink MessagesChatPermission `json:"see_invite_link"`
|
||||
Call MessagesChatPermission `json:"call"`
|
||||
ChangeAdmins MessagesChatPermission `json:"change_admins"`
|
||||
}
|
||||
|
||||
// MessagesConversationPeer struct.
|
||||
type MessagesConversationPeer struct {
|
||||
ID int `json:"id"`
|
||||
LocalID int `json:"local_id"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// MessagesConversationPushSettings struct.
|
||||
type MessagesConversationPushSettings struct {
|
||||
DisabledUntil int `json:"disabled_until"`
|
||||
DisabledForever BaseBoolInt `json:"disabled_forever"`
|
||||
NoSound BaseBoolInt `json:"no_sound"`
|
||||
}
|
||||
|
||||
// MessagesConversationWithMessage struct.
|
||||
type MessagesConversationWithMessage struct {
|
||||
Conversation MessagesConversation `json:"conversation"`
|
||||
// BUG(VK): https://vk.com/bug229134
|
||||
LastMessage MessagesMessage `json:"last_message"`
|
||||
}
|
||||
|
||||
// MessagesDialog struct.
|
||||
type MessagesDialog struct {
|
||||
Important int `json:"important"`
|
||||
InRead int `json:"in_read"`
|
||||
Message MessagesMessage `json:"message"`
|
||||
OutRead int `json:"out_read"`
|
||||
Unanswered int `json:"unanswered"`
|
||||
Unread int `json:"unread"`
|
||||
}
|
||||
|
||||
// MessagesHistoryAttachment struct.
|
||||
type MessagesHistoryAttachment struct {
|
||||
Attachment MessagesHistoryMessageAttachment `json:"attachment"`
|
||||
MessageID int `json:"message_id"` // Message ID
|
||||
FromID int `json:"from_id"`
|
||||
}
|
||||
|
||||
// MessagesHistoryMessageAttachment struct.
|
||||
type MessagesHistoryMessageAttachment struct {
|
||||
Audio AudioAudio `json:"audio"`
|
||||
Doc DocsDoc `json:"doc"`
|
||||
Link BaseLink `json:"link"`
|
||||
Market BaseLink `json:"market"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Share BaseLink `json:"share"`
|
||||
Type string `json:"type"`
|
||||
Video VideoVideo `json:"video"`
|
||||
Wall BaseLink `json:"wall"`
|
||||
}
|
||||
|
||||
// MessagesLastActivity struct.
|
||||
type MessagesLastActivity struct {
|
||||
Online BaseBoolInt `json:"online"` // Information whether user is online
|
||||
Time int `json:"time"` // Time when user was online in Unixtime
|
||||
}
|
||||
|
||||
// MessagesLongPollParams struct.
|
||||
type MessagesLongPollParams struct {
|
||||
Key string `json:"key"` // Key
|
||||
Pts int `json:"pts"` // Persistent timestamp
|
||||
Server string `json:"server"` // Server URL
|
||||
Ts int `json:"ts"` // Timestamp
|
||||
}
|
||||
|
||||
// MessagesMessageAction status.
|
||||
const (
|
||||
ChatPhotoUpdate = "chat_photo_update"
|
||||
ChatPhotoRemove = "chat_photo_remove"
|
||||
ChatCreate = "chat_create"
|
||||
ChatTitleUpdate = "chat_title_update"
|
||||
ChatInviteUser = "chat_invite_user"
|
||||
ChatKickUser = "chat_kick_user"
|
||||
ChatPinMessage = "chat_pin_message"
|
||||
ChatUnpinMessage = "chat_unpin_message"
|
||||
ChatInviteUserByLink = "chat_invite_user_by_link"
|
||||
AcceptedMessageRequest = "accepted_message_request"
|
||||
)
|
||||
|
||||
// MessagesMessageAction struct.
|
||||
type MessagesMessageAction struct {
|
||||
ConversationMessageID int `json:"conversation_message_id"` // Message ID
|
||||
|
||||
// Email address for chat_invite_user or chat_kick_user actions.
|
||||
Email string `json:"email"`
|
||||
MemberID int `json:"member_id"` // User or email peer ID
|
||||
Message string `json:"message"` // Message body of related message
|
||||
Photo MessagesMessageActionPhoto `json:"photo"`
|
||||
|
||||
// New chat title for chat_create and chat_title_update actions.
|
||||
Text string `json:"text"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// MessagesMessageActionPhoto struct.
|
||||
type MessagesMessageActionPhoto struct {
|
||||
Photo100 string `json:"photo_100"` // URL of the preview image with 100px in width
|
||||
Photo200 string `json:"photo_200"` // URL of the preview image with 200px in width
|
||||
Photo50 string `json:"photo_50"` // URL of the preview image with 50px in width
|
||||
}
|
||||
|
||||
// MessagesMessageAttachment struct.
|
||||
type MessagesMessageAttachment struct {
|
||||
Audio AudioAudio `json:"audio"`
|
||||
Doc DocsDoc `json:"doc"`
|
||||
Gift GiftsLayout `json:"gift"`
|
||||
Link BaseLink `json:"link"`
|
||||
Market MarketMarketItem `json:"market"`
|
||||
MarketMarketAlbum MarketMarketAlbum `json:"market_market_album"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Sticker BaseSticker `json:"sticker"`
|
||||
Type string `json:"type"`
|
||||
Video VideoVideo `json:"video"`
|
||||
Wall WallWallpost `json:"wall"`
|
||||
WallReply WallWallComment `json:"wall_reply"`
|
||||
AudioMessage DocsDoc `json:"audio_message"`
|
||||
Graffiti DocsDoc `json:"graffiti"`
|
||||
Poll PollsPoll `json:"poll"`
|
||||
Call MessageCall `json:"call"`
|
||||
Story StoriesStory `json:"story"`
|
||||
Podcast PodcastsEpisode `json:"podcast"`
|
||||
}
|
||||
|
||||
// State in which call ended up.
|
||||
//
|
||||
// TODO: v3 type CallEndState.
|
||||
const (
|
||||
CallEndStateCanceledByInitiator = "canceled_by_initiator"
|
||||
CallEndStateCanceledByReceiver = "canceled_by_receiver"
|
||||
CallEndStateReached = "reached"
|
||||
)
|
||||
|
||||
// MessageCall struct.
|
||||
type MessageCall struct {
|
||||
InitiatorID int `json:"initiator_id"`
|
||||
ReceiverID int `json:"receiver_id"`
|
||||
State string `json:"state"`
|
||||
Time int `json:"time"`
|
||||
Duration int `json:"duration"`
|
||||
Video BaseBoolInt `json:"video"`
|
||||
}
|
||||
|
||||
// MessagesPinnedMessage struct.
|
||||
type MessagesPinnedMessage struct {
|
||||
Attachments []MessagesMessageAttachment `json:"attachments"`
|
||||
|
||||
// Unique auto-incremented number for all Messages with this peer.
|
||||
ConversationMessageID int `json:"conversation_message_id"`
|
||||
|
||||
// Date when the message has been sent in Unixtime.
|
||||
Date int `json:"date"`
|
||||
|
||||
// Message author's ID.
|
||||
FromID int `json:"from_id"`
|
||||
FwdMessages []*MessagesMessage `json:"fwd_Messages"`
|
||||
Geo BaseMessageGeo `json:"geo"`
|
||||
ID int `json:"id"` // Message ID
|
||||
PeerID int `json:"peer_id"` // Peer ID
|
||||
ReplyMessage *MessagesMessage `json:"reply_message"`
|
||||
Text string `json:"text"` // Message text
|
||||
}
|
||||
|
||||
// MessagesUserXtrInvitedBy struct.
|
||||
type MessagesUserXtrInvitedBy struct {
|
||||
}
|
||||
|
||||
// MessagesForward struct.
|
||||
type MessagesForward struct {
|
||||
// Message owner. It is worth passing it on if you want to forward messages
|
||||
// from the community to a dialog.
|
||||
OwnerID int `json:"owner_id,omitempty"`
|
||||
|
||||
// Identifier of the place from which the messages are to be sent.
|
||||
PeerID int `json:"peer_id,omitempty"`
|
||||
|
||||
// Messages can be passed to conversation_message_ids array:
|
||||
//
|
||||
// - that are in a personal dialog with the bot;
|
||||
//
|
||||
// - which are outbound messages from the bot;
|
||||
//
|
||||
// - written after the bot has entered the conversation.
|
||||
ConversationMessageIDs []int `json:"conversation_message_ids,omitempty"`
|
||||
MessageIDs []int `json:"message_ids,omitempty"`
|
||||
|
||||
// Reply to messages. It is worth passing if you want to reply to messages
|
||||
// in the chat room where the messages are. In this case there should be
|
||||
// only one element in the conversation_message_ids/message_ids.
|
||||
IsReply bool `json:"is_reply,omitempty"`
|
||||
}
|
||||
|
||||
// ToJSON returns the JSON encoding of MessagesForward.
|
||||
func (forward MessagesForward) ToJSON() string {
|
||||
b, _ := json.Marshal(forward)
|
||||
return string(b)
|
||||
}
|
187
vendor/github.com/SevereCloud/vksdk/v2/object/newsfeed.go
generated
vendored
Normal file
187
vendor/github.com/SevereCloud/vksdk/v2/object/newsfeed.go
generated
vendored
Normal file
@ -0,0 +1,187 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// NewsfeedEventActivity struct.
|
||||
type NewsfeedEventActivity struct {
|
||||
Address string `json:"address"` // address of event
|
||||
ButtonText string `json:"button_text"` // text of attach
|
||||
Friends []int `json:"friends"` // array of friends ids
|
||||
MemberStatus int `json:"member_status"` // Current user's member status
|
||||
Text string `json:"text"` // text of attach
|
||||
Time int `json:"time"` // event start time
|
||||
}
|
||||
|
||||
// NewsfeedItemAudio struct.
|
||||
type NewsfeedItemAudio struct {
|
||||
Audio NewsfeedItemAudioAudio `json:"audio"`
|
||||
}
|
||||
|
||||
// NewsfeedItemAudioAudio struct.
|
||||
type NewsfeedItemAudioAudio struct {
|
||||
Count int `json:"count"` // Audios number
|
||||
Items []AudioAudio `json:"items"`
|
||||
}
|
||||
|
||||
// NewsfeedItemDigest struct.
|
||||
type NewsfeedItemDigest struct {
|
||||
ButtonText string `json:"button_text"`
|
||||
FeedID string `json:"feed_id"` // id of feed in digest
|
||||
Items []WallWallpost `json:"items"`
|
||||
MainPostIDs []string `json:"main_post_ids"`
|
||||
Template string `json:"template"` // type of digest
|
||||
Title string `json:"title"`
|
||||
TrackCode string `json:"track_code"`
|
||||
// Type string `json:"type"`
|
||||
}
|
||||
|
||||
// NewsfeedItemFriend struct.
|
||||
type NewsfeedItemFriend struct {
|
||||
Friends NewsfeedItemFriendFriends `json:"friends"`
|
||||
}
|
||||
|
||||
// NewsfeedItemFriendFriends struct.
|
||||
type NewsfeedItemFriendFriends struct {
|
||||
Count int `json:"count"` // Number of friends has been added
|
||||
Items []BaseUserID `json:"items"`
|
||||
}
|
||||
|
||||
// NewsfeedItemNote struct.
|
||||
type NewsfeedItemNote struct {
|
||||
Notes NewsfeedItemNoteNotes `json:"notes"`
|
||||
}
|
||||
|
||||
// NewsfeedItemNoteNotes struct.
|
||||
type NewsfeedItemNoteNotes struct {
|
||||
Count int `json:"count"` // Notes number
|
||||
Items []NewsfeedNewsfeedNote `json:"items"`
|
||||
}
|
||||
|
||||
// NewsfeedItemPhoto struct.
|
||||
type NewsfeedItemPhoto struct {
|
||||
Photos NewsfeedItemPhotoPhotos `json:"photos"`
|
||||
}
|
||||
|
||||
// NewsfeedItemPhotoPhotos struct.
|
||||
type NewsfeedItemPhotoPhotos struct {
|
||||
Count int `json:"count"` // Photos number
|
||||
Items []PhotosPhotoFull `json:"items"`
|
||||
}
|
||||
|
||||
// NewsfeedItemPhotoTag struct.
|
||||
type NewsfeedItemPhotoTag struct {
|
||||
PhotoTags NewsfeedItemPhotoTagPhotoTags `json:"photo_tags"`
|
||||
}
|
||||
|
||||
// NewsfeedItemPhotoTagPhotoTags struct.
|
||||
type NewsfeedItemPhotoTagPhotoTags struct {
|
||||
Count int `json:"count"` // Tags number
|
||||
Items []PhotosPhotoFull `json:"items"`
|
||||
}
|
||||
|
||||
// NewsfeedItemStoriesBlock struct.
|
||||
type NewsfeedItemStoriesBlock struct {
|
||||
BlockType string `json:"block_type"`
|
||||
Stories []StoriesStory `json:"stories"`
|
||||
// Title string `json:"title"`
|
||||
// TrackCode string `json:"track_code"`
|
||||
// Type string `json:"type"`
|
||||
}
|
||||
|
||||
// NewsfeedItemTopic struct.
|
||||
type NewsfeedItemTopic struct {
|
||||
// Comments BaseCommentsInfo `json:"comments"`
|
||||
// Likes BaseLikesInfo `json:"likes"`
|
||||
// Text string `json:"text"` // Post text
|
||||
}
|
||||
|
||||
// NewsfeedItemVideo struct.
|
||||
type NewsfeedItemVideo struct {
|
||||
Video NewsfeedItemVideoVideo `json:"video"`
|
||||
}
|
||||
|
||||
// NewsfeedItemVideoVideo struct.
|
||||
type NewsfeedItemVideoVideo struct {
|
||||
Count int `json:"count"` // Tags number
|
||||
Items []VideoVideo `json:"items"`
|
||||
}
|
||||
|
||||
// NewsfeedItemWallpost struct.
|
||||
type NewsfeedItemWallpost struct {
|
||||
Activity NewsfeedEventActivity `json:"activity"`
|
||||
Attachments []WallWallpostAttachment `json:"attachments"`
|
||||
Comments BaseCommentsInfo `json:"comments"`
|
||||
FromID int `json:"from_id"`
|
||||
CopyHistory []WallWallpost `json:"copy_history"`
|
||||
Geo BaseGeo `json:"geo"`
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
PostSource WallPostSource `json:"post_source"`
|
||||
PostType string `json:"post_type"`
|
||||
Reposts BaseRepostsInfo `json:"reposts"`
|
||||
MarkedAsAds int `json:"marked_as_ads,omitempty"`
|
||||
Views interface{} `json:"views,omitempty"` // BUG: Views int or wallViews
|
||||
IsFavorite BaseBoolInt `json:"is_favorite,omitempty"`
|
||||
CanDelete BaseBoolInt `json:"can_delete"`
|
||||
CanArchive BaseBoolInt `json:"can_archive"`
|
||||
IsArchived BaseBoolInt `json:"is_archived"`
|
||||
SignerID int `json:"signer_id,omitempty"`
|
||||
Text string `json:"text"` // Post text
|
||||
Copyright WallPostCopyright `json:"copyright"`
|
||||
CategoryAction NewsfeedCategoryAction `json:"category_action"`
|
||||
}
|
||||
|
||||
// NewsfeedCategoryAction struct.
|
||||
type NewsfeedCategoryAction struct {
|
||||
Action struct {
|
||||
Target string `json:"target"`
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"`
|
||||
} `json:"action"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// NewsfeedList struct.
|
||||
type NewsfeedList struct {
|
||||
ID int `json:"id"` // List ID
|
||||
Title string `json:"title"` // List title
|
||||
}
|
||||
|
||||
// NewsfeedItemMarket struct.
|
||||
type NewsfeedItemMarket struct {
|
||||
MarketMarketItem
|
||||
}
|
||||
|
||||
// NewsfeedNewsfeedItem struct.
|
||||
type NewsfeedNewsfeedItem struct {
|
||||
Type string `json:"type"`
|
||||
SourceID int `json:"source_id"`
|
||||
Date int `json:"date"`
|
||||
TopicID int `json:"topic_id"`
|
||||
|
||||
PostID int `json:"post_id,omitempty"`
|
||||
|
||||
NewsfeedItemWallpost
|
||||
NewsfeedItemPhoto
|
||||
NewsfeedItemPhotoTag
|
||||
NewsfeedItemFriend
|
||||
NewsfeedItemNote
|
||||
NewsfeedItemAudio
|
||||
NewsfeedItemTopic
|
||||
NewsfeedItemVideo
|
||||
NewsfeedItemDigest
|
||||
NewsfeedItemStoriesBlock
|
||||
NewsfeedItemMarket
|
||||
|
||||
CreatedBy int `json:"created_by,omitempty"`
|
||||
CanEdit BaseBoolInt `json:"can_edit,omitempty"`
|
||||
CanDelete BaseBoolInt `json:"can_delete,omitempty"`
|
||||
CanDoubtCategory BaseBoolInt `json:"can_doubt_category"`
|
||||
CanSetCategory BaseBoolInt `json:"can_set_category"`
|
||||
// TODO: Need more fields
|
||||
}
|
||||
|
||||
// NewsfeedNewsfeedNote struct.
|
||||
type NewsfeedNewsfeedNote struct {
|
||||
Comments int `json:"comments"` // Comments Number
|
||||
ID int `json:"id"` // Note ID
|
||||
OwnerID int `json:"owner_id"` // integer
|
||||
Title string `json:"title"` // Note title
|
||||
}
|
37
vendor/github.com/SevereCloud/vksdk/v2/object/notes.go
generated
vendored
Normal file
37
vendor/github.com/SevereCloud/vksdk/v2/object/notes.go
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// NotesNote struct.
|
||||
type NotesNote struct {
|
||||
CanComment BaseBoolInt `json:"can_comment"` // Information whether current user can comment the note
|
||||
Comments int `json:"comments"` // Comments number
|
||||
Date int `json:"date"` // Date when the note has been created in Unixtime
|
||||
ID int `json:"id"` // Note ID
|
||||
OwnerID int `json:"owner_id"` // Note owner's ID
|
||||
Text string `json:"text"` // Note text
|
||||
TextWiki string `json:"text_wiki"` // Note text in wiki format
|
||||
Title string `json:"title"` // Note title
|
||||
ViewURL string `json:"view_url"` // URL of the page with note preview
|
||||
ReadComments int `json:"read_comments"`
|
||||
PrivacyView []interface{} `json:"privacy_view"` // NOTE: old type privacy
|
||||
PrivacyComment []interface{} `json:"privacy_comment"` // NOTE: old type privacy
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (note NotesNote) ToAttachment() string {
|
||||
return fmt.Sprintf("note%d_%d", note.OwnerID, note.ID)
|
||||
}
|
||||
|
||||
// NotesNoteComment struct.
|
||||
type NotesNoteComment struct {
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
ID int `json:"id"` // Comment ID
|
||||
Message string `json:"message"` // Comment text
|
||||
NID int `json:"nid"` // Note ID
|
||||
OID int `json:"oid"` // Note ID
|
||||
ReplyTo int `json:"reply_to"` // ID of replied comment
|
||||
UID int `json:"uid"` // Comment author's ID
|
||||
}
|
42
vendor/github.com/SevereCloud/vksdk/v2/object/notifications.go
generated
vendored
Normal file
42
vendor/github.com/SevereCloud/vksdk/v2/object/notifications.go
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// NotificationsFeedback struct.
|
||||
type NotificationsFeedback struct {
|
||||
Attachments []WallWallpostAttachment `json:"attachments"`
|
||||
FromID int `json:"from_id"` // Reply author's ID
|
||||
Geo BaseGeo `json:"geo"`
|
||||
ID int `json:"id"` // Item ID
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
Text string `json:"text"` // Reply text
|
||||
ToID int `json:"to_id"` // Wall owner's ID
|
||||
}
|
||||
|
||||
// NotificationsNotification struct.
|
||||
type NotificationsNotification struct {
|
||||
Date int `json:"date"` // Date when the event has been occurred
|
||||
Feedback json.RawMessage `json:"feedback"`
|
||||
Parent json.RawMessage `json:"parent"`
|
||||
Reply NotificationsReply `json:"reply"`
|
||||
Type string `json:"type"` // Notification type
|
||||
}
|
||||
|
||||
// NotificationsNotificationsComment struct.
|
||||
type NotificationsNotificationsComment struct {
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
ID int `json:"id"` // Comment ID
|
||||
OwnerID int `json:"owner_id"` // Author ID
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Post WallWallpost `json:"post"`
|
||||
Text string `json:"text"` // Comment text
|
||||
Topic BoardTopic `json:"topic"`
|
||||
Video VideoVideo `json:"video"`
|
||||
}
|
||||
|
||||
// NotificationsReply struct.
|
||||
type NotificationsReply struct {
|
||||
Date string `json:"date"` // Date when the reply has been created in Unixtime
|
||||
ID int `json:"id"` // Reply ID
|
||||
Text string `json:"text"` // Reply text
|
||||
}
|
566
vendor/github.com/SevereCloud/vksdk/v2/object/object.go
generated
vendored
Normal file
566
vendor/github.com/SevereCloud/vksdk/v2/object/object.go
generated
vendored
Normal file
@ -0,0 +1,566 @@
|
||||
/*
|
||||
Package object contains objects for VK.
|
||||
|
||||
See more https://vk.com/dev/objects
|
||||
*/
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
// Attachment interface.
|
||||
type Attachment interface {
|
||||
ToAttachment() string
|
||||
}
|
||||
|
||||
// JSONObject interface.
|
||||
type JSONObject interface {
|
||||
ToJSON() string
|
||||
}
|
||||
|
||||
// BaseBoolInt type.
|
||||
type BaseBoolInt bool
|
||||
|
||||
// UnmarshalJSON func.
|
||||
func (b *BaseBoolInt) UnmarshalJSON(data []byte) (err error) {
|
||||
switch {
|
||||
case bytes.Equal(data, []byte("1")), bytes.Equal(data, []byte("true")):
|
||||
*b = true
|
||||
case bytes.Equal(data, []byte("0")), bytes.Equal(data, []byte("false")):
|
||||
*b = false
|
||||
default:
|
||||
// return json error
|
||||
err = &json.UnmarshalTypeError{
|
||||
Value: string(data),
|
||||
Type: reflect.TypeOf((*BaseBoolInt)(nil)),
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// BaseCountry struct.
|
||||
type BaseCountry struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// BaseObject struct.
|
||||
type BaseObject struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// BaseObjectCount struct.
|
||||
type BaseObjectCount struct {
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
// BaseObjectWithName struct.
|
||||
type BaseObjectWithName struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// BaseRequestParam struct.
|
||||
type BaseRequestParam struct {
|
||||
Key string `json:"key"`
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// BaseSex const.
|
||||
const (
|
||||
SexUnknown = iota
|
||||
SexFemale
|
||||
SexMale
|
||||
)
|
||||
|
||||
// LongPollResponse struct.
|
||||
type LongPollResponse struct {
|
||||
Ts int `json:"ts"`
|
||||
Updates [][]interface{} `json:"updates"`
|
||||
Failed int `json:"failed"`
|
||||
}
|
||||
|
||||
// BaseCommentsInfo struct.
|
||||
type BaseCommentsInfo struct {
|
||||
Count int `json:"count"`
|
||||
CanPost BaseBoolInt `json:"can_post"`
|
||||
GroupsCanPost BaseBoolInt `json:"groups_can_post"`
|
||||
CanClose BaseBoolInt `json:"can_close"`
|
||||
CanOpen BaseBoolInt `json:"can_open"`
|
||||
}
|
||||
|
||||
// BaseGeo struct.
|
||||
type BaseGeo struct {
|
||||
Coordinates string `json:"coordinates"`
|
||||
Place BasePlace `json:"place"`
|
||||
Showmap int `json:"showmap"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// BaseMessageGeo struct.
|
||||
type BaseMessageGeo struct {
|
||||
Coordinates BaseGeoCoordinates `json:"coordinates"`
|
||||
Place BasePlace `json:"place"`
|
||||
Showmap int `json:"showmap"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// BaseGeoCoordinates struct.
|
||||
type BaseGeoCoordinates struct {
|
||||
Latitude float64 `json:"latitude"`
|
||||
Longitude float64 `json:"longitude"`
|
||||
}
|
||||
|
||||
// BaseImage struct.
|
||||
type BaseImage struct {
|
||||
Height float64 `json:"height"`
|
||||
URL string `json:"url"`
|
||||
Width float64 `json:"width"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// UnmarshalJSON is required to support images with `src` field.
|
||||
func (obj *BaseImage) UnmarshalJSON(data []byte) (err error) {
|
||||
type renamedBaseImage struct {
|
||||
Height float64 `json:"height"`
|
||||
URL string `json:"url"`
|
||||
Src string `json:"src"`
|
||||
Width float64 `json:"width"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
var renamedObj renamedBaseImage
|
||||
|
||||
err = json.Unmarshal(data, &renamedObj)
|
||||
|
||||
obj.Height = renamedObj.Height
|
||||
obj.Width = renamedObj.Width
|
||||
obj.Type = renamedObj.Type
|
||||
|
||||
if renamedObj.Src == "" {
|
||||
obj.URL = renamedObj.URL
|
||||
} else {
|
||||
obj.URL = renamedObj.Src
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// BaseLikes struct.
|
||||
type BaseLikes struct {
|
||||
UserLikes BaseBoolInt `json:"user_likes"` // Information whether current user likes
|
||||
Count int `json:"count"` // Likes number
|
||||
}
|
||||
|
||||
// BaseLikesInfo struct.
|
||||
type BaseLikesInfo struct {
|
||||
CanLike BaseBoolInt `json:"can_like"` // Information whether current user can like the post
|
||||
CanPublish BaseBoolInt `json:"can_publish"` // Information whether current user can repost
|
||||
UserLikes BaseBoolInt `json:"user_likes"` // Information whether current uer has liked the post
|
||||
Count int `json:"count"` // Likes number
|
||||
}
|
||||
|
||||
// BaseLink struct.
|
||||
type BaseLink struct {
|
||||
Application BaseLinkApplication `json:"application"`
|
||||
Button BaseLinkButton `json:"button"`
|
||||
ButtonText string `json:"button_text"`
|
||||
ButtonAction string `json:"button_action"`
|
||||
Caption string `json:"caption"`
|
||||
Description string `json:"description"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Video VideoVideo `json:"video"`
|
||||
PreviewPage string `json:"preview_page"`
|
||||
PreviewURL string `json:"preview_url"`
|
||||
Product BaseLinkProduct `json:"product"`
|
||||
Rating BaseLinkRating `json:"rating"`
|
||||
Title string `json:"title"`
|
||||
Target string `json:"target"`
|
||||
URL string `json:"url"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
}
|
||||
|
||||
// BaseLinkApplication struct.
|
||||
type BaseLinkApplication struct {
|
||||
AppID float64 `json:"app_id"`
|
||||
Store BaseLinkApplicationStore `json:"store"`
|
||||
}
|
||||
|
||||
// BaseLinkApplicationStore struct.
|
||||
type BaseLinkApplicationStore struct {
|
||||
ID float64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// BaseLinkButton struct.
|
||||
type BaseLinkButton struct {
|
||||
Action BaseLinkButtonAction `json:"action"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// BaseLinkButtonAction struct.
|
||||
type BaseLinkButtonAction struct {
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"`
|
||||
}
|
||||
|
||||
// BaseLinkProduct struct.
|
||||
type BaseLinkProduct struct {
|
||||
Price MarketPrice `json:"price"`
|
||||
Merchant string `json:"merchant"`
|
||||
OrdersCount int `json:"orders_count"`
|
||||
}
|
||||
|
||||
// BaseLinkRating struct.
|
||||
type BaseLinkRating struct {
|
||||
ReviewsCount int `json:"reviews_count"`
|
||||
Stars float64 `json:"stars"`
|
||||
}
|
||||
|
||||
// BasePlace struct.
|
||||
type BasePlace struct {
|
||||
Address string `json:"address"`
|
||||
Checkins int `json:"checkins"`
|
||||
City interface{} `json:"city"` // BUG(VK): https://github.com/VKCOM/vk-api-schema/issues/143
|
||||
Country interface{} `json:"country"`
|
||||
Created int `json:"created"`
|
||||
ID int `json:"id"`
|
||||
Icon string `json:"icon"`
|
||||
Latitude float64 `json:"latitude"`
|
||||
Longitude float64 `json:"longitude"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
IsDeleted BaseBoolInt `json:"is_deleted"`
|
||||
TotalCheckins int `json:"total_checkins"`
|
||||
Updated int `json:"updated"`
|
||||
CategoryObject BaseCategoryObject `json:"category_object"`
|
||||
}
|
||||
|
||||
// BaseCategoryObject struct.
|
||||
type BaseCategoryObject struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Icons []BaseImage `json:"icons"`
|
||||
}
|
||||
|
||||
// BaseRepostsInfo struct.
|
||||
type BaseRepostsInfo struct {
|
||||
Count int `json:"count"`
|
||||
WallCount int `json:"wall_count"`
|
||||
MailCount int `json:"mail_count"`
|
||||
UserReposted int `json:"user_reposted"`
|
||||
}
|
||||
|
||||
// BaseSticker struct.
|
||||
type BaseSticker struct {
|
||||
Images []BaseImage `json:"images"`
|
||||
ImagesWithBackground []BaseImage `json:"images_with_background"`
|
||||
ProductID int `json:"product_id"`
|
||||
StickerID int `json:"sticker_id"`
|
||||
AnimationURL string `json:"animation_url"`
|
||||
}
|
||||
|
||||
// MaxSize return the largest BaseSticker.
|
||||
func (sticker BaseSticker) MaxSize() (maxImageSize BaseImage) {
|
||||
var max float64
|
||||
|
||||
for _, imageSize := range sticker.Images {
|
||||
size := imageSize.Height * imageSize.Width
|
||||
if size > max {
|
||||
max = size
|
||||
maxImageSize = imageSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MinSize return the smallest BaseSticker.
|
||||
func (sticker BaseSticker) MinSize() (minImageSize BaseImage) {
|
||||
var min float64
|
||||
|
||||
for _, imageSize := range sticker.Images {
|
||||
size := imageSize.Height * imageSize.Width
|
||||
if size < min || min == 0 {
|
||||
min = size
|
||||
minImageSize = imageSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MaxSizeBackground return the largest BaseSticker with background.
|
||||
func (sticker BaseSticker) MaxSizeBackground() (maxImageSize BaseImage) {
|
||||
var max float64
|
||||
|
||||
for _, imageSize := range sticker.ImagesWithBackground {
|
||||
size := imageSize.Height * imageSize.Width
|
||||
if size > max {
|
||||
max = size
|
||||
maxImageSize = imageSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MinSizeBackground return the smallest BaseSticker with background.
|
||||
func (sticker BaseSticker) MinSizeBackground() (minImageSize BaseImage) {
|
||||
var min float64
|
||||
|
||||
for _, imageSize := range sticker.ImagesWithBackground {
|
||||
size := imageSize.Height * imageSize.Width
|
||||
if size < min || min == 0 {
|
||||
min = size
|
||||
minImageSize = imageSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// BaseUserID struct.
|
||||
type BaseUserID struct {
|
||||
UserID int `json:"user_id"`
|
||||
}
|
||||
|
||||
// PrivacyCategory type.
|
||||
type PrivacyCategory string
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
PrivacyAll PrivacyCategory = "all"
|
||||
PrivacyOnlyMe PrivacyCategory = "only_me"
|
||||
PrivacyFriends PrivacyCategory = "friends"
|
||||
PrivacyFriendsOfFriends PrivacyCategory = "friends_of_friends"
|
||||
)
|
||||
|
||||
// Privacy struct.
|
||||
type Privacy struct {
|
||||
Category PrivacyCategory `json:"category,omitempty"`
|
||||
Lists struct {
|
||||
Allowed []int `json:"allowed"`
|
||||
} `json:"lists,omitempty"`
|
||||
Owners struct {
|
||||
Excluded []int `json:"excluded"`
|
||||
} `json:"owners,omitempty"`
|
||||
}
|
||||
|
||||
// EventsEventAttach struct.
|
||||
type EventsEventAttach struct {
|
||||
Address string `json:"address,omitempty"` // address of event
|
||||
ButtonText string `json:"button_text"` // text of attach
|
||||
Friends []int `json:"friends"` // array of friends ids
|
||||
ID int `json:"id"` // event ID
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"` // is favorite
|
||||
MemberStatus int `json:"member_status,omitempty"` // Current user's member status
|
||||
Text string `json:"text"` // text of attach
|
||||
Time int `json:"time,omitempty"` // event start time
|
||||
}
|
||||
|
||||
// OauthError struct.
|
||||
type OauthError struct {
|
||||
Error string `json:"error"`
|
||||
ErrorDescription string `json:"error_description"`
|
||||
RedirectURI string `json:"redirect_uri"`
|
||||
}
|
||||
|
||||
// Article struct.
|
||||
type Article struct {
|
||||
ID int `json:"id"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
OwnerName string `json:"owner_name"`
|
||||
OwnerPhoto string `json:"owner_photo"`
|
||||
State string `json:"state"`
|
||||
CanReport BaseBoolInt `json:"can_report"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
NoFooter BaseBoolInt `json:"no_footer"`
|
||||
Title string `json:"title"`
|
||||
Subtitle string `json:"subtitle"`
|
||||
Views int `json:"views"`
|
||||
Shares int `json:"shares"`
|
||||
URL string `json:"url"`
|
||||
ViewURL string `json:"view_url"`
|
||||
AccessKey string `json:"access_key"`
|
||||
PublishedDate int `json:"published_date"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
}
|
||||
|
||||
// ExtendedResponse struct.
|
||||
type ExtendedResponse struct {
|
||||
Profiles []UsersUser `json:"profiles,omitempty"`
|
||||
Groups []GroupsGroup `json:"groups,omitempty"`
|
||||
}
|
||||
|
||||
// ClientInfo struct.
|
||||
type ClientInfo struct {
|
||||
ButtonActions []string `json:"button_actions"`
|
||||
Keyboard BaseBoolInt `json:"keyboard"`
|
||||
InlineKeyboard BaseBoolInt `json:"inline_keyboard"`
|
||||
Carousel BaseBoolInt `json:"carousel"`
|
||||
LangID int `json:"lang_id"`
|
||||
}
|
||||
|
||||
// Language code.
|
||||
const (
|
||||
LangRU = 0 // Русский
|
||||
LangUK = 1 // Українська
|
||||
LangBE = 2 // Беларуская (тарашкевiца)
|
||||
LangEN = 3 // English
|
||||
LangES = 4 // Español
|
||||
LangFI = 5 // Suomi
|
||||
LangDE = 6 // Deutsch
|
||||
LangIT = 7 // Italiano
|
||||
LangBG = 8 // Български
|
||||
LangHR = 9 // Hrvatski
|
||||
LangHU = 10 // Magyar
|
||||
LangSR = 11 // Српски
|
||||
LangPT = 12 // Português
|
||||
LangEL = 14 // Ελληνικά
|
||||
LangPL = 15 // Polski
|
||||
LangFR = 16 // Français
|
||||
LangKO = 17 // 한국어
|
||||
LangZH = 18 // 汉语
|
||||
LangLT = 19 // Lietuvių
|
||||
LangJA = 20 // 日本語
|
||||
LangCS = 21 // Čeština
|
||||
LangET = 22 // Eesti
|
||||
LangTT = 50 // Татарча
|
||||
LangBA = 51 // Башҡортса
|
||||
LangCV = 52 // Чăвашла
|
||||
LangSK = 53 // Slovenčina
|
||||
LangRO = 54 // Română
|
||||
LangNO = 55 // Norsk
|
||||
LangLV = 56 // Latviešu
|
||||
LangAZ = 57 // Azərbaycan dili
|
||||
LangHY = 58 // Հայերեն
|
||||
LangSQ = 59 // Shqip
|
||||
LangSV = 60 // Svenska
|
||||
LangNL = 61 // Nederlands
|
||||
LangTK = 62 // Türkmen
|
||||
LangKA = 63 // ქართული
|
||||
LangDA = 64 // Dansk
|
||||
LangUZ = 65 // O‘zbek
|
||||
LangMO = 66 // Moldovenească
|
||||
LangBUA = 67 // Буряад
|
||||
LangTH = 68 // ภาษาไทย
|
||||
LangID = 69 // Bahasa Indonesia
|
||||
LangTG = 70 // Тоҷикӣ
|
||||
LangSL = 71 // Slovenščina
|
||||
LangBS = 72 // Bosanski
|
||||
LangPTBR = 73 // Português brasileiro
|
||||
LangFA = 74 // فارسی
|
||||
LangVI = 75 // Tiếng Việt
|
||||
LangHI = 76 // हिन्दी
|
||||
LangSI = 77 // සිංහල
|
||||
LangBN = 78 // বাংলা
|
||||
LangTL = 79 // Tagalog
|
||||
LangMN = 80 // Монгол
|
||||
LangMY = 81 // ဗမာစာ
|
||||
LangTR = 82 // Türkçe
|
||||
LangNE = 83 // नेपाली
|
||||
LangUR = 85 // اردو
|
||||
LangKY = 87 // Кыргыз тили
|
||||
LangPA = 90 // پنجابی
|
||||
LangOS = 91 // Ирон
|
||||
LangKN = 94 // ಕನ್ನಡ
|
||||
LangSW = 95 // Kiswahili
|
||||
LangKK = 97 // Қазақша
|
||||
LangAR = 98 // العربية
|
||||
LangHE = 99 // עברית
|
||||
LangPreRevolutionary = 100 // Дореволюцiонный
|
||||
LangMYV = 101 // Эрзянь кель
|
||||
LangKDB = 102 // Адыгэбзэ
|
||||
LangSAH = 105 // Саха тыла
|
||||
LangADY = 106 // Адыгабзэ
|
||||
LangUDM = 107 // Удмурт
|
||||
LangCHM = 108 // Марий йылме
|
||||
LangBE2 = 114 // Беларуская
|
||||
LangLEZ = 118 // Лезги чІал
|
||||
LangTW = 119 // 臺灣話
|
||||
LangKUM = 236 // Къумукъ тил
|
||||
LangMVL = 270 // Mirandés
|
||||
LangSLA = 298 // Русинськый
|
||||
LangKRL = 379 // Karjalan kieli
|
||||
LangTYV = 344 // Тыва дыл
|
||||
LangXAL = 357 // Хальмг келн
|
||||
LangTLY = 373 // Tolışə zıvon
|
||||
LangKV = 375 // Коми кыв
|
||||
LangUKClassic = 452 // Українська (клясична)
|
||||
LangUKGalitska = 454 // Українська (Галицка)
|
||||
LangKAB = 457 // Taqbaylit
|
||||
LangEO = 555 // Esperanto
|
||||
LangLA = 666 // Lingua Latina
|
||||
LangSoviet = 777 // Советский
|
||||
)
|
||||
|
||||
// Button action type.
|
||||
const (
|
||||
// A button that sends a message with text specified in the label.
|
||||
ButtonText = "text"
|
||||
|
||||
// Opens the VK Pay window with predefined parameters. The button is called
|
||||
// “Pay with VK Pay” (VK Pay is displayed as a logo). This button always
|
||||
// stretches to the whole keyboard width.
|
||||
ButtonVKPay = "vkpay"
|
||||
|
||||
// Opens a specified VK Apps app. This button always stretches to the whole
|
||||
// keyboard width.
|
||||
ButtonVKApp = "open_app"
|
||||
|
||||
// Sends the location to the chat. This button always stretches to the
|
||||
// whole keyboard width.
|
||||
ButtonLocation = "location"
|
||||
|
||||
// Opens the specified link.
|
||||
ButtonOpenLink = "open_link"
|
||||
|
||||
// Allows, without sending a message from the user, to receive a
|
||||
// notification about pressing the button and perform the necessary action.
|
||||
ButtonCallback = "callback"
|
||||
)
|
||||
|
||||
// Button color. This parameter is used only for buttons with the text and callback types.
|
||||
const (
|
||||
Primary = "primary" // Blue button, indicates the main action. #5181B8
|
||||
ButtonBlue
|
||||
|
||||
Secondary = "secondary" // Default white button. #FFFFFF
|
||||
ButtonWhite
|
||||
|
||||
Negative = "negative" // Dangerous or negative action (cancel, delete etc.) #E64646
|
||||
ButtonRed
|
||||
|
||||
Positive = "positive" // Accept, agree. #4BB34B
|
||||
ButtonGreen
|
||||
)
|
||||
|
||||
// Platform content creation platform.
|
||||
type Platform int
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
_ Platform = iota
|
||||
PlatformMobile // mobile web version
|
||||
PlatformIPhone // iPhone
|
||||
PlatformIPad // iPad
|
||||
PlatformAndroid // Android
|
||||
PlatformWindowsPhone // Windows Phone
|
||||
PlatformWindows // Windows 8
|
||||
PlatformFull // full web version
|
||||
PlatformOther // other apps
|
||||
)
|
||||
|
||||
// Conversations types.
|
||||
const (
|
||||
PeerUser = "user"
|
||||
PeerChat = "chat"
|
||||
PeerGroup = "group"
|
||||
PeerEmail = "email"
|
||||
)
|
45
vendor/github.com/SevereCloud/vksdk/v2/object/orders.go
generated
vendored
Normal file
45
vendor/github.com/SevereCloud/vksdk/v2/object/orders.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// OrdersAmount struct.
|
||||
type OrdersAmount struct {
|
||||
Amounts []OrdersAmountItem `json:"amounts"`
|
||||
Currency string `json:"currency"` // Currency name
|
||||
}
|
||||
|
||||
// OrdersAmountItem struct.
|
||||
type OrdersAmountItem struct {
|
||||
Amount int `json:"amount"` // Votes amount in user's currency
|
||||
Description string `json:"description"` // Amount description
|
||||
Votes string `json:"votes"` // Votes number
|
||||
}
|
||||
|
||||
// OrdersOrder struct.
|
||||
type OrdersOrder struct {
|
||||
Amount int `json:"amount"` // Amount
|
||||
AppOrderID int `json:"app_order_id"` // App order ID
|
||||
CancelTransactionID int `json:"cancel_transaction_id"` // Cancel transaction ID
|
||||
Date int `json:"date"` // Date of creation in Unixtime
|
||||
ID int `json:"id"` // Order ID
|
||||
Item string `json:"item"` // Order item
|
||||
ReceiverID int `json:"receiver_id"` // Receiver ID
|
||||
Status string `json:"status"` // Order status
|
||||
TransactionID int `json:"transaction_id"` // Transaction ID
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// OrdersSubscription struct.
|
||||
type OrdersSubscription struct {
|
||||
CancelReason string `json:"cancel_reason"` // Cancel reason
|
||||
CreateTime int `json:"create_time"` // Date of creation in Unixtime
|
||||
ID int `json:"id"` // Subscription ID
|
||||
ItemID string `json:"item_id"` // Subscription order item
|
||||
NextBillTime int `json:"next_bill_time"` // Date of next bill in Unixtime
|
||||
Period int `json:"period"` // Subscription period
|
||||
PeriodStartTime int `json:"period_start_time"` // Date of last period start in Unixtime
|
||||
Price int `json:"price"` // Subscription price
|
||||
Status string `json:"status"` // Subscription status
|
||||
PendingCancel BaseBoolInt `json:"pending_cancel"` // Pending cancel state
|
||||
TestMode BaseBoolInt `json:"test_mode"` // Is test subscription
|
||||
TrialExpireTime int `json:"trial_expire_time"` // Date of trial expire in Unixtime
|
||||
UpdateTime int `json:"update_time"` // Date of last change in Unixtime
|
||||
}
|
85
vendor/github.com/SevereCloud/vksdk/v2/object/pages.go
generated
vendored
Normal file
85
vendor/github.com/SevereCloud/vksdk/v2/object/pages.go
generated
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// Pages privacy settings.
|
||||
const (
|
||||
PagesPrivacyCommunityManagers = iota // community managers only
|
||||
PagesPrivacyCommunityMembers // community members only
|
||||
PagesPrivacyEveryone // everyone
|
||||
)
|
||||
|
||||
// PagesWikipage struct.
|
||||
type PagesWikipage struct {
|
||||
CreatorID int `json:"creator_id"` // Page creator ID
|
||||
CreatorName int `json:"creator_name"` // Page creator name
|
||||
EditorID int `json:"editor_id"` // Last editor ID
|
||||
EditorName string `json:"editor_name"` // Last editor name
|
||||
GroupID int `json:"group_id"` // Community ID
|
||||
ID int `json:"id"` // Page ID
|
||||
Title string `json:"title"` // Page title
|
||||
Views int `json:"views"` // Views number
|
||||
WhoCanEdit int `json:"who_can_edit"` // Edit settings of the page
|
||||
WhoCanView int `json:"who_can_view"` // View settings of the page
|
||||
}
|
||||
|
||||
// PagesWikipageFull struct.
|
||||
type PagesWikipageFull struct {
|
||||
// Date when the page has been created in Unixtime.
|
||||
Created int `json:"created"`
|
||||
|
||||
// Page creator ID.
|
||||
CreatorID int `json:"creator_id"`
|
||||
|
||||
// Information whether current user can edit the page.
|
||||
CurrentUserCanEdit BaseBoolInt `json:"current_user_can_edit"`
|
||||
|
||||
// Information whether current user can edit the page access settings.
|
||||
CurrentUserCanEditAccess BaseBoolInt `json:"current_user_can_edit_access"`
|
||||
|
||||
// Date when the page has been edited in Unixtime.
|
||||
Edited int `json:"edited"`
|
||||
|
||||
// Last editor ID.
|
||||
EditorID int `json:"editor_id"`
|
||||
|
||||
// Page ID.
|
||||
PageID int `json:"page_id"`
|
||||
|
||||
// Community ID.
|
||||
GroupID int `json:"group_id"`
|
||||
|
||||
// Page content, HTML.
|
||||
HTML string `json:"html"`
|
||||
|
||||
// Page ID.
|
||||
ID int `json:"id"`
|
||||
|
||||
// Page content, wiki.
|
||||
Source string `json:"source"`
|
||||
|
||||
// Page title.
|
||||
Title string `json:"title"`
|
||||
|
||||
// URL of the page preview.
|
||||
ViewURL string `json:"view_url"`
|
||||
|
||||
// Views number.
|
||||
Views int `json:"views"`
|
||||
|
||||
// Edit settings of the page.
|
||||
WhoCanEdit int `json:"who_can_edit"`
|
||||
|
||||
// View settings of the page.
|
||||
WhoCanView int `json:"who_can_view"`
|
||||
VersionCreated int `json:"version_created"`
|
||||
}
|
||||
|
||||
// PagesWikipageHistory struct.
|
||||
//
|
||||
// BUG(VK): https://vk.com/dev/pages.getHistory edited and date.
|
||||
type PagesWikipageHistory struct {
|
||||
Date int `json:"date"` // Date when the page has been edited in Unixtime
|
||||
EditorID int `json:"editor_id"` // Last editor ID
|
||||
EditorName string `json:"editor_name"` // Last editor name
|
||||
ID int `json:"id"` // Version ID
|
||||
Length int `json:"length"` // Page size in bytes
|
||||
}
|
339
vendor/github.com/SevereCloud/vksdk/v2/object/photos.go
generated
vendored
Normal file
339
vendor/github.com/SevereCloud/vksdk/v2/object/photos.go
generated
vendored
Normal file
@ -0,0 +1,339 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// PhotosPhoto struct.
|
||||
type PhotosPhoto struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the photo
|
||||
AlbumID int `json:"album_id"` // Album ID
|
||||
Date int `json:"date"` // Date when uploaded
|
||||
Height int `json:"height"` // Original photo height
|
||||
ID int `json:"id"` // Photo ID
|
||||
Images []PhotosImage `json:"images"`
|
||||
Lat float64 `json:"lat"` // Latitude
|
||||
Long float64 `json:"long"` // Longitude
|
||||
OwnerID int `json:"owner_id"` // Photo owner's ID
|
||||
PostID int `json:"post_id"` // Post ID
|
||||
Text string `json:"text"` // Photo caption
|
||||
UserID int `json:"user_id"` // ID of the user who have uploaded the photo
|
||||
Width int `json:"width"` // Original photo width
|
||||
CanUpload BaseBoolInt `json:"can_upload"`
|
||||
CommentsDisabled BaseBoolInt `json:"comments_disabled"`
|
||||
ThumbIsLast BaseBoolInt `json:"thumb_is_last"`
|
||||
UploadByAdminsOnly BaseBoolInt `json:"upload_by_admins_only"`
|
||||
HasTags BaseBoolInt `json:"has_tags"`
|
||||
Created int `json:"created"`
|
||||
Description string `json:"description"`
|
||||
PrivacyComment []string `json:"privacy_comment"`
|
||||
PrivacyView []string `json:"privacy_view"`
|
||||
Size int `json:"size"`
|
||||
Sizes []PhotosPhotoSizes `json:"sizes"`
|
||||
ThumbID int `json:"thumb_id"`
|
||||
ThumbSrc string `json:"thumb_src"`
|
||||
Title string `json:"title"`
|
||||
Updated int `json:"updated"`
|
||||
Color string `json:"color"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (photo PhotosPhoto) ToAttachment() string {
|
||||
return fmt.Sprintf("photo%d_%d", photo.OwnerID, photo.ID)
|
||||
}
|
||||
|
||||
// MaxSize return the largest PhotosPhotoSizes.
|
||||
func (photo PhotosPhoto) MaxSize() (maxPhotoSize PhotosPhotoSizes) {
|
||||
var max float64
|
||||
|
||||
for _, photoSize := range photo.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size > max {
|
||||
max = size
|
||||
maxPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MinSize return the smallest PhotosPhotoSizes.
|
||||
func (photo PhotosPhoto) MinSize() (minPhotoSize PhotosPhotoSizes) {
|
||||
var min float64
|
||||
|
||||
for _, photoSize := range photo.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size < min || min == 0 {
|
||||
min = size
|
||||
minPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// PhotosCommentXtrPid struct.
|
||||
type PhotosCommentXtrPid struct {
|
||||
Attachments []WallCommentAttachment `json:"attachments"`
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
FromID int `json:"from_id"` // Author ID
|
||||
ID int `json:"id"` // Comment ID
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
ParentsStack []int `json:"parents_stack"`
|
||||
Pid int `json:"pid"` // Photo ID
|
||||
ReplyToComment int `json:"reply_to_comment"` // Replied comment ID
|
||||
ReplyToUser int `json:"reply_to_user"` // Replied user ID
|
||||
Text string `json:"text"` // Comment text
|
||||
Thread WallWallCommentThread `json:"thread"`
|
||||
}
|
||||
|
||||
// PhotosImage struct.
|
||||
type PhotosImage struct {
|
||||
BaseImage
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// PhotosChatUploadResponse struct.
|
||||
type PhotosChatUploadResponse struct {
|
||||
Response string `json:"response"` // Uploaded photo data
|
||||
}
|
||||
|
||||
// PhotosMarketAlbumUploadResponse struct.
|
||||
type PhotosMarketAlbumUploadResponse struct {
|
||||
GID int `json:"gid"` // Community ID
|
||||
Hash string `json:"hash"` // Uploading hash
|
||||
Photo string `json:"photo"` // Uploaded photo data
|
||||
Server int `json:"server"` // Upload server number
|
||||
}
|
||||
|
||||
// PhotosMarketUploadResponse struct.
|
||||
type PhotosMarketUploadResponse struct {
|
||||
CropData string `json:"crop_data"` // Crop data
|
||||
CropHash string `json:"crop_hash"` // Crop hash
|
||||
GroupID int `json:"group_id"` // Community ID
|
||||
Hash string `json:"hash"` // Uploading hash
|
||||
Photo string `json:"photo"` // Uploaded photo data
|
||||
Server int `json:"server"` // Upload server number
|
||||
}
|
||||
|
||||
// PhotosMessageUploadResponse struct.
|
||||
type PhotosMessageUploadResponse struct {
|
||||
Hash string `json:"hash"` // Uploading hash
|
||||
Photo string `json:"photo"` // Uploaded photo data
|
||||
Server int `json:"server"` // Upload server number
|
||||
}
|
||||
|
||||
// PhotosOwnerUploadResponse struct.
|
||||
type PhotosOwnerUploadResponse struct {
|
||||
Hash string `json:"hash"` // Uploading hash
|
||||
Photo string `json:"photo"` // Uploaded photo data
|
||||
Server int `json:"server"` // Upload server number
|
||||
}
|
||||
|
||||
// PhotosPhotoAlbum struct.
|
||||
type PhotosPhotoAlbum struct {
|
||||
Created int `json:"created"` // Date when the album has been created in Unixtime
|
||||
Description string `json:"description"` // Photo album description
|
||||
ID string `json:"id"` // BUG(VK): Photo album ID
|
||||
OwnerID int `json:"owner_id"` // Album owner's ID
|
||||
Size int `json:"size"` // Photos number
|
||||
Thumb PhotosPhoto `json:"thumb"`
|
||||
Title string `json:"title"` // Photo album title
|
||||
Updated int `json:"updated"` // Date when the album has been updated last time in Unixtime
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (album PhotosPhotoAlbum) ToAttachment() string {
|
||||
return fmt.Sprintf("album%d_%s", album.OwnerID, album.ID)
|
||||
}
|
||||
|
||||
// PhotosPhotoAlbumFull struct.
|
||||
type PhotosPhotoAlbumFull struct {
|
||||
// Information whether current user can upload photo to the album.
|
||||
CanUpload BaseBoolInt `json:"can_upload"`
|
||||
CommentsDisabled BaseBoolInt `json:"comments_disabled"` // Information whether album comments are disabled
|
||||
Created int `json:"created"` // Date when the album has been created in Unixtime
|
||||
Description string `json:"description"` // Photo album description
|
||||
ID int `json:"id"` // Photo album ID
|
||||
OwnerID int `json:"owner_id"` // Album owner's ID
|
||||
Size int `json:"size"` // Photos number
|
||||
PrivacyComment Privacy `json:"privacy_comment"`
|
||||
PrivacyView Privacy `json:"privacy_view"`
|
||||
Sizes []PhotosPhotoSizes `json:"sizes"`
|
||||
ThumbID int `json:"thumb_id"` // Thumb photo ID
|
||||
|
||||
// Information whether the album thumb is last photo.
|
||||
ThumbIsLast int `json:"thumb_is_last"`
|
||||
ThumbSrc string `json:"thumb_src"` // URL of the thumb image
|
||||
Title string `json:"title"` // Photo album title
|
||||
|
||||
// Date when the album has been updated last time in Unixtime.
|
||||
Updated int `json:"updated"`
|
||||
|
||||
// Information whether only community administrators can upload photos.
|
||||
UploadByAdminsOnly int `json:"upload_by_admins_only"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (album PhotosPhotoAlbumFull) ToAttachment() string {
|
||||
return fmt.Sprintf("album%d_%d", album.OwnerID, album.ID)
|
||||
}
|
||||
|
||||
// MaxSize return the largest PhotosPhotoSizes.
|
||||
func (album PhotosPhotoAlbumFull) MaxSize() (maxPhotoSize PhotosPhotoSizes) {
|
||||
var max float64
|
||||
|
||||
for _, photoSize := range album.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size > max {
|
||||
max = size
|
||||
maxPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MinSize return the smallest PhotosPhotoSizes.
|
||||
func (album PhotosPhotoAlbumFull) MinSize() (minPhotoSize PhotosPhotoSizes) {
|
||||
var min float64
|
||||
|
||||
for _, photoSize := range album.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size < min || min == 0 {
|
||||
min = size
|
||||
minPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// PhotosPhotoFull struct.
|
||||
type PhotosPhotoFull struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the photo
|
||||
AlbumID int `json:"album_id"` // Album ID
|
||||
CanComment BaseBoolInt `json:"can_comment"` // Information whether current user can comment the photo
|
||||
CanRepost BaseBoolInt `json:"can_repost"` // Information whether current user can repost the photo
|
||||
HasTags BaseBoolInt `json:"has_tags"`
|
||||
Comments BaseObjectCount `json:"comments"`
|
||||
Date int `json:"date"` // Date when uploaded
|
||||
Height int `json:"height"` // Original photo height
|
||||
ID int `json:"id"` // Photo ID
|
||||
Images []PhotosImage `json:"images"`
|
||||
Lat float64 `json:"lat"` // Latitude
|
||||
Likes BaseLikes `json:"likes"`
|
||||
Long float64 `json:"long"` // Longitude
|
||||
OwnerID int `json:"owner_id"` // Photo owner's ID
|
||||
PostID int `json:"post_id"` // Post ID
|
||||
Reposts BaseRepostsInfo `json:"reposts"`
|
||||
Tags BaseObjectCount `json:"tags"`
|
||||
Text string `json:"text"` // Photo caption
|
||||
UserID int `json:"user_id"` // ID of the user who have uploaded the photo
|
||||
Width int `json:"width"` // Original photo width
|
||||
Hidden int `json:"hidden"` // Returns if the photo is hidden above the wall
|
||||
Photo75 string `json:"photo_75"` // URL of image with 75 px width
|
||||
Photo130 string `json:"photo_130"` // URL of image with 130 px width
|
||||
Photo604 string `json:"photo_604"` // URL of image with 604 px width
|
||||
Photo807 string `json:"photo_807"` // URL of image with 807 px width
|
||||
Photo1280 string `json:"photo_1280"` // URL of image with 1280 px width
|
||||
Photo2560 string `json:"photo_2560"` // URL of image with 2560 px width
|
||||
Sizes []PhotosPhotoSizes `json:"sizes"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (photo PhotosPhotoFull) ToAttachment() string {
|
||||
return fmt.Sprintf("photo%d_%d", photo.OwnerID, photo.ID)
|
||||
}
|
||||
|
||||
// MaxSize return the largest PhotosPhotoSizes.
|
||||
func (photo PhotosPhotoFull) MaxSize() (maxPhotoSize PhotosPhotoSizes) {
|
||||
var max float64
|
||||
|
||||
for _, photoSize := range photo.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size > max {
|
||||
max = size
|
||||
maxPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// MinSize return the smallest PhotosPhotoSizes.
|
||||
func (photo PhotosPhotoFull) MinSize() (minPhotoSize PhotosPhotoSizes) {
|
||||
var min float64
|
||||
|
||||
for _, photoSize := range photo.Sizes {
|
||||
size := photoSize.Height * photoSize.Width
|
||||
if size < min || min == 0 {
|
||||
min = size
|
||||
minPhotoSize = photoSize
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// PhotosPhotoFullXtrRealOffset struct.
|
||||
type PhotosPhotoFullXtrRealOffset struct {
|
||||
PhotosPhotoFull
|
||||
RealOffset int `json:"real_offset"` // Real position of the photo
|
||||
}
|
||||
|
||||
// PhotosPhotoSizes struct.
|
||||
type PhotosPhotoSizes struct {
|
||||
// BUG(VK): json: cannot unmarshal number 180.000000 into Go struct field PhotosPhotoSizes.height of type int
|
||||
BaseImage
|
||||
}
|
||||
|
||||
// PhotosPhotoTag struct.
|
||||
type PhotosPhotoTag struct {
|
||||
Date int `json:"date"` // Date when tag has been added in Unixtime
|
||||
ID int `json:"id"` // Tag ID
|
||||
PlacerID int `json:"placer_id"` // ID of the tag creator
|
||||
TaggedName string `json:"tagged_name"` // Tag description
|
||||
Description string `json:"description"` // Tagged description.
|
||||
UserID int `json:"user_id"` // Tagged user ID
|
||||
Viewed BaseBoolInt `json:"viewed"` // Information whether the tag is reviewed
|
||||
X float64 `json:"x"` // Coordinate X of the left upper corner
|
||||
X2 float64 `json:"x2"` // Coordinate X of the right lower corner
|
||||
Y float64 `json:"y"` // Coordinate Y of the left upper corner
|
||||
Y2 float64 `json:"y2"` // Coordinate Y of the right lower corner
|
||||
}
|
||||
|
||||
// PhotosPhotoUpload struct.
|
||||
type PhotosPhotoUpload struct {
|
||||
AlbumID int `json:"album_id"` // Album ID
|
||||
UploadURL string `json:"upload_url"` // URL to upload photo
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// PhotosPhotoUploadResponse struct.
|
||||
type PhotosPhotoUploadResponse struct {
|
||||
AID int `json:"aid"` // Album ID
|
||||
Hash string `json:"hash"` // Uploading hash
|
||||
PhotosList string `json:"photos_list"` // Uploaded photos data
|
||||
Server int `json:"server"` // Upload server number
|
||||
}
|
||||
|
||||
// PhotosPhotoXtrRealOffset struct.
|
||||
type PhotosPhotoXtrRealOffset struct {
|
||||
PhotosPhoto
|
||||
RealOffset int `json:"real_offset"` // Real position of the photo
|
||||
}
|
||||
|
||||
// PhotosPhotoXtrTagInfo struct.
|
||||
type PhotosPhotoXtrTagInfo struct {
|
||||
PhotosPhoto
|
||||
TagCreated int `json:"tag_created"` // Date when tag has been added in Unixtime
|
||||
TagID int `json:"tag_id"` // Tag ID
|
||||
}
|
||||
|
||||
// PhotosWallUploadResponse struct.
|
||||
type PhotosWallUploadResponse struct {
|
||||
Hash string `json:"hash"` // Uploading hash
|
||||
Photo string `json:"photo"` // Uploaded photo data
|
||||
Server int `json:"server"` // Upload server number
|
||||
}
|
45
vendor/github.com/SevereCloud/vksdk/v2/object/podcasts.go
generated
vendored
Normal file
45
vendor/github.com/SevereCloud/vksdk/v2/object/podcasts.go
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
package object
|
||||
|
||||
// PodcastsItem struct.
|
||||
type PodcastsItem struct {
|
||||
OwnerID int `json:"owner_id"`
|
||||
}
|
||||
|
||||
// PodcastsCategory struct.
|
||||
type PodcastsCategory struct {
|
||||
ID int `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Cover []BaseImage `json:"cover"`
|
||||
}
|
||||
|
||||
// PodcastsEpisode struct.
|
||||
type PodcastsEpisode struct {
|
||||
ID int `json:"id"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
Artist string `json:"artist"`
|
||||
Title string `json:"title"`
|
||||
Duration int `json:"duration"`
|
||||
Date int `json:"date"`
|
||||
URL string `json:"url"`
|
||||
LyricsID int `json:"lyrics_id"`
|
||||
NoSearch int `json:"no_search"`
|
||||
TrackCode string `json:"track_code"`
|
||||
IsHq BaseBoolInt `json:"is_hq"`
|
||||
IsFocusTrack BaseBoolInt `json:"is_focus_track"`
|
||||
IsExplicit BaseBoolInt `json:"is_explicit"`
|
||||
ShortVideosAllowed BaseBoolInt `json:"short_videos_allowed"`
|
||||
StoriesAllowed BaseBoolInt `json:"stories_allowed"`
|
||||
StoriesCoverAllowed BaseBoolInt `json:"stories_cover_allowed"`
|
||||
PodcastInfo PodcastsPodcastInfo `json:"podcast_info"`
|
||||
}
|
||||
|
||||
// PodcastsPodcastInfo struct.
|
||||
type PodcastsPodcastInfo struct {
|
||||
Cover struct {
|
||||
Sizes []BaseImage `json:"cover"`
|
||||
}
|
||||
Plays int `json:"plays"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
Description string `json:"description"`
|
||||
Position int `json:"position"`
|
||||
}
|
101
vendor/github.com/SevereCloud/vksdk/v2/object/polls.go
generated
vendored
Normal file
101
vendor/github.com/SevereCloud/vksdk/v2/object/polls.go
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// PollsAnswer struct.
|
||||
type PollsAnswer struct {
|
||||
ID int `json:"id"`
|
||||
Rate float64 `json:"rate"`
|
||||
Text string `json:"text"`
|
||||
Votes int `json:"votes"`
|
||||
}
|
||||
|
||||
// PollsPoll struct.
|
||||
type PollsPoll struct {
|
||||
AnswerID int `json:"answer_id"` // Current user's answer ID
|
||||
Answers []PollsAnswer `json:"answers"`
|
||||
Created int `json:"created"` // Date when poll has been created in Unixtime
|
||||
ID int `json:"id"` // Poll ID
|
||||
OwnerID int `json:"owner_id"` // Poll owner's ID
|
||||
Question string `json:"question"` // Poll question
|
||||
Votes int `json:"votes"` // Votes number
|
||||
AnswerIDs []int `json:"answer_ids"`
|
||||
EndDate int `json:"end_date"`
|
||||
Anonymous BaseBoolInt `json:"anonymous"` // Information whether the pole is anonymous
|
||||
Closed BaseBoolInt `json:"closed"`
|
||||
IsBoard BaseBoolInt `json:"is_board"`
|
||||
CanEdit BaseBoolInt `json:"can_edit"`
|
||||
CanVote BaseBoolInt `json:"can_vote"`
|
||||
CanReport BaseBoolInt `json:"can_report"`
|
||||
CanShare BaseBoolInt `json:"can_share"`
|
||||
Multiple BaseBoolInt `json:"multiple"`
|
||||
DisableUnvote BaseBoolInt `json:"disable_unvote"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
AuthorID int `json:"author_id"`
|
||||
Background PollsBackground `json:"background"`
|
||||
Friends []PollsFriend `json:"friends"`
|
||||
Profiles []UsersUser `json:"profiles"`
|
||||
Groups []GroupsGroup `json:"groups"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (poll PollsPoll) ToAttachment() string {
|
||||
return fmt.Sprintf("poll%d_%d", poll.OwnerID, poll.ID)
|
||||
}
|
||||
|
||||
// PollsFriend struct.
|
||||
type PollsFriend struct {
|
||||
ID int `json:"id"`
|
||||
}
|
||||
|
||||
// PollsVoters struct.
|
||||
type PollsVoters struct {
|
||||
AnswerID int `json:"answer_id"` // Answer ID
|
||||
Users PollsVotersUsers `json:"users"`
|
||||
}
|
||||
|
||||
// PollsVotersUsers struct.
|
||||
type PollsVotersUsers struct {
|
||||
Count int `json:"count"` // Votes number
|
||||
Items []int `json:"items"`
|
||||
}
|
||||
|
||||
// PollsVotersFields struct.
|
||||
type PollsVotersFields struct {
|
||||
AnswerID int `json:"answer_id"` // Answer ID
|
||||
Users PollsVotersUsersFields `json:"users"`
|
||||
}
|
||||
|
||||
// PollsVotersUsersFields struct.
|
||||
type PollsVotersUsersFields struct {
|
||||
Count int `json:"count"` // Votes number
|
||||
Items []UsersUser `json:"items"`
|
||||
}
|
||||
|
||||
// PollsBackground struct.
|
||||
type PollsBackground struct {
|
||||
Type string `json:"type"`
|
||||
Angle int `json:"angle"`
|
||||
Color string `json:"color"`
|
||||
Points []struct {
|
||||
Position float64 `json:"position"`
|
||||
Color string `json:"color"`
|
||||
} `json:"points"`
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// PollsPhoto struct.
|
||||
type PollsPhoto struct {
|
||||
ID int `json:"id"`
|
||||
Color string `json:"color"`
|
||||
Images []PhotosImage `json:"images"`
|
||||
}
|
||||
|
||||
// PollsPhotoUploadResponse struct.
|
||||
type PollsPhotoUploadResponse struct {
|
||||
Photo string `json:"photo"` // Uploaded photo data
|
||||
Hash string `json:"hash"` // Uploaded hash
|
||||
}
|
14
vendor/github.com/SevereCloud/vksdk/v2/object/prettycards.go
generated
vendored
Normal file
14
vendor/github.com/SevereCloud/vksdk/v2/object/prettycards.go
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
package object
|
||||
|
||||
// PrettyCardsPrettyCard struct.
|
||||
type PrettyCardsPrettyCard struct {
|
||||
Button string `json:"button"` // Button key
|
||||
ButtonText string `json:"button_text"` // Button text in current language
|
||||
CardID string `json:"card_id"` // Card ID (long int returned as string)
|
||||
Images []BaseImage `json:"images"`
|
||||
LinkURL string `json:"link_url"` // Link URL
|
||||
Photo string `json:"photo"` // Photo ID (format "<owner_id>_<media_id>")
|
||||
Price string `json:"price"` // Price if set (decimal number returned as string)
|
||||
PriceOld string `json:"price_old"` // Old price if set (decimal number returned as string)
|
||||
Title string `json:"title"` // Title
|
||||
}
|
11
vendor/github.com/SevereCloud/vksdk/v2/object/search.go
generated
vendored
Normal file
11
vendor/github.com/SevereCloud/vksdk/v2/object/search.go
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
package object
|
||||
|
||||
// SearchHint struct.
|
||||
type SearchHint struct {
|
||||
Description string `json:"description"` // Object description
|
||||
Global int `json:"global,omitempty"` // Information whether the object has been found globally
|
||||
Group GroupsGroup `json:"group,omitempty"`
|
||||
Profile UsersUser `json:"profile,omitempty"`
|
||||
Section string `json:"section"`
|
||||
Type string `json:"type"`
|
||||
}
|
33
vendor/github.com/SevereCloud/vksdk/v2/object/secure.go
generated
vendored
Normal file
33
vendor/github.com/SevereCloud/vksdk/v2/object/secure.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// SecureLevel struct.
|
||||
type SecureLevel struct {
|
||||
Level int `json:"level"` // Level
|
||||
UID int `json:"uid"` // User ID
|
||||
}
|
||||
|
||||
// SecureSmsNotification struct.
|
||||
type SecureSmsNotification struct {
|
||||
AppID int `json:"app_id"` // Application ID
|
||||
Date int `json:"date"` // Date when message has been sent in Unixtime
|
||||
ID int `json:"id"` // Notification ID
|
||||
Message string `json:"message"` // Message text
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// SecureTokenChecked struct.
|
||||
type SecureTokenChecked struct {
|
||||
Date int `json:"date"` // Date when access_token has been generated in Unixtime
|
||||
Expire int `json:"expire"` // Date when access_token will expire in Unixtime
|
||||
Success int `json:"success"` // Returns if successfully processed
|
||||
UserID int `json:"user_id"` // User ID
|
||||
}
|
||||
|
||||
// SecureTransaction struct.
|
||||
type SecureTransaction struct {
|
||||
Date int `json:"date"` // Transaction date in Unixtime
|
||||
ID int `json:"id"` // Transaction ID
|
||||
UIDFrom int `json:"uid_from"` // From ID
|
||||
UIDTo int `json:"uid_to"` // To ID
|
||||
Votes int `json:"votes"` // Votes number
|
||||
}
|
77
vendor/github.com/SevereCloud/vksdk/v2/object/stats.go
generated
vendored
Normal file
77
vendor/github.com/SevereCloud/vksdk/v2/object/stats.go
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// StatsActivity struct.
|
||||
type StatsActivity struct {
|
||||
Comments int `json:"comments"` // Comments number
|
||||
Copies int `json:"copies"` // Reposts number
|
||||
Hidden int `json:"hidden"` // Hidden from news count
|
||||
Likes int `json:"likes"` // Likes number
|
||||
Subscribed int `json:"subscribed"` // New subscribers count
|
||||
Unsubscribed int `json:"unsubscribed"` // Unsubscribed count
|
||||
}
|
||||
|
||||
// StatsCity struct.
|
||||
type StatsCity struct {
|
||||
Count int `json:"count"` // Visitors number
|
||||
Name string `json:"name"` // City name
|
||||
Value int `json:"value"` // City ID
|
||||
}
|
||||
|
||||
// StatsCountry struct.
|
||||
type StatsCountry struct {
|
||||
Code string `json:"code"` // Country code
|
||||
Count int `json:"count"` // Visitors number
|
||||
Name string `json:"name"` // Country name
|
||||
Value int `json:"value"` // Country ID
|
||||
}
|
||||
|
||||
// StatsPeriod struct.
|
||||
type StatsPeriod struct {
|
||||
Activity StatsActivity `json:"activity"`
|
||||
PeriodFrom int `json:"period_from"` // Unix timestamp
|
||||
PeriodTo int `json:"period_to"` // Unix timestamp
|
||||
Reach StatsReach `json:"reach"`
|
||||
Visitors StatsViews `json:"visitors"`
|
||||
}
|
||||
|
||||
// StatsReach struct.
|
||||
type StatsReach struct {
|
||||
Age []StatsSexAge `json:"age"`
|
||||
Cities []StatsCity `json:"cities"`
|
||||
Countries []StatsCountry `json:"countries"`
|
||||
MobileReach int `json:"mobile_reach"` // Reach count from mobile devices
|
||||
Reach int `json:"reach"` // Reach count
|
||||
ReachSubscribers int `json:"reach_subscribers"` // Subscribers reach count
|
||||
Sex []StatsSexAge `json:"sex"`
|
||||
SexAge []StatsSexAge `json:"sex_age"`
|
||||
}
|
||||
|
||||
// StatsSexAge struct.
|
||||
type StatsSexAge struct {
|
||||
Count int `json:"count"` // Visitors number
|
||||
Value string `json:"value"` // Sex/age value
|
||||
}
|
||||
|
||||
// StatsViews struct.
|
||||
type StatsViews struct {
|
||||
Age []StatsSexAge `json:"age"`
|
||||
Cities []StatsCity `json:"cities"`
|
||||
Countries []StatsCountry `json:"countries"`
|
||||
MobileViews int `json:"mobile_views"` // Number of views from mobile devices
|
||||
Sex []StatsSexAge `json:"sex"`
|
||||
SexAge []StatsSexAge `json:"sex_age"`
|
||||
Views int `json:"views"` // Views number
|
||||
Visitors int `json:"visitors"` // Visitors number
|
||||
}
|
||||
|
||||
// StatsWallpostStat struct.
|
||||
type StatsWallpostStat struct {
|
||||
Hide int `json:"hide"` // Hidings number
|
||||
JoinGroup int `json:"join_group"` // People have joined the group
|
||||
Links int `json:"links"` // Link click-through
|
||||
ReachSubscribers int `json:"reach_subscribers"` // Subscribers reach
|
||||
ReachTotal int `json:"reach_total"` // Total reach
|
||||
Report int `json:"report"` // Reports number
|
||||
ToGroup int `json:"to_group"` // Click-through to community
|
||||
Unsubscribe int `json:"unsubscribe"` // Unsubscribed members
|
||||
}
|
335
vendor/github.com/SevereCloud/vksdk/v2/object/stories.go
generated
vendored
Normal file
335
vendor/github.com/SevereCloud/vksdk/v2/object/stories.go
generated
vendored
Normal file
@ -0,0 +1,335 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// StoriesViewer struct.
|
||||
type StoriesViewer struct {
|
||||
IsLiked bool `json:"is_liked"`
|
||||
UserID int `json:"user_id"`
|
||||
|
||||
// For extended
|
||||
User struct {
|
||||
Type string `json:"type"`
|
||||
ID int `json:"id"`
|
||||
FirstName string `json:"first_name"`
|
||||
LastName string `json:"last_name"`
|
||||
IsClosed bool `json:"is_closed"`
|
||||
CanAccessClosed bool `json:"can_access_closed"`
|
||||
} `json:"user,omitempty"`
|
||||
}
|
||||
|
||||
// StoriesNarrativeInfo type.
|
||||
type StoriesNarrativeInfo struct {
|
||||
Author string `json:"author"`
|
||||
Title string `json:"title"`
|
||||
Views int `json:"views"`
|
||||
}
|
||||
|
||||
// StoriesPromoData struct.
|
||||
type StoriesPromoData struct {
|
||||
Name string `json:"name"`
|
||||
Photo50 string `json:"photo_50"`
|
||||
Photo100 string `json:"photo_100"`
|
||||
NotAnimated BaseBoolInt `json:"not_animated"`
|
||||
}
|
||||
|
||||
// StoriesStoryLink struct.
|
||||
type StoriesStoryLink struct {
|
||||
Text string `json:"text"` // Link text
|
||||
URL string `json:"url"` // Link URL
|
||||
}
|
||||
|
||||
// StoriesReplies struct.
|
||||
type StoriesReplies struct {
|
||||
Count int `json:"count"` // Replies number.
|
||||
New int `json:"new"` // New replies number.
|
||||
}
|
||||
|
||||
// StoriesQuestions struct.
|
||||
type StoriesQuestions struct {
|
||||
Count int `json:"count"` // Replies number.
|
||||
New int `json:"new"` // New replies number.
|
||||
}
|
||||
|
||||
// StoriesStoryStats struct.
|
||||
type StoriesStoryStats struct {
|
||||
Answer StoriesStoryStatsStat `json:"answer"`
|
||||
Bans StoriesStoryStatsStat `json:"bans"`
|
||||
OpenLink StoriesStoryStatsStat `json:"open_link"`
|
||||
Replies StoriesStoryStatsStat `json:"replies"`
|
||||
Shares StoriesStoryStatsStat `json:"shares"`
|
||||
Subscribers StoriesStoryStatsStat `json:"subscribers"`
|
||||
Views StoriesStoryStatsStat `json:"views"`
|
||||
Likes StoriesStoryStatsStat `json:"likes"`
|
||||
}
|
||||
|
||||
// StoriesStoryStatsStat struct.
|
||||
type StoriesStoryStatsStat struct {
|
||||
Count int `json:"count"` // Stat value
|
||||
State string `json:"state"`
|
||||
}
|
||||
|
||||
// StoriesStoryType story type.
|
||||
type StoriesStoryType string
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
StoriesStoryPhoto StoriesStoryType = "photo"
|
||||
StoriesStoryVideo StoriesStoryType = "video"
|
||||
StoriesStoryLiveActive StoriesStoryType = "live_active"
|
||||
StoriesStoryLiveFinished StoriesStoryType = "live_finished"
|
||||
StoriesStoryBirthdayInvite StoriesStoryType = "birthday_invite"
|
||||
)
|
||||
|
||||
// StoriesStory struct.
|
||||
type StoriesStory struct {
|
||||
AccessKey string `json:"access_key"` // Access key for private object.
|
||||
ExpiresAt int `json:"expires_at"` // Story expiration time. Unixtime.
|
||||
CanHide BaseBoolInt `json:"can_hide"`
|
||||
// Information whether story has question sticker and current user can send question to the author
|
||||
CanAsk BaseBoolInt `json:"can_ask"`
|
||||
// Information whether story has question sticker and current user can send anonymous question to the author
|
||||
CanAskAnonymous BaseBoolInt `json:"can_ask_anonymous"`
|
||||
|
||||
// Information whether current user can comment the story (0 - no, 1 - yes).
|
||||
CanComment BaseBoolInt `json:"can_comment"`
|
||||
|
||||
// Information whether current user can reply to the story
|
||||
// (0 - no, 1 - yes).
|
||||
CanReply BaseBoolInt `json:"can_reply"`
|
||||
|
||||
// Information whether current user can see the story (0 - no, 1 - yes).
|
||||
CanSee BaseBoolInt `json:"can_see"`
|
||||
|
||||
// Information whether current user can share the story (0 - no, 1 - yes).
|
||||
CanShare BaseBoolInt `json:"can_share"`
|
||||
|
||||
// Information whether the story is deleted (false - no, true - yes).
|
||||
IsDeleted BaseBoolInt `json:"is_deleted"`
|
||||
|
||||
// Information whether the story is expired (false - no, true - yes).
|
||||
IsExpired BaseBoolInt `json:"is_expired"`
|
||||
|
||||
// Is video without sound
|
||||
NoSound BaseBoolInt `json:"no_sound"`
|
||||
|
||||
// Does author have stories privacy restrictions
|
||||
IsRestricted BaseBoolInt `json:"is_restricted"`
|
||||
|
||||
CanUseInNarrative BaseBoolInt `json:"can_use_in_narrative"`
|
||||
|
||||
// Information whether current user has seen the story or not
|
||||
// (0 - no, 1 - yes).
|
||||
Seen BaseBoolInt `json:"seen"`
|
||||
IsOwnerPinned BaseBoolInt `json:"is_owner_pinned"`
|
||||
IsOneTime BaseBoolInt `json:"is_one_time"`
|
||||
NeedMute BaseBoolInt `json:"need_mute"`
|
||||
MuteReply BaseBoolInt `json:"mute_reply"`
|
||||
CanLike BaseBoolInt `json:"can_like"`
|
||||
Date int `json:"date"` // Date when story has been added in Unixtime.
|
||||
ID int `json:"id"` // Story ID.
|
||||
Link StoriesStoryLink `json:"link"`
|
||||
OwnerID int `json:"owner_id"` // Story owner's ID.
|
||||
ParentStory *StoriesStory `json:"parent_story"`
|
||||
ParentStoryAccessKey string `json:"parent_story_access_key"` // Access key for private object.
|
||||
ParentStoryID int `json:"parent_story_id"` // Parent story ID.
|
||||
ParentStoryOwnerID int `json:"parent_story_owner_id"` // Parent story owner's ID.
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Replies StoriesReplies `json:"replies"` // Replies to current story.
|
||||
Type string `json:"type"`
|
||||
Video VideoVideo `json:"video"`
|
||||
Views int `json:"views"` // Views number.
|
||||
ClickableStickers StoriesClickableStickers `json:"clickable_stickers"`
|
||||
TrackCode string `json:"track_code"`
|
||||
LikesCount int `json:"likes_count"`
|
||||
NarrativeID int `json:"narrative_id"`
|
||||
NarrativeOwnerID int `json:"narrative_owner_id"`
|
||||
NarrativeInfo StoriesNarrativeInfo `json:"narrative_info"`
|
||||
NarrativesCount int `json:"narratives_count"`
|
||||
FirstNarrativeTitle string `json:"first_narrative_title"`
|
||||
Questions StoriesQuestions `json:"questions"`
|
||||
}
|
||||
|
||||
// StoriesFeedItemType type.
|
||||
type StoriesFeedItemType string
|
||||
|
||||
// Possible values.
|
||||
const (
|
||||
StoriesFeedItemStories StoriesFeedItemType = "stories"
|
||||
StoriesFeedItemCommunity StoriesFeedItemType = "community_grouped_stories"
|
||||
StoriesFeedItemApp StoriesFeedItemType = "app_grouped_stories"
|
||||
)
|
||||
|
||||
// StoriesFeedItem struct.
|
||||
type StoriesFeedItem struct {
|
||||
Type StoriesFeedItemType `json:"type"`
|
||||
ID string `json:"id"`
|
||||
Stories []StoriesStory `json:"stories"`
|
||||
Grouped StoriesFeedItemType `json:"grouped"`
|
||||
App AppsApp `json:"app"`
|
||||
}
|
||||
|
||||
// StoriesClickableStickers struct.
|
||||
//
|
||||
// The field clickable_stickers is available in the history object.
|
||||
// The sticker object is pasted by the developer on the client himself, only
|
||||
// coordinates are transmitted to the server.
|
||||
//
|
||||
// https://vk.com/dev/objects/clickable_stickers
|
||||
type StoriesClickableStickers struct {
|
||||
OriginalWidth int `json:"original_width"`
|
||||
OriginalHeight int `json:"original_height"`
|
||||
ClickableStickers []StoriesClickableSticker `json:"clickable_stickers"`
|
||||
}
|
||||
|
||||
// NewClickableStickers return new StoriesClickableStickers.
|
||||
//
|
||||
// Requires the width and height of the original photo or video.
|
||||
func NewClickableStickers(width, height int) *StoriesClickableStickers {
|
||||
return &StoriesClickableStickers{
|
||||
OriginalWidth: width,
|
||||
OriginalHeight: height,
|
||||
ClickableStickers: []StoriesClickableSticker{},
|
||||
}
|
||||
}
|
||||
|
||||
// AddMention add mention sticker.
|
||||
//
|
||||
// Mention should be in the format of a VK mentioning, for example: [id1|name] or [club1|name].
|
||||
func (cs *StoriesClickableStickers) AddMention(mention string, area []StoriesClickablePoint) *StoriesClickableStickers {
|
||||
cs.ClickableStickers = append(cs.ClickableStickers, StoriesClickableSticker{
|
||||
Type: ClickableStickerMention,
|
||||
ClickableArea: area,
|
||||
Mention: mention,
|
||||
})
|
||||
|
||||
return cs
|
||||
}
|
||||
|
||||
// AddHashtag add hashtag sticker.
|
||||
//
|
||||
// Hashtag must necessarily begin with the symbol #.
|
||||
func (cs *StoriesClickableStickers) AddHashtag(hashtag string, area []StoriesClickablePoint) *StoriesClickableStickers {
|
||||
cs.ClickableStickers = append(cs.ClickableStickers, StoriesClickableSticker{
|
||||
Type: ClickableStickerHashtag,
|
||||
ClickableArea: area,
|
||||
Hashtag: hashtag,
|
||||
})
|
||||
|
||||
return cs
|
||||
}
|
||||
|
||||
// TODO: Add more clickable stickers func
|
||||
|
||||
// ToJSON returns the JSON encoding of StoriesClickableStickers.
|
||||
func (cs StoriesClickableStickers) ToJSON() string {
|
||||
b, _ := json.Marshal(cs)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// StoriesClickableSticker struct.
|
||||
type StoriesClickableSticker struct { // nolint: maligned
|
||||
ID int `json:"id"`
|
||||
Type string `json:"type"`
|
||||
ClickableArea []StoriesClickablePoint `json:"clickable_area"`
|
||||
Style string `json:"style,omitempty"`
|
||||
|
||||
// type=post
|
||||
PostOwnerID int `json:"post_owner_id,omitempty"`
|
||||
PostID int `json:"post_id,omitempty"`
|
||||
|
||||
// type=sticker
|
||||
StickerID int `json:"sticker_id,omitempty"`
|
||||
StickerPackID int `json:"sticker_pack_id,omitempty"`
|
||||
|
||||
// type=place
|
||||
PlaceID int `json:"place_id,omitempty"`
|
||||
|
||||
// type=question
|
||||
Question string `json:"question,omitempty"`
|
||||
QuestionButton string `json:"question_button,omitempty"`
|
||||
QuestionDefaultPrivate BaseBoolInt `json:"question_default_private,omitempty"`
|
||||
Color string `json:"color,omitempty"`
|
||||
|
||||
// type=mention
|
||||
Mention string `json:"mention,omitempty"`
|
||||
|
||||
// type=hashtag
|
||||
Hashtag string `json:"hashtag,omitempty"`
|
||||
|
||||
// type=link
|
||||
LinkObject BaseLink `json:"link_object,omitempty"`
|
||||
TooltipText string `json:"tooltip_text,omitempty"`
|
||||
|
||||
// type=market_item
|
||||
Subtype string `json:"subtype,omitempty"`
|
||||
// LinkObject BaseLink `json:"link_object,omitempty"` // subtype=aliexpress_product
|
||||
MarketItem MarketMarketItem `json:"market_item,omitempty"` // subtype=market_item
|
||||
|
||||
// type=story_reply
|
||||
OwnerID int `json:"owner_id,omitempty"`
|
||||
StoryID int `json:"story_id,omitempty"`
|
||||
|
||||
// type=owner
|
||||
// OwnerID int `json:"owner_id,omitempty"`
|
||||
|
||||
// type=poll
|
||||
Poll PollsPoll `json:"poll,omitempty"`
|
||||
|
||||
// type=music
|
||||
Audio AudioAudio `json:"audio,omitempty"`
|
||||
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"`
|
||||
}
|
||||
|
||||
// TODO: сделать несколько структур для кликабельного стикера
|
||||
|
||||
// Type of clickable sticker.
|
||||
const (
|
||||
ClickableStickerPost = "post"
|
||||
ClickableStickerSticker = "sticker"
|
||||
ClickableStickerPlace = "place"
|
||||
ClickableStickerQuestion = "question"
|
||||
ClickableStickerMention = "mention"
|
||||
ClickableStickerHashtag = "hashtag"
|
||||
ClickableStickerMarketItem = "market_item"
|
||||
ClickableStickerLink = "link"
|
||||
ClickableStickerStoryReply = "story_reply"
|
||||
ClickableStickerOwner = "owner"
|
||||
ClickableStickerPoll = "poll"
|
||||
ClickableStickerMusic = "music"
|
||||
ClickableStickerApp = "app"
|
||||
)
|
||||
|
||||
// Subtype of clickable sticker.
|
||||
const (
|
||||
ClickableStickerSubtypeMarketItem = "market_item"
|
||||
ClickableStickerSubtypeAliexpressProduct = "aliexpress_product"
|
||||
)
|
||||
|
||||
// Clickable sticker style.
|
||||
const (
|
||||
ClickableStickerTransparent = "transparent"
|
||||
ClickableStickerBlueGradient = "blue_gradient"
|
||||
ClickableStickerRedGradient = "red_gradient"
|
||||
ClickableStickerUnderline = "underline"
|
||||
ClickableStickerBlue = "blue"
|
||||
ClickableStickerGreen = "green"
|
||||
ClickableStickerWhite = "white"
|
||||
ClickableStickerQuestionReply = "question_reply"
|
||||
ClickableStickerLight = "light"
|
||||
ClickableStickerImpressive = "impressive"
|
||||
)
|
||||
|
||||
// StoriesClickablePoint struct.
|
||||
type StoriesClickablePoint struct {
|
||||
X int `json:"x"`
|
||||
Y int `json:"y"`
|
||||
}
|
299
vendor/github.com/SevereCloud/vksdk/v2/object/users.go
generated
vendored
Normal file
299
vendor/github.com/SevereCloud/vksdk/v2/object/users.go
generated
vendored
Normal file
@ -0,0 +1,299 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// User relationship status.
|
||||
const (
|
||||
UserRelationNotSpecified = iota // not specified
|
||||
UserRelationSingle // single
|
||||
UserRelationInRelationship // in a relationship
|
||||
UserRelationEngaged // engaged
|
||||
UserRelationMarried // married
|
||||
UserRelationComplicated // complicated
|
||||
UserRelationActivelySearching // actively searching
|
||||
UserRelationInLove // in love
|
||||
UserRelationCivilUnion // in a civil union
|
||||
)
|
||||
|
||||
// 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"`
|
||||
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"`
|
||||
}
|
||||
|
||||
// ToMention return mention.
|
||||
func (user UsersUser) ToMention() string {
|
||||
return fmt.Sprintf("[id%d|%s %s]", user.ID, user.FirstName, user.LastName)
|
||||
}
|
||||
|
||||
// UsersOnlineInfo struct.
|
||||
type UsersOnlineInfo struct {
|
||||
AppID int `json:"app_id"`
|
||||
LastSeen int `json:"last_seen"`
|
||||
Status string `json:"status"`
|
||||
Visible BaseBoolInt `json:"visible"`
|
||||
IsOnline BaseBoolInt `json:"is_online"`
|
||||
IsMobile BaseBoolInt `json:"is_mobile"`
|
||||
}
|
||||
|
||||
// UsersUserMin struct.
|
||||
type UsersUserMin struct {
|
||||
Deactivated string `json:"deactivated"` // Returns if a profile is deleted or blocked
|
||||
FirstName string `json:"first_name"` // User first name
|
||||
Hidden int `json:"hidden"` // Returns if a profile is hidden.
|
||||
ID int `json:"id"` // User ID
|
||||
LastName string `json:"last_name"` // User last name
|
||||
}
|
||||
|
||||
// ToMention return mention.
|
||||
func (user UsersUserMin) ToMention() string {
|
||||
return fmt.Sprintf("[id%d|%s %s]", user.ID, user.FirstName, user.LastName)
|
||||
}
|
||||
|
||||
// UsersCareer struct.
|
||||
type UsersCareer struct {
|
||||
CityID int `json:"city_id"` // City ID
|
||||
CityName string `json:"city_name"` // City name
|
||||
Company string `json:"company"` // Company name
|
||||
CountryID int `json:"country_id"` // Country ID
|
||||
From int `json:"from"` // From year
|
||||
GroupID int `json:"group_id"` // Community ID
|
||||
ID int `json:"id"` // Career ID
|
||||
Position string `json:"position"` // Position
|
||||
Until int `json:"until"` // Till year
|
||||
}
|
||||
|
||||
// UsersCropPhoto struct.
|
||||
type UsersCropPhoto struct {
|
||||
Crop UsersCropPhotoCrop `json:"crop"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Rect UsersCropPhotoRect `json:"rect"`
|
||||
}
|
||||
|
||||
// UsersCropPhotoCrop struct.
|
||||
type UsersCropPhotoCrop struct {
|
||||
X float64 `json:"x"` // Coordinate X of the left upper corner
|
||||
X2 float64 `json:"x2"` // Coordinate X of the right lower corner
|
||||
Y float64 `json:"y"` // Coordinate Y of the left upper corner
|
||||
Y2 float64 `json:"y2"` // Coordinate Y of the right lower corner
|
||||
}
|
||||
|
||||
// UsersCropPhotoRect struct.
|
||||
type UsersCropPhotoRect struct {
|
||||
X float64 `json:"x"` // Coordinate X of the left upper corner
|
||||
X2 float64 `json:"x2"` // Coordinate X of the right lower corner
|
||||
Y float64 `json:"y"` // Coordinate Y of the left upper corner
|
||||
Y2 float64 `json:"y2"` // Coordinate Y of the right lower corner
|
||||
}
|
||||
|
||||
// UsersExports struct.
|
||||
type UsersExports struct {
|
||||
Facebook int `json:"facebook"`
|
||||
Livejournal int `json:"livejournal"`
|
||||
Twitter int `json:"twitter"`
|
||||
}
|
||||
|
||||
// UsersLastSeen struct.
|
||||
type UsersLastSeen struct {
|
||||
Platform int `json:"platform"` // Type of the platform that used for the last authorization
|
||||
Time int `json:"time"` // Last visit date (in Unix time)
|
||||
}
|
||||
|
||||
// UsersMilitary struct.
|
||||
type UsersMilitary struct {
|
||||
CountryID int `json:"country_id"` // Country ID
|
||||
From int `json:"from"` // From year
|
||||
ID int `json:"id"` // Military ID
|
||||
Unit string `json:"unit"` // Unit name
|
||||
UnitID int `json:"unit_id"` // Unit ID
|
||||
Until int `json:"until"` // Till year
|
||||
}
|
||||
|
||||
// UsersOccupation struct.
|
||||
type UsersOccupation struct {
|
||||
// BUG(VK): UsersOccupation.ID is float https://vk.com/bug136108
|
||||
ID float64 `json:"id"` // ID of school, university, company group
|
||||
Name string `json:"name"` // Name of occupation
|
||||
Type string `json:"type"` // Type of occupation
|
||||
}
|
||||
|
||||
// UsersPersonal struct.
|
||||
type UsersPersonal struct {
|
||||
Alcohol int `json:"alcohol"` // User's views on alcohol
|
||||
InspiredBy string `json:"inspired_by"` // User's inspired by
|
||||
Langs []string `json:"langs"`
|
||||
LifeMain int `json:"life_main"` // User's personal priority in life
|
||||
PeopleMain int `json:"people_main"` // User's personal priority in people
|
||||
Political int `json:"political"` // User's political views
|
||||
Religion string `json:"religion"` // User's religion
|
||||
Smoking int `json:"smoking"` // User's views on smoking
|
||||
ReligionID int `json:"religion_id"`
|
||||
}
|
||||
|
||||
// UsersRelative struct.
|
||||
type UsersRelative struct {
|
||||
BirthDate string `json:"birth_date"` // Date of child birthday (format dd.mm.yyyy)
|
||||
ID int `json:"id"` // Relative ID
|
||||
Name string `json:"name"` // Name of relative
|
||||
Type string `json:"type"` // Relative type
|
||||
}
|
||||
|
||||
// UsersSchool struct.
|
||||
type UsersSchool struct {
|
||||
City int `json:"city"` // City ID
|
||||
Class string `json:"class"` // School class letter
|
||||
Country int `json:"country"` // Country ID
|
||||
ID string `json:"id"` // School ID
|
||||
Name string `json:"name"` // School name
|
||||
Type int `json:"type"` // School type ID
|
||||
TypeStr string `json:"type_str"` // School type name
|
||||
YearFrom int `json:"year_from"` // Year the user started to study
|
||||
YearGraduated int `json:"year_graduated"` // Graduation year
|
||||
YearTo int `json:"year_to"` // Year the user finished to study
|
||||
Speciality string `json:"speciality,omitempty"`
|
||||
}
|
||||
|
||||
// UsersUniversity struct.
|
||||
type UsersUniversity struct {
|
||||
Chair int `json:"chair"` // Chair ID
|
||||
ChairName string `json:"chair_name"` // Chair name
|
||||
City int `json:"city"` // City ID
|
||||
Country int `json:"country"` // Country ID
|
||||
EducationForm string `json:"education_form"` // Education form
|
||||
EducationStatus string `json:"education_status"` // Education status
|
||||
Faculty int `json:"faculty"` // Faculty ID
|
||||
FacultyName string `json:"faculty_name"` // Faculty name
|
||||
Graduation int `json:"graduation"` // Graduation year
|
||||
ID int `json:"id"` // University ID
|
||||
Name string `json:"name"` // University name
|
||||
}
|
||||
|
||||
// UsersUserCounters struct.
|
||||
type UsersUserCounters struct {
|
||||
Albums int `json:"albums"` // Albums number
|
||||
Audios int `json:"audios"` // Audios number
|
||||
Followers int `json:"followers"` // Followers number
|
||||
Friends int `json:"friends"` // Friends number
|
||||
Gifts int `json:"gifts"` // Gifts number
|
||||
Groups int `json:"groups"` // Communities number
|
||||
Notes int `json:"notes"` // Notes number
|
||||
OnlineFriends int `json:"online_friends"` // Online friends number
|
||||
Pages int `json:"pages"` // Public pages number
|
||||
Photos int `json:"photos"` // Photos number
|
||||
Subscriptions int `json:"subscriptions"` // Subscriptions number
|
||||
UserPhotos int `json:"user_photos"` // Number of photos with user
|
||||
UserVideos int `json:"user_videos"` // Number of videos with user
|
||||
Videos int `json:"videos"` // Videos number
|
||||
MutualFriends int `json:"mutual_friends"`
|
||||
}
|
||||
|
||||
// UsersUserLim struct.
|
||||
type UsersUserLim struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
NameGen string `json:"name_gen"`
|
||||
Photo string `json:"photo"`
|
||||
}
|
93
vendor/github.com/SevereCloud/vksdk/v2/object/utils.go
generated
vendored
Normal file
93
vendor/github.com/SevereCloud/vksdk/v2/object/utils.go
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// UtilsDomainResolvedType object type.
|
||||
const (
|
||||
UtilsDomainResolvedTypeUser = "user"
|
||||
UtilsDomainResolvedTypeGroup = "group"
|
||||
UtilsDomainResolvedTypeApplication = "application"
|
||||
UtilsDomainResolvedTypePage = "page"
|
||||
UtilsDomainResolvedTypeVkApp = "vk_app"
|
||||
)
|
||||
|
||||
// UtilsDomainResolved struct.
|
||||
type UtilsDomainResolved struct {
|
||||
ObjectID int `json:"object_id"` // Object ID
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// UtilsLastShortenedLink struct.
|
||||
type UtilsLastShortenedLink struct {
|
||||
AccessKey string `json:"access_key"` // Access key for private stats
|
||||
Key string `json:"key"` // Link key (characters after vk.cc/)
|
||||
ShortURL string `json:"short_url"` // Short link URL
|
||||
Timestamp int `json:"timestamp"` // Creation time in Unixtime
|
||||
URL string `json:"url"` // Full URL
|
||||
Views int `json:"views"` // Total views number
|
||||
}
|
||||
|
||||
// Link status.
|
||||
const (
|
||||
UtilsLinkCheckedStatusNotBanned = "not_banned"
|
||||
UtilsLinkCheckedStatusBanned = "banned"
|
||||
UtilsLinkCheckedStatusProcessing = "processing"
|
||||
)
|
||||
|
||||
// UtilsLinkChecked struct.
|
||||
type UtilsLinkChecked struct {
|
||||
Link string `json:"link"` // Link URL
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
// UtilsLinkStats struct.
|
||||
type UtilsLinkStats struct {
|
||||
Key string `json:"key"` // Link key (characters after vk.cc/)
|
||||
Stats []UtilsStats `json:"stats"`
|
||||
}
|
||||
|
||||
// UtilsLinkStatsExtended struct.
|
||||
type UtilsLinkStatsExtended struct {
|
||||
Key string `json:"key"` // Link key (characters after vk.cc/)
|
||||
Stats []UtilsStatsExtended `json:"stats"`
|
||||
}
|
||||
|
||||
// UtilsShortLink struct.
|
||||
type UtilsShortLink struct {
|
||||
AccessKey string `json:"access_key"` // Access key for private stats
|
||||
Key string `json:"key"` // Link key (characters after vk.cc/)
|
||||
ShortURL string `json:"short_url"` // Short link URL
|
||||
URL string `json:"url"` // Full URL
|
||||
}
|
||||
|
||||
// UtilsStats struct.
|
||||
type UtilsStats struct {
|
||||
Timestamp int `json:"timestamp"` // Start time
|
||||
Views int `json:"views"` // Total views number
|
||||
}
|
||||
|
||||
// UtilsStatsCity struct.
|
||||
type UtilsStatsCity struct {
|
||||
CityID int `json:"city_id"` // City ID
|
||||
Views int `json:"views"` // Views number
|
||||
}
|
||||
|
||||
// UtilsStatsCountry struct.
|
||||
type UtilsStatsCountry struct {
|
||||
CountryID int `json:"country_id"` // Country ID
|
||||
Views int `json:"views"` // Views number
|
||||
}
|
||||
|
||||
// UtilsStatsExtended struct.
|
||||
type UtilsStatsExtended struct {
|
||||
Cities []UtilsStatsCity `json:"cities"`
|
||||
Countries []UtilsStatsCountry `json:"countries"`
|
||||
SexAge []UtilsStatsSexAge `json:"sex_age"`
|
||||
Timestamp int `json:"timestamp"` // Start time
|
||||
Views int `json:"views"` // Total views number
|
||||
}
|
||||
|
||||
// UtilsStatsSexAge struct.
|
||||
type UtilsStatsSexAge struct {
|
||||
AgeRange string `json:"age_range"` // Age denotation
|
||||
Female int `json:"female"` // Views by female users
|
||||
Male int `json:"male"` // Views by male users
|
||||
}
|
277
vendor/github.com/SevereCloud/vksdk/v2/object/video.go
generated
vendored
Normal file
277
vendor/github.com/SevereCloud/vksdk/v2/object/video.go
generated
vendored
Normal file
@ -0,0 +1,277 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// VideoVideo struct.
|
||||
type VideoVideo struct {
|
||||
// Video access key.
|
||||
AccessKey string `json:"access_key"`
|
||||
|
||||
// Date when the video has been added in Unixtime.
|
||||
AddingDate int `json:"adding_date"`
|
||||
|
||||
// Information whether current user can add the video.
|
||||
CanAdd BaseBoolInt `json:"can_add"`
|
||||
|
||||
// Information whether current user can add the video to faves.
|
||||
CanAddToFaves BaseBoolInt `json:"can_add_to_faves"`
|
||||
|
||||
// Information whether current user can comment the video.
|
||||
CanComment BaseBoolInt `json:"can_comment"`
|
||||
|
||||
// Information whether current user can edit the video.
|
||||
CanEdit BaseBoolInt `json:"can_edit"`
|
||||
|
||||
// Information whether current user can like the video.
|
||||
CanLike BaseBoolInt `json:"can_like"`
|
||||
|
||||
// Information whether current user can repost this video.
|
||||
CanRepost BaseBoolInt `json:"can_repost"`
|
||||
CanSubscribe BaseBoolInt `json:"can_subscribe"`
|
||||
CanAttachLink BaseBoolInt `json:"can_attach_link"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
IsPrivate BaseBoolInt `json:"is_private"`
|
||||
Added BaseBoolInt `json:"added"`
|
||||
Repeat BaseBoolInt `json:"repeat"` // Information whether the video is repeated
|
||||
ContentRestricted BaseBoolInt `json:"content_restricted"`
|
||||
Live BaseBoolInt `json:"live"` // Returns if the video is a live stream
|
||||
Upcoming BaseBoolInt `json:"upcoming"`
|
||||
Comments int `json:"comments"` // Number of comments
|
||||
Date int `json:"date"` // Date when video has been uploaded in Unixtime
|
||||
Description string `json:"description"` // Video description
|
||||
Duration int `json:"duration"` // Video duration in seconds
|
||||
Files VideoVideoFiles `json:"files"`
|
||||
FirstFrame []VideoVideoImage `json:"first_frame"`
|
||||
Image []VideoVideoImage `json:"image"`
|
||||
Height int `json:"height"` // Video height
|
||||
ID int `json:"id"` // Video ID
|
||||
OwnerID int `json:"owner_id"` // Video owner ID
|
||||
UserID int `json:"user_id"`
|
||||
Photo130 string `json:"photo_130"` // URL of the preview image with 130 px in width
|
||||
Photo320 string `json:"photo_320"` // URL of the preview image with 320 px in width
|
||||
Photo640 string `json:"photo_640"` // URL of the preview image with 640 px in width
|
||||
Photo800 string `json:"photo_800"` // URL of the preview image with 800 px in width
|
||||
Photo1280 string `json:"photo_1280"` // URL of the preview image with 1280 px in width
|
||||
|
||||
// URL of the page with a player that can be used to play the video in the browser.
|
||||
Player string `json:"player"`
|
||||
Processing int `json:"processing"` // Returns if the video is processing
|
||||
Title string `json:"title"` // Video title
|
||||
Type string `json:"type"`
|
||||
Views int `json:"views"` // Number of views
|
||||
Width int `json:"width"` // Video width
|
||||
Platform string `json:"platform"`
|
||||
LocalViews int `json:"local_views"`
|
||||
Likes BaseLikesInfo `json:"likes"` // Count of likes
|
||||
Reposts BaseRepostsInfo `json:"reposts"` // Count of views
|
||||
TrackCode string `json:"track_code"`
|
||||
PrivacyView Privacy `json:"privacy_view"`
|
||||
PrivacyComment Privacy `json:"privacy_comment"`
|
||||
ActionButton VideoActionButton `json:"action_button"`
|
||||
Restriction VideoRestriction `json:"restriction"`
|
||||
ContentRestrictedMessage string `json:"content_restricted_message"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (video VideoVideo) ToAttachment() string {
|
||||
return fmt.Sprintf("video%d_%d", video.OwnerID, video.ID)
|
||||
}
|
||||
|
||||
// VideoRestriction struct.
|
||||
type VideoRestriction struct {
|
||||
Title string `json:"title"`
|
||||
Text string `json:"text"`
|
||||
AlwaysShown BaseBoolInt `json:"always_shown"`
|
||||
Blur BaseBoolInt `json:"blur"`
|
||||
CanPlay BaseBoolInt `json:"can_play"`
|
||||
CanPreview BaseBoolInt `json:"can_preview"`
|
||||
CardIcon []BaseImage `json:"card_icon"`
|
||||
ListIcon []BaseImage `json:"list_icon"`
|
||||
}
|
||||
|
||||
// VideoActionButton struct.
|
||||
type VideoActionButton struct {
|
||||
ID string `json:"id"`
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"`
|
||||
Snippet VideoSnippet `json:"snippet"`
|
||||
}
|
||||
|
||||
// VideoSnippet struct.
|
||||
type VideoSnippet struct {
|
||||
Description string `json:"description"`
|
||||
OpenTitle string `json:"open_title"`
|
||||
Title string `json:"title"`
|
||||
TypeName string `json:"type_name"`
|
||||
Date int `json:"date"`
|
||||
Image []BaseImage `json:"image"`
|
||||
}
|
||||
|
||||
// VideoVideoFiles struct.
|
||||
type VideoVideoFiles struct {
|
||||
External string `json:"external"` // URL of the external player
|
||||
Mp4_1080 string `json:"mp4_1080"` // URL of the mpeg4 file with 1080p quality
|
||||
Mp4_240 string `json:"mp4_240"` // URL of the mpeg4 file with 240p quality
|
||||
Mp4_360 string `json:"mp4_360"` // URL of the mpeg4 file with 360p quality
|
||||
Mp4_480 string `json:"mp4_480"` // URL of the mpeg4 file with 480p quality
|
||||
Mp4_720 string `json:"mp4_720"` // URL of the mpeg4 file with 720p quality
|
||||
Live string `json:"live"`
|
||||
HLS string `json:"hls"`
|
||||
}
|
||||
|
||||
// VideoCatBlock struct.
|
||||
type VideoCatBlock struct {
|
||||
CanHide BaseBoolInt `json:"can_hide"`
|
||||
ID int `json:"id"`
|
||||
Items []VideoCatElement `json:"items"`
|
||||
Name string `json:"name"`
|
||||
Next string `json:"next"`
|
||||
Type string `json:"type"`
|
||||
View string `json:"view"`
|
||||
}
|
||||
|
||||
// VideoCatElement struct.
|
||||
type VideoCatElement struct {
|
||||
CanAdd BaseBoolInt `json:"can_add"`
|
||||
CanEdit BaseBoolInt `json:"can_edit"`
|
||||
IsPrivate BaseBoolInt `json:"is_private"`
|
||||
Comments int `json:"comments"`
|
||||
Count int `json:"count"`
|
||||
Date int `json:"date"`
|
||||
Description string `json:"description"`
|
||||
Duration int `json:"duration"`
|
||||
ID int `json:"id"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
Photo130 string `json:"photo_130"`
|
||||
Photo160 string `json:"photo_160"`
|
||||
Photo320 string `json:"photo_320"`
|
||||
Photo640 string `json:"photo_640"`
|
||||
Photo800 string `json:"photo_800"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
UpdatedTime int `json:"updated_time"`
|
||||
Views int `json:"views"`
|
||||
}
|
||||
|
||||
// VideoSaveResult struct.
|
||||
type VideoSaveResult struct {
|
||||
Description string `json:"description"` // Video description
|
||||
OwnerID int `json:"owner_id"` // Video owner ID
|
||||
Title string `json:"title"` // Video title
|
||||
UploadURL string `json:"upload_url"` // URL for the video uploading
|
||||
VideoID int `json:"video_id"` // Video ID
|
||||
AccessKey string `json:"access_key"` // Video access key
|
||||
}
|
||||
|
||||
// VideoUploadResponse struct.
|
||||
type VideoUploadResponse struct {
|
||||
Size int `json:"size"`
|
||||
VideoID int `json:"video_id"`
|
||||
}
|
||||
|
||||
// VideoVideoAlbum struct.
|
||||
type VideoVideoAlbum struct {
|
||||
ID int `json:"id"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
Title string `json:"title"`
|
||||
}
|
||||
|
||||
// VideoVideoAlbumFull struct.
|
||||
type VideoVideoAlbumFull struct {
|
||||
Count int `json:"count"` // Total number of videos in album
|
||||
ID int `json:"id"` // Album ID
|
||||
Image []VideoVideoImage `json:"image"` // Album cover image in different sizes
|
||||
IsSystem BaseBoolInt `json:"is_system"` // Information whether album is system
|
||||
OwnerID int `json:"owner_id"` // Album owner's ID
|
||||
Photo160 string `json:"photo_160"` // URL of the preview image with 160px in width
|
||||
Photo320 string `json:"photo_320"` // URL of the preview image with 320px in width
|
||||
Title string `json:"title"` // Album title
|
||||
UpdatedTime int `json:"updated_time"` // Date when the album has been updated last time in Unixtime
|
||||
ImageBlur int `json:"image_blur"`
|
||||
Privacy Privacy `json:"privacy"`
|
||||
}
|
||||
|
||||
// VideoVideoFull struct.
|
||||
type VideoVideoFull struct {
|
||||
AccessKey string `json:"access_key"` // Video access key
|
||||
AddingDate int `json:"adding_date"` // Date when the video has been added in Unixtime
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
CanAdd BaseBoolInt `json:"can_add"` // Information whether current user can add the video
|
||||
CanComment BaseBoolInt `json:"can_comment"` // Information whether current user can comment the video
|
||||
CanEdit BaseBoolInt `json:"can_edit"` // Information whether current user can edit the video
|
||||
CanRepost BaseBoolInt `json:"can_repost"` // Information whether current user can comment the video
|
||||
CanLike BaseBoolInt `json:"can_like"`
|
||||
CanAddToFaves BaseBoolInt `json:"can_add_to_faves"`
|
||||
Repeat BaseBoolInt `json:"repeat"` // Information whether the video is repeated
|
||||
Comments int `json:"comments"` // Number of comments
|
||||
Date int `json:"date"` // Date when video has been uploaded in Unixtime
|
||||
Description string `json:"description"` // Video description
|
||||
Duration int `json:"duration"` // Video duration in seconds
|
||||
Files VideoVideoFiles `json:"files"`
|
||||
ID int `json:"id"` // Video ID
|
||||
Likes BaseLikes `json:"likes"`
|
||||
Live int `json:"live"` // Returns if the video is live translation
|
||||
OwnerID int `json:"owner_id"` // Video owner ID
|
||||
|
||||
// URL of the page with a player that can be used to play the video in the browser.
|
||||
Player string `json:"player"`
|
||||
Processing int `json:"processing"` // Returns if the video is processing
|
||||
Title string `json:"title"` // Video title
|
||||
Views int `json:"views"` // Number of views
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
Image []VideoVideoImage `json:"image"`
|
||||
FirstFrame []VideoVideoImage `json:"first_frame"`
|
||||
Added int `json:"added"`
|
||||
Type string `json:"type"`
|
||||
Reposts BaseRepostsInfo `json:"reposts"`
|
||||
}
|
||||
|
||||
// ToAttachment return attachment format.
|
||||
func (video VideoVideoFull) ToAttachment() string {
|
||||
return fmt.Sprintf("video%d_%d", video.OwnerID, video.ID)
|
||||
}
|
||||
|
||||
// VideoVideoTag struct.
|
||||
type VideoVideoTag struct {
|
||||
Date int `json:"date"`
|
||||
ID int `json:"id"`
|
||||
PlacerID int `json:"placer_id"`
|
||||
TaggedName string `json:"tagged_name"`
|
||||
UserID int `json:"user_id"`
|
||||
Viewed BaseBoolInt `json:"viewed"`
|
||||
}
|
||||
|
||||
// VideoVideoTagInfo struct.
|
||||
type VideoVideoTagInfo struct {
|
||||
AccessKey string `json:"access_key"`
|
||||
AddingDate int `json:"adding_date"`
|
||||
CanAdd BaseBoolInt `json:"can_add"`
|
||||
CanEdit BaseBoolInt `json:"can_edit"`
|
||||
Comments int `json:"comments"`
|
||||
Date int `json:"date"`
|
||||
Description string `json:"description"`
|
||||
Duration int `json:"duration"`
|
||||
Files VideoVideoFiles `json:"files"`
|
||||
ID int `json:"id"`
|
||||
Live int `json:"live"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
Photo130 string `json:"photo_130"`
|
||||
Photo320 string `json:"photo_320"`
|
||||
Photo800 string `json:"photo_800"`
|
||||
PlacerID int `json:"placer_id"`
|
||||
Player string `json:"player"`
|
||||
Processing int `json:"processing"`
|
||||
TagCreated int `json:"tag_created"`
|
||||
TagID int `json:"tag_id"`
|
||||
Title string `json:"title"`
|
||||
Views int `json:"views"`
|
||||
}
|
||||
|
||||
// VideoVideoImage struct.
|
||||
type VideoVideoImage struct {
|
||||
BaseImage
|
||||
WithPadding BaseBoolInt `json:"with_padding"`
|
||||
}
|
257
vendor/github.com/SevereCloud/vksdk/v2/object/wall.go
generated
vendored
Normal file
257
vendor/github.com/SevereCloud/vksdk/v2/object/wall.go
generated
vendored
Normal file
@ -0,0 +1,257 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// WallAppPost struct.
|
||||
type WallAppPost struct {
|
||||
ID int `json:"id"` // Application ID
|
||||
Name string `json:"name"` // Application name
|
||||
Photo130 string `json:"photo_130"` // URL of the preview image with 130 px in width
|
||||
Photo604 string `json:"photo_604"` // URL of the preview image with 604 px in width
|
||||
}
|
||||
|
||||
// WallAttachedNote struct.
|
||||
type WallAttachedNote struct {
|
||||
Comments int `json:"comments"` // Comments number
|
||||
Date int `json:"date"` // Date when the note has been created in Unixtime
|
||||
ID int `json:"id"` // Note ID
|
||||
OwnerID int `json:"owner_id"` // Note owner's ID
|
||||
ReadComments int `json:"read_comments"` // Read comments number
|
||||
Title string `json:"title"` // Note title
|
||||
ViewURL string `json:"view_url"` // URL of the page with note preview
|
||||
}
|
||||
|
||||
// WallCommentAttachment struct.
|
||||
type WallCommentAttachment struct {
|
||||
Audio AudioAudio `json:"audio"`
|
||||
Doc DocsDoc `json:"doc"`
|
||||
Link BaseLink `json:"link"`
|
||||
Market MarketMarketItem `json:"market"`
|
||||
MarketMarketAlbum MarketMarketAlbum `json:"market_market_album"`
|
||||
Note WallAttachedNote `json:"note"`
|
||||
Page PagesWikipageFull `json:"page"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
Sticker BaseSticker `json:"sticker"`
|
||||
Type string `json:"type"`
|
||||
Video VideoVideo `json:"video"`
|
||||
Graffiti WallGraffiti `json:"graffiti"`
|
||||
}
|
||||
|
||||
// WallGraffiti struct.
|
||||
type WallGraffiti struct {
|
||||
ID int `json:"id"` // Graffiti ID
|
||||
OwnerID int `json:"owner_id"` // Graffiti owner's ID
|
||||
Photo200 string `json:"photo_200"` // URL of the preview image with 200 px in width
|
||||
Photo586 string `json:"photo_586"` // URL of the preview image with 586 px in width
|
||||
URL string `json:"url"`
|
||||
Width int `json:"width"`
|
||||
Height int `json:"height"`
|
||||
AccessKey string `json:"access_key"`
|
||||
}
|
||||
|
||||
// Type of post source.
|
||||
const (
|
||||
WallPostSourceTypeVk = "vk"
|
||||
WallPostSourceTypeWidget = "widget"
|
||||
WallPostSourceTypeAPI = "api"
|
||||
WallPostSourceTypeRss = "rss"
|
||||
WallPostSourceTypeSms = "sms"
|
||||
)
|
||||
|
||||
// WallPostSource struct.
|
||||
type WallPostSource struct {
|
||||
Link BaseLink `json:"link"`
|
||||
Data string `json:"data"` // Additional data
|
||||
Platform string `json:"platform"` // Platform name
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"` // URL to an external site used to publish the post
|
||||
}
|
||||
|
||||
// WallPostedPhoto struct.
|
||||
type WallPostedPhoto struct {
|
||||
ID int `json:"id"` // Photo ID
|
||||
OwnerID int `json:"owner_id"` // Photo owner's ID
|
||||
Photo130 string `json:"photo_130"` // URL of the preview image with 130 px in width
|
||||
Photo604 string `json:"photo_604"` // URL of the preview image with 604 px in width
|
||||
}
|
||||
|
||||
// WallViews struct.
|
||||
type WallViews struct {
|
||||
Count int `json:"count"` // Count
|
||||
}
|
||||
|
||||
// WallWallCommentThread struct.
|
||||
type WallWallCommentThread struct {
|
||||
Count int `json:"count"` // Comments number
|
||||
Items []WallWallComment `json:"items"`
|
||||
CanPost BaseBoolInt `json:"can_post"` // Information whether current user can comment the post
|
||||
GroupsCanPost BaseBoolInt `json:"groups_can_post"` // Information whether groups can comment the post
|
||||
ShowReplyButton BaseBoolInt `json:"show_reply_button"`
|
||||
}
|
||||
|
||||
// WallWallComment struct.
|
||||
type WallWallComment struct {
|
||||
Attachments []WallCommentAttachment `json:"attachments"`
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
Deleted BaseBoolInt `json:"deleted"`
|
||||
FromID int `json:"from_id"` // Author ID
|
||||
ID int `json:"id"` // Comment ID
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
RealOffset int `json:"real_offset"` // Real position of the comment
|
||||
ReplyToComment int `json:"reply_to_comment"` // Replied comment ID
|
||||
ReplyToUser int `json:"reply_to_user"` // Replied user ID
|
||||
Text string `json:"text"` // Comment text
|
||||
PostID int `json:"post_id"`
|
||||
PostOwnerID int `json:"post_owner_id"`
|
||||
PhotoID int `json:"photo_id"`
|
||||
PhotoOwnerID int `json:"photo_owner_id"`
|
||||
VideoID int `json:"video_id"`
|
||||
VideoOwnerID int `json:"video_owner_id"`
|
||||
ItemID int `json:"item_id"`
|
||||
MarketOwnerID int `json:"market_owner_id"`
|
||||
ParentsStack []int `json:"parents_stack"`
|
||||
OwnerID int `json:"owner_id"`
|
||||
Thread WallWallCommentThread `json:"thread"`
|
||||
Donut WallWallCommentDonut `json:"donut"`
|
||||
}
|
||||
|
||||
// WallWallCommentDonut info about VK Donut.
|
||||
type WallWallCommentDonut struct {
|
||||
IsDonut BaseBoolInt `json:"is_donut"`
|
||||
Placeholder string `json:"placeholder"`
|
||||
}
|
||||
|
||||
// WallPost type.
|
||||
const (
|
||||
WallPostTypePost = "post"
|
||||
WallPostTypeCopy = "copy"
|
||||
WallPostTypeReply = "reply"
|
||||
WallPostTypePostpone = "postpone"
|
||||
WallPostTypeSuggest = "suggest"
|
||||
)
|
||||
|
||||
// WallWallpost struct.
|
||||
type WallWallpost struct {
|
||||
AccessKey string `json:"access_key"` // Access key to private object
|
||||
ID int `json:"id"` // Post ID
|
||||
OwnerID int `json:"owner_id"` // Wall owner's ID
|
||||
FromID int `json:"from_id"` // Post author ID
|
||||
CreatedBy int `json:"created_by"`
|
||||
Date int `json:"date"` // Date of publishing in Unixtime
|
||||
Text string `json:"text"` // Post text
|
||||
ReplyOwnerID int `json:"reply_owner_id"`
|
||||
ReplyPostID int `json:"reply_post_id"`
|
||||
FriendsOnly int `json:"friends_only"`
|
||||
Comments BaseCommentsInfo `json:"comments"`
|
||||
Likes BaseLikesInfo `json:"likes"` // Count of likes
|
||||
Reposts BaseRepostsInfo `json:"reposts"` // Count of views
|
||||
Views WallViews `json:"views"` // Count of views
|
||||
PostType string `json:"post_type"`
|
||||
PostSource WallPostSource `json:"post_source"`
|
||||
Attachments []WallWallpostAttachment `json:"attachments"`
|
||||
Geo BaseGeo `json:"geo"`
|
||||
SignerID int `json:"signer_id"` // Post signer ID
|
||||
CopyHistory []WallWallpost `json:"copy_history"`
|
||||
CanPin BaseBoolInt `json:"can_pin"`
|
||||
CanDelete BaseBoolInt `json:"can_delete"`
|
||||
CanEdit BaseBoolInt `json:"can_edit"`
|
||||
IsPinned BaseBoolInt `json:"is_pinned"`
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"` // Information whether the post in favorites list
|
||||
IsArchived BaseBoolInt `json:"is_archived"` // Is post archived, only for post owners
|
||||
MarkedAsAds BaseBoolInt `json:"marked_as_ads"`
|
||||
Edited int `json:"edited"` // Date of editing in Unixtime
|
||||
Copyright WallPostCopyright `json:"copyright"`
|
||||
PostID int `json:"post_id"`
|
||||
ParentsStack []int `json:"parents_stack"`
|
||||
Donut WallWallpostDonut `json:"donut"` // need api v5.125
|
||||
ShortTextRate float64 `json:"short_text_rate"`
|
||||
CarouselOffset int `json:"carousel_offset"`
|
||||
}
|
||||
|
||||
// Attachment type.
|
||||
//
|
||||
// TODO: check this.
|
||||
const (
|
||||
AttachmentTypePhoto = "photo"
|
||||
AttachmentTypePostedPhoto = "posted_photo"
|
||||
AttachmentTypeAudio = "audio"
|
||||
AttachmentTypeVideo = "video"
|
||||
AttachmentTypeDoc = "doc"
|
||||
AttachmentTypeLink = "link"
|
||||
AttachmentTypeGraffiti = "graffiti"
|
||||
AttachmentTypeNote = "note"
|
||||
AttachmentTypeApp = "app"
|
||||
AttachmentTypePoll = "poll"
|
||||
AttachmentTypePage = "page"
|
||||
AttachmentTypeAlbum = "album"
|
||||
AttachmentTypePhotosList = "photos_list"
|
||||
AttachmentTypeMarketAlbum = "market_album"
|
||||
AttachmentTypeMarket = "market"
|
||||
AttachmentTypeEvent = "event"
|
||||
AttachmentTypeWall = "wall"
|
||||
AttachmentTypeStory = "story"
|
||||
AttachmentTypePodcast = "podcast"
|
||||
)
|
||||
|
||||
// WallWallpostAttachment struct.
|
||||
type WallWallpostAttachment struct {
|
||||
AccessKey string `json:"access_key"` // Access key for the audio
|
||||
Album PhotosPhotoAlbum `json:"album"`
|
||||
App WallAppPost `json:"app"`
|
||||
Audio AudioAudio `json:"audio"`
|
||||
Doc DocsDoc `json:"doc"`
|
||||
Event EventsEventAttach `json:"event"`
|
||||
Graffiti WallGraffiti `json:"graffiti"`
|
||||
Link BaseLink `json:"link"`
|
||||
Market MarketMarketItem `json:"market"`
|
||||
MarketMarketAlbum MarketMarketAlbum `json:"market_market_album"`
|
||||
Note WallAttachedNote `json:"note"`
|
||||
Page PagesWikipageFull `json:"page"`
|
||||
Photo PhotosPhoto `json:"photo"`
|
||||
PhotosList []string `json:"photos_list"`
|
||||
Poll PollsPoll `json:"poll"`
|
||||
PostedPhoto WallPostedPhoto `json:"posted_photo"`
|
||||
Type string `json:"type"`
|
||||
Video VideoVideo `json:"video"`
|
||||
Podcast PodcastsEpisode `json:"podcast"`
|
||||
}
|
||||
|
||||
// WallWallpostToID struct.
|
||||
type WallWallpostToID struct {
|
||||
Attachments []WallWallpostAttachment `json:"attachments"`
|
||||
Comments BaseCommentsInfo `json:"comments"`
|
||||
CopyOwnerID int `json:"copy_owner_id"` // ID of the source post owner
|
||||
CopyPostID int `json:"copy_post_id"` // ID of the source post
|
||||
Date int `json:"date"` // Date of publishing in Unixtime
|
||||
FromID int `json:"from_id"` // Post author ID
|
||||
Geo BaseGeo `json:"geo"`
|
||||
ID int `json:"id"` // Post ID
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
PostID int `json:"post_id"` // wall post ID (if comment)
|
||||
PostSource WallPostSource `json:"post_source"`
|
||||
PostType string `json:"post_type"`
|
||||
Reposts BaseRepostsInfo `json:"reposts"`
|
||||
SignerID int `json:"signer_id"` // Post signer ID
|
||||
Text string `json:"text"` // Post text
|
||||
ToID int `json:"to_id"` // Wall owner's ID
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"` // Information whether the post in favorites list
|
||||
MarkedAsAds BaseBoolInt `json:"marked_as_ads"`
|
||||
ParentsStack []int `json:"parents_stack"`
|
||||
Donut WallWallpostDonut `json:"donut"` // need api v5.125
|
||||
ShortTextRate float64 `json:"short_text_rate"`
|
||||
}
|
||||
|
||||
// WallWallpostDonut info about VK Donut.
|
||||
type WallWallpostDonut struct {
|
||||
IsDonut BaseBoolInt `json:"is_donut"`
|
||||
CanPublishFreeCopy BaseBoolInt `json:"can_publish_free_copy"`
|
||||
PaidDuration int `json:"paid_duration"`
|
||||
EditMode string `json:"edit_mode"`
|
||||
Durations []BaseObjectWithName `json:"durations"`
|
||||
}
|
||||
|
||||
// WallPostCopyright information about the source of the post.
|
||||
type WallPostCopyright struct {
|
||||
ID int `json:"id,omitempty"`
|
||||
Link string `json:"link"`
|
||||
Type string `json:"type"`
|
||||
Name string `json:"name"`
|
||||
}
|
68
vendor/github.com/SevereCloud/vksdk/v2/object/widgets.go
generated
vendored
Normal file
68
vendor/github.com/SevereCloud/vksdk/v2/object/widgets.go
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
package object // import "github.com/SevereCloud/vksdk/v2/object"
|
||||
|
||||
// WidgetsCommentMedia struct.
|
||||
type WidgetsCommentMedia struct {
|
||||
ItemID int `json:"item_id"` // Media item ID
|
||||
OwnerID int `json:"owner_id"` // Media owner's ID
|
||||
ThumbSrc string `json:"thumb_src"` // URL of the preview image (type=photo only)
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
// WidgetsCommentReplies struct.
|
||||
type WidgetsCommentReplies struct {
|
||||
CanPost BaseBoolInt `json:"can_post"` // Information whether current user can comment the post
|
||||
GroupsCanPost BaseBoolInt `json:"groups_can_post"`
|
||||
Count int `json:"count"` // Comments number
|
||||
Replies []WidgetsCommentRepliesItem `json:"replies"`
|
||||
}
|
||||
|
||||
// WidgetsCommentRepliesItem struct.
|
||||
type WidgetsCommentRepliesItem struct {
|
||||
Cid int `json:"cid"` // Comment ID
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
Likes WidgetsWidgetLikes `json:"likes"`
|
||||
Text string `json:"text"` // Comment text
|
||||
UID int `json:"uid"` // User ID
|
||||
User UsersUser `json:"user"`
|
||||
}
|
||||
|
||||
// WidgetsWidgetComment struct.
|
||||
type WidgetsWidgetComment struct {
|
||||
Attachments []WallCommentAttachment `json:"attachments"`
|
||||
CanDelete BaseBoolInt `json:"can_delete"` // Information whether current user can delete the comment
|
||||
IsFavorite BaseBoolInt `json:"is_favorite"`
|
||||
Comments WidgetsCommentReplies `json:"comments"`
|
||||
Date int `json:"date"` // Date when the comment has been added in Unixtime
|
||||
FromID int `json:"from_id"` // Comment author ID
|
||||
ID int `json:"id"` // Comment ID
|
||||
Likes BaseLikesInfo `json:"likes"`
|
||||
Media WidgetsCommentMedia `json:"media"`
|
||||
PostType string `json:"post_type"` // Post type
|
||||
Reposts BaseRepostsInfo `json:"reposts"`
|
||||
Text string `json:"text"` // Comment text
|
||||
ToID int `json:"to_id"` // Wall owner
|
||||
PostSource WallPostSource `json:"post_source"`
|
||||
Views struct {
|
||||
Count int `json:"count"`
|
||||
} `json:"views"`
|
||||
}
|
||||
|
||||
// WidgetsWidgetLikes struct.
|
||||
type WidgetsWidgetLikes struct {
|
||||
Count int `json:"count"` // Likes number
|
||||
}
|
||||
|
||||
// WidgetsWidgetPage struct.
|
||||
type WidgetsWidgetPage struct {
|
||||
Comments WidgetsWidgetLikes `json:"comments,omitempty"`
|
||||
|
||||
// Date when Widgets on the page has been initialized firstly in Unixtime
|
||||
Date int `json:"date,omitempty"`
|
||||
Description string `json:"description,omitempty"` // Page description
|
||||
ID int `json:"id,omitempty"` // Page ID
|
||||
Likes WidgetsWidgetLikes `json:"likes,omitempty"`
|
||||
PageID string `json:"page_id,omitempty"` // page_id parameter value
|
||||
Photo string `json:"photo,omitempty"` // URL of the preview image
|
||||
Title string `json:"title,omitempty"` // Page title
|
||||
URL string `json:"url,omitempty"` // Page absolute URL
|
||||
}
|
Reference in New Issue
Block a user