This repository has been archived by the owner on Apr 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
model.go
299 lines (282 loc) · 12.1 KB
/
model.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
package clubhouseapi
import "time"
// StartPhoneNumberAuthResponse is the response structure of the StartPhoneNumberAuth method
type StartPhoneNumberAuthResponse struct {
Success bool `json:"success"`
IsBlocked bool `json:"is_blocked"`
ErrorMessage string `json:"error_message"`
}
// CompletePhoneNumberAuthResponse is the response structure of the CompletePhoneNumberAuth method
type CompletePhoneNumberAuthResponse struct {
Success bool `json:"success"`
IsVerified bool `json:"is_verified"`
NumberOfAttemptsRemaining int `json:"number_of_attempts_remaining"`
UserProfile struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
} `json:"user_profile"`
AuthToken string `json:"auth_token"`
RefreshToken string `json:"refresh_token"`
AccessToken string `json:"access_token"`
IsWaitlisted bool `json:"is_waitlisted"`
IsOnboarding bool `json:"is_onboarding"`
}
type Channel struct {
CreatorUserProfileID int `json:"creator_user_profile_id"`
ChannelID int `json:"channel_id"`
Channel string `json:"channel"`
Topic string `json:"topic"`
IsPrivate bool `json:"is_private"`
IsSocialMode bool `json:"is_social_mode"`
URL string `json:"url"`
Club struct {
ClubID int `json:"club_id"`
Name string `json:"name"`
Description string `json:"description"`
PhotoURL string `json:"photo_url"`
NumMembers int `json:"num_members"`
NumFollowers int `json:"num_followers"`
EnablePrivate bool `json:"enable_private"`
IsFollowAllowed bool `json:"is_follow_allowed"`
IsMembershipPrivate bool `json:"is_membership_private"`
IsCommunity bool `json:"is_community"`
Rules []interface{} `json:"rules"`
NumOnline int `json:"num_online"`
} `json:"club"`
ClubName string `json:"club_name"`
ClubID int `json:"club_id"`
WelcomeForUserProfile interface{} `json:"welcome_for_user_profile"`
NumOther int `json:"num_other"`
HasBlockedSpeakers bool `json:"has_blocked_speakers"`
IsExploreChannel bool `json:"is_explore_channel"`
NumSpeakers int `json:"num_speakers"`
NumAll int `json:"num_all"`
Users []struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
IsSpeaker bool `json:"is_speaker"`
IsModerator bool `json:"is_moderator"`
TimeJoinedAsSpeaker time.Time `json:"time_joined_as_speaker"`
IsFollowedBySpeaker bool `json:"is_followed_by_speaker"`
IsInvitedAsSpeaker bool `json:"is_invited_as_speaker"`
} `json:"users"`
}
type Event struct {
EventID int `json:"event_id"`
Name string `json:"name"`
Description string `json:"description"`
TimeStart time.Time `json:"time_start"`
Club struct {
ClubID int `json:"club_id"`
Name string `json:"name"`
Description string `json:"description"`
PhotoURL string `json:"photo_url"`
NumMembers int `json:"num_members"`
NumFollowers int `json:"num_followers"`
EnablePrivate bool `json:"enable_private"`
IsFollowAllowed bool `json:"is_follow_allowed"`
IsMembershipPrivate bool `json:"is_membership_private"`
IsCommunity bool `json:"is_community"`
Rules []interface{} `json:"rules"`
NumOnline int `json:"num_online"`
} `json:"club"`
IsMemberOnly bool `json:"is_member_only"`
URL string `json:"url"`
Hosts []struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
Bio string `json:"bio"`
Twitter string `json:"twitter"`
} `json:"hosts"`
Channel interface{} `json:"channel"`
IsExpired bool `json:"is_expired"`
}
// GetChannelsResponse is the response structure of the GetChannels method
type GetChannelsResponse struct {
Channels []Channel
Events []Event
Success bool `json:"success"`
}
// RefreshTokenResponse is the response structure of the RefreshToken method
type RefreshTokenResponse struct {
Access string `json:"access"`
Refresh string `json:"refresh"`
}
// JoinChannelResponse is the response structure of the JoinChannel method
type JoinChannelResponse struct {
CreatorUserProfileID int `json:"creator_user_profile_id"`
ChannelID int `json:"channel_id"`
Channel string `json:"channel"`
Topic string `json:"topic"`
IsPrivate bool `json:"is_private"`
IsSocialMode bool `json:"is_social_mode"`
URL string `json:"url"`
Club struct {
ClubID int `json:"club_id"`
Name string `json:"name"`
Description string `json:"description"`
PhotoURL string `json:"photo_url"`
NumMembers int `json:"num_members"`
NumFollowers int `json:"num_followers"`
EnablePrivate bool `json:"enable_private"`
IsFollowAllowed bool `json:"is_follow_allowed"`
IsMembershipPrivate bool `json:"is_membership_private"`
IsCommunity bool `json:"is_community"`
Rules []struct {
Desc string `json:"desc"`
Title string `json:"title"`
} `json:"rules"`
NumOnline int `json:"num_online"`
} `json:"club"`
ClubName string `json:"club_name"`
ClubID int `json:"club_id"`
WelcomeForUserProfile interface{} `json:"welcome_for_user_profile"`
IsHandraiseEnabled bool `json:"is_handraise_enabled"`
HandraisePermission int `json:"handraise_permission"`
IsClubMember bool `json:"is_club_member"`
IsClubAdmin bool `json:"is_club_admin"`
Users []struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
FirstName string `json:"first_name"`
Skintone int `json:"skintone"`
IsNew bool `json:"is_new"`
IsSpeaker bool `json:"is_speaker"`
IsModerator bool `json:"is_moderator"`
TimeJoinedAsSpeaker time.Time `json:"time_joined_as_speaker"`
IsFollowedBySpeaker bool `json:"is_followed_by_speaker"`
IsInvitedAsSpeaker bool `json:"is_invited_as_speaker"`
} `json:"users"`
Success bool `json:"success"`
IsEmpty bool `json:"is_empty"`
Token string `json:"token"`
RtmToken string `json:"rtm_token"`
PubnubToken string `json:"pubnub_token"`
PubnubOrigin interface{} `json:"pubnub_origin"`
PubnubHeartbeatValue int `json:"pubnub_heartbeat_value"`
PubnubHeartbeatInterval int `json:"pubnub_heartbeat_interval"`
PubnubEnable bool `json:"pubnub_enable"`
AgoraNativeMute bool `json:"agora_native_mute"`
}
// LeaveChannelResponse is the response structure of the LeaveChannel method
type LeaveChannelResponse struct {
Success bool `json:"success"`
}
// ActivePingResponse is the response structure of the ActivePing method
type ActivePingResponse struct {
ShouldLeave bool `json:"should_leave"`
Success bool `json:"success"`
}
// FollowResponse is the response structure of the Follow method
type FollowResponse struct {
Success bool `json:"success"`
ErrorMessage string `json:"error_message"`
}
// UnfollowResponse is the response structure of the Unfollow method
type UnfollowResponse struct {
Success bool `json:"success"`
ErrorMessage string `json:"error_message"`
}
// AudienceReplyResponse is the response structure of the AudienceReply method
type AudienceReplyResponse struct {
Success bool `json:"success"`
ErrorMessage string `json:"error_message"`
}
// GetFollowingResponse is the response structure of the GetFollowing method
type GetFollowingResponse struct {
Users []struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
Bio string `json:"bio"`
Twitter interface{} `json:"twitter"`
} `json:"users"`
Clubs []struct {
ClubID int `json:"club_id"`
Name string `json:"name"`
Description string `json:"description"`
PhotoURL string `json:"photo_url"`
NumMembers int `json:"num_members"`
NumFollowers int `json:"num_followers"`
EnablePrivate bool `json:"enable_private"`
IsFollowAllowed bool `json:"is_follow_allowed"`
IsMembershipPrivate bool `json:"is_membership_private"`
IsCommunity bool `json:"is_community"`
Rules []struct {
Desc string `json:"desc"`
Title string `json:"title"`
} `json:"rules"`
NumOnline int `json:"num_online"`
} `json:"clubs"`
Count int `json:"count"`
Next interface{} `json:"next"`
Previous interface{} `json:"previous"`
Success bool `json:"success"`
}
// GetFollowersResponse is the response structure of the GetFollowers method
type GetFollowersResponse struct {
Users []struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
LastActiveMinutes int `json:"last_active_minutes"`
Bio interface{} `json:"bio"`
Twitter interface{} `json:"twitter"`
} `json:"users"`
Count int `json:"count"`
Next interface{} `json:"next"`
Previous interface{} `json:"previous"`
Success bool `json:"success"`
}
// AcceptSpeakerInviteResponse is the response structure of the AcceptSpeakerInvite method
type AcceptSpeakerInviteResponse struct {
Token string `json:"token"`
PubnubToken string `json:"pubnub_token"`
PubnubOrigin interface{} `json:"pubnub_origin"`
PubnubHeartbeatValue int `json:"pubnub_heartbeat_value"`
PubnubHeartbeatInterval int `json:"pubnub_heartbeat_interval"`
Success bool `json:"success"`
}
// GetProfileResponse is the response structure of the GetProfile method
type GetProfileResponse struct {
UserProfile struct {
UserID int `json:"user_id"`
Name string `json:"name"`
Displayname interface{} `json:"displayname"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
Bio string `json:"bio"`
Twitter interface{} `json:"twitter"`
Instagram string `json:"instagram"`
NumFollowers int `json:"num_followers"`
NumFollowing int `json:"num_following"`
TimeCreated time.Time `json:"time_created"`
FollowsMe bool `json:"follows_me"`
IsBlockedByNetwork bool `json:"is_blocked_by_network"`
MutualFollowsCount int `json:"mutual_follows_count"`
MutualFollows []struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
} `json:"mutual_follows"`
NotificationType interface{} `json:"notification_type"`
InvitedByUserProfile struct {
UserID int `json:"user_id"`
Name string `json:"name"`
PhotoURL string `json:"photo_url"`
Username string `json:"username"`
} `json:"invited_by_user_profile"`
Clubs []interface{} `json:"clubs"`
} `json:"user_profile"`
Success bool `json:"success"`
}