ChannelQuery
A channel query.
public struct ChannelQuery: Encodable
Inheritance
APIPathConvertible
, Encodable
Initializers
init(cid:pageSize:paginationParameter:membersLimit:watchersLimit:)
Init a channel query.
public init(
cid: ChannelId,
pageSize: Int? = .messagesPageSize,
paginationParameter: PaginationParameter? = nil,
membersLimit: Int? = nil,
watchersLimit: Int? = nil
)
Parameters
cid
: a channelcid
.pageSize
: a page size for pagination.paginationParameter
: the pagination configuration.membersLimit
: a number of members for the channel to be retrieved.watchersLimit
: a number of watchers for the channel to be retrieved.
Properties
id
Channel id this query handles.
public let id: String?
type
Channel type this query handles.
public let type: ChannelType
pagination
A pagination for messages (see MessagesPagination
).
public var pagination: MessagesPagination?
membersLimit
A number of members for the channel to be retrieved.
public let membersLimit: Int?
watchersLimit
A number of watchers for the channel to be retrieved.
public let watchersLimit: Int?
cid
ChannelId
this query handles.
If id
part is missing then it's impossible to create valid ChannelId
.
public var cid: ChannelId?
Methods
encode(to:)
public func encode(to encoder: Encoder) throws