-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstructs.go
144 lines (135 loc) · 4.3 KB
/
structs.go
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
package main
type GroupData struct {
Error map[string]interface{} `json:"error"`
Response []struct {
ID int `json:"id"`
Name string `json:"name"`
ScreenName string `json:"screen_name"`
IsClosed int `json:"is_closed"`
Type string `json:"type"`
IsAdmin int `json:"is_admin"`
AdminLevel int `json:"admin_level"`
IsMember int `json:"is_member"`
Description string `json:"description"`
Photo50 string `json:"photo_50"`
Photo100 string `json:"photo_100"`
Photo200 string `json:"photo_200"`
} `json:"response"`
}
type Item struct {
ID int `json:"id"`
FromID int `json:"from_id"`
OwnerID int `json:"owner_id"`
Date int `json:"date"`
MarkedAsAds int `json:"marked_as_ads"`
PostType string `json:"post_type"`
Text string `json:"text"`
CanEdit int `json:"can_edit,omitempty"`
CreatedBy int `json:"created_by,omitempty"`
CanDelete int `json:"can_delete"`
CanPin int `json:"can_pin"`
Attachments []Attachment `json:"attachments,omitempty"`
PostSource struct {
Type string `json:"type"`
Platform string `json:"platform"`
} `json:"post_source"`
Comments struct {
Count int `json:"count"`
GroupsCanPost bool `json:"groups_can_post"`
CanPost int `json:"can_post"`
} `json:"comments"`
Likes struct {
Count int `json:"count"`
UserLikes int `json:"user_likes"`
CanLike int `json:"can_like"`
CanPublish int `json:"can_publish"`
} `json:"likes"`
Reposts struct {
Count int `json:"count"`
UserReposted int `json:"user_reposted"`
} `json:"reposts"`
Views struct {
Count int `json:"count"`
} `json:"views"`
CopyHistory []Item `json:"copy_history,omitempty"`
Groups []Group `json:"groups"`
}
type JSONBody struct {
Error map[string]interface{} `json:"error"`
Response struct {
Count int `json:"count"`
Items []Item `json:"items"`
} `json:"response"`
}
type Group struct {
ID int `json:"id"`
Name string `json:"name"`
ScreenName string `json:"screen_name"`
IsClosed int `json:"is_closed"`
Type string `json:"type"`
IsAdmin int `json:"is_admin"`
AdminLevel int `json:"admin_level"`
IsMember int `json:"is_member"`
Photo50 string `json:"photo_50"`
Photo100 string `json:"photo_100"`
Photo200 string `json:"photo_200"`
}
type Attachment struct {
Type string `json:"type"`
Video struct {
ID int `json:"id"`
OwnerID int `json:"owner_id"`
Title string `json:"title"`
Duration int `json:"duration"`
Description string `json:"description"`
Date int `json:"date"`
Comments int `json:"comments"`
Views int `json:"views"`
Photo130 string `json:"photo_130"`
Photo320 string `json:"photo_320"`
Photo640 string `json:"photo_640"`
Photo800 string `json:"photo_800"`
AccessKey string `json:"access_key"`
Platform string `json:"platform"`
CanAdd int `json:"can_add"`
} `json:"video"`
Photo struct {
ID int `json:"id"`
AlbumID int `json:"album_id"`
OwnerID int `json:"owner_id"`
UserID int `json:"user_id"`
Photo75 string `json:"photo_75"`
Photo130 string `json:"photo_130"`
Photo604 string `json:"photo_604"`
Photo807 string `json:"photo_807"`
Photo1280 string `json:"photo_1280"`
Width int `json:"width"`
Height int `json:"height"`
Text string `json:"text"`
Date int `json:"date"`
PostID int `json:"post_id"`
AccessKey string `json:"access_key"`
} `json:"photo"`
Doc struct {
ID int `json:"id"`
OwnerID int `json:"owner_id"`
Title string `json:"title"`
Size int `json:"size"`
Ext string `json:"ext"`
URL string `json:"url"`
Date int `json:"date"`
Type int `json:"type"`
AccessKey string `json:"access_key"`
} `json:"doc"`
Audio 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"`
GenreID int `json:"genre_id"`
IsHQ bool `json:"is_hq"`
} `json:"audio"`
}