-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchannels.go
34 lines (30 loc) · 1.87 KB
/
channels.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
package channels
import "github.com/wakumaku/go-zulip"
type Service struct {
client zulip.RESTClient
}
func NewService(c zulip.RESTClient) *Service {
return &Service{client: c}
}
// ChannelInfo are the fields usually returned when querying channel information
type ChannelInfo struct {
CanAddSubscribersGroup int `json:"can_add_subscribers_group"` // 10,
CanRemoveSubscribersGroup int `json:"can_remove_subscribers_group"` // 10,
CreatorId int `json:"creator_id"` // null,
DateCreated int `json:"date_created"` // 1691057093,
Description string `json:"description"` // "A private channel",
FirstMessageId int `json:"first_message_id"` // 18,
HistoryPublicToSubscribers bool `json:"history_public_to_subscribers"` // false,
InviteOnly bool `json:"invite_only"` // true,
IsAnnouncementOnly bool `json:"is_announcement_only"` // false,
IsArchived bool `json:"is_archived"` // false,
IsDefault bool `json:"is_default"` // false,
IsRecentlyActive bool `json:"is_recently_active"` // true,
IsWebPublic bool `json:"is_web_public"` // false,
MessageRetentionDays int `json:"message_retention_days"` // null,
Name string `json:"name"` // "management",
RenderedDescription string `json:"rendered_description"` // "<p>A private channel</p>",
StreamId int `json:"stream_id"` // 2,
StreamPostPolicy int `json:"stream_post_policy"` // 1,
StreamWeeklyTraffic int `json:"stream_weekly_traffic"` // null
}