forked from SevereCloud/vksdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats.go
71 lines (63 loc) · 2.82 KB
/
stats.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
package object // import "github.com/akss1/vksdk/5.92/object"
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
}
type statsCity struct {
Count int `json:"count"` // Visitors number
Name string `json:"name"` // City name
Value int `json:"value"` // City ID
}
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"`
}
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"`
}
type statsSexAge struct {
Count int `json:"count"` // Visitors number
Value string `json:"value"` // Sex/age value
}
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 clickthrough
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"` // Clickthrough to community
Unsubscribe int `json:"unsubscribe"` // Unsubscribed members
}