This commit is contained in:
Michael Telatynski 2019-12-21 22:33:03 +00:00
parent 9c5753065f
commit 48858059f1
1 changed files with 7 additions and 6 deletions

View File

@ -24,19 +24,20 @@ type RespVersions struct {
// RespPublicRooms is the JSON response for http://matrix.org/speculator/spec/HEAD/client_server/unstable.html#get-matrix-client-unstable-publicrooms // RespPublicRooms is the JSON response for http://matrix.org/speculator/spec/HEAD/client_server/unstable.html#get-matrix-client-unstable-publicrooms
type RespPublicRooms struct { type RespPublicRooms struct {
TotalRoomCountEstimate int `json:"total_room_count_estimate"` TotalRoomCountEstimate int `json:"total_room_count_estimate"`
PrevBatch string `json:"prev_batch"` PrevBatch string `json:"prev_batch"`
NextBatch string `json:"next_batch"` NextBatch string `json:"next_batch"`
Chunk []PublicRoomsChunk `json:"chunk"` Chunk []PublicRoom `json:"chunk"`
} }
type PublicRoomsChunk struct { // PublicRooms is a part of RespPublicRooms representing the disclosed information regarding a public room
type PublicRoom struct {
CanonicalAlias string `json:"canonical_alias"` CanonicalAlias string `json:"canonical_alias"`
Name string `json:"name"` Name string `json:"name"`
WorldReadable bool `json:"world_readable"` WorldReadable bool `json:"world_readable"`
Topic string `json:"topic"` Topic string `json:"topic"`
NumJoinedMembers int `json:"num_joined_members"` NumJoinedMembers int `json:"num_joined_members"`
AvatarUrl string `json:"avatar_url"` AvatarURL string `json:"avatar_url"`
RoomID string `json:"room_id"` RoomID string `json:"room_id"`
GuestCanJoin bool `json:"guest_can_join"` GuestCanJoin bool `json:"guest_can_join"`
Aliases []string `json:"aliases"` Aliases []string `json:"aliases"`