summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/object/widgets.go
blob: 80905a3fd4454be1c972989c9e9bfa005e90c7b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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
}