-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathr_forum.go
108 lines (104 loc) · 3.68 KB
/
r_forum.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
package whatapi
type Categories struct {
Categories []struct {
CategoryID int `json:"categoryId"`
CategoryName string `json:"categoryName"`
Forums []struct {
ForumID int `json:"forumId"`
ForumName string `json:"forumName"`
ForumDescription string `json:"forumDescription"`
NumTopics int `json:"numTopics"`
NumPosts int `json:"numPosts"`
LastPostID int `json:"lastPostId"`
LastAuthorID int `json:"lastAuthorId"`
LastPostAuthorName string `json:"lastPostAuthorName"`
LastTopicID int `json:"lastTopicId"`
LastTime string `json:"lastTime"`
SpecificRules []string `json:"specificRules"`
LastTopic string `json:"lastTopic"`
Read bool `json:"read"`
Locked bool `json:"locked"`
Sticky bool `json:"sticky"`
} `json:"forums"`
} `json:"categories"`
}
type Forum struct {
ForumName string `json:"forumName"`
SpecificRules []struct{
ThreadID int `json:"threadID"`
Thread string `json:"thread"`
} `json:"specificRules"`
CurrentPage int `json:"currentPage"`
Pages int `json:"pages"`
Threads []struct {
TopicID int `json:"topicId"`
Title string `json:"title"`
AuthorID int `json:"authorId"`
AuthorName string `json:"authorName"`
Locked bool `json:"locked"`
Sticky bool `json:"sticky"`
PostCount int `json:"postCount"`
LastID int `json:"lastID"`
LastTime string `json:"lastTime"`
LastAuthorId int `json:"lastAuthorId"`
LastAuthorName string `json:"lastAuthorNam"`
LastReadPage int `json:"lastReadPage"`
LastReadPostID int `json:"lastReadPostId"`
Read bool `json:"read"`
} `json:"threads"`
}
type Thread struct {
ForumID int `json:"forumId"`
ForumName string `json:"forumName"`
ThreadID int `json:"threadId"`
ThreadTitle string `json:"threadTitle"`
Subscribed bool `json:"subscribed"`
Locked bool `json:"locked"`
Sticky bool `json:"sticky"`
CurrentPage int `json:"currentPage"`
Pages int `json:"pages"`
Poll struct {
Closed bool `json:"closed"`
Featured string `json:"featured"`
Question string `json:"question"`
MaxVotes int `json:"maxVotes"`
TotalVotes int `json:"totalVotes"`
Voted bool `json:"voted"`
Answers []struct {
Answer string `json:"answer"`
Ratio float64 `json:"ratio"`
Percent float64 `json:"percent"`
} `json:"answers"`
} `json:"poll"`
Posts []struct {
PostID int `json:"postId"`
AddedTime string `json:"addedTime"`
BbBody string `json:"bbBody"`
Body string `json:"body"`
EditedUserID int `json:"editedUserId"`
EditedTime string `json:"editedTime"`
EditedUsername string `json:"editedUsername"`
Author struct {
AuthorID int `json:"authorId"`
AuthorName string `json:"authorName"`
Paranoia []string `json:"paranoia"`
Artist bool `json:"artist"`
Donor bool `json:"donor"`
Warned bool `json:"warned"`
Avatar string `json:"avatar"`
Enabled bool `json:"enabled"`
UserTitle string `json:"userTitle"`
} `json:"author"`
} `json:"posts"`
}
type Subscriptions struct {
Threads []struct {
ForumID int `json:"forumId"`
ForumName string `json:"forumName"`
ThreadID int `json:"threadId"`
ThreadTitle string `json:"threadTitle"`
PostID int `json:"postId"`
Locked bool `json:"locked"`
New bool `json:"new"`
} `json:"threads"`
}