-
Notifications
You must be signed in to change notification settings - Fork 1
/
group.go
43 lines (39 loc) · 1.93 KB
/
group.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
package mango
// PinnedItem represents the pinned item of a [Group].
type PinnedItem struct {
ItemId string `json:"itemId"`
Type string `json:"type"`
}
// GroupLeader represents the leader of a [Group].
type GroupLeader struct {
UserId string `json:"userId"`
Score float64 `json:"score"`
}
// CachedLeaderboard represents the leaderboard os a [Group]
type CachedLeaderboard struct {
TopTraders []GroupLeader `json:"topTraders"`
TopCreators []GroupLeader `json:"topCreators"`
}
// Group represents a Group object in the Manifold backend.
//
// This type isn't documented by Manifold and its structure was inferred from API calls.
type Group struct {
AboutPostId string `json:"aboutPostId,omitempty"`
MostRecentActivityTime int64 `json:"mostRecentActivityTime"`
AnyoneCanJoin bool `json:"anyoneCanJoin"`
TotalContracts int64 `json:"totalContracts"`
Name string `json:"name"`
PinnedItems []PinnedItem `json:"pinnedItems,omitempty"`
TotalMembers int64 `json:"totalMembers"`
CreatedTime int64 `json:"createdTime"`
Slug string `json:"slug"`
CachedLeaderboard CachedLeaderboard `json:"cachedLeaderboard"`
About string `json:"about"`
MostRecentContractAddedTime int64 `json:"mostRecentContractAddedTime,omitempty"`
CreatorId string `json:"creatorId"`
Id string `json:"id"`
PostIds []string `json:"postIds,omitempty"`
BannerUrl string `json:"bannerUrl,omitempty"`
MostRecentChatActivityTime int64 `json:"mostRecentChatActivityTime,omitempty"`
ChatDisabled bool `json:"chatDisabled,omitempty"`
}