setChannelMembers

expect abstract fun setChannelMembers(channel: String, users: List<MemberInput>, limit: Int? = null, page: PNPage? = null, filter: String? = null, sort: Collection<PNSortKey<PNMemberKey>> = listOf(), include: MemberInclude = MemberInclude()): ManageChannelMembers
expect abstract fun setChannelMembers(channel: String, uuids: List<MemberInput>, limit: Int? = null, page: PNPage? = null, filter: String? = null, sort: Collection<PNSortKey<PNMemberKey>> = listOf(), includeCount: Boolean = false, includeCustom: Boolean = false, includeUUIDDetails: PNUUIDDetailsLevel? = null, includeType: Boolean = false): ManageChannelMembers
actual abstract fun setChannelMembers(channel: String, users: List<MemberInput>, limit: Int?, page: PNPage?, filter: String?, sort: Collection<PNSortKey<PNMemberKey>>, include: MemberInclude): ManageChannelMembers

This method sets members in a channel.

Parameters

channel

Channel name

uuids

List of members to add to the channel. List can contain strings (uuid only) or objects (which can include custom data). @see PNMember.Partial

limit

Number of objects to return in the response. Default is 100, which is also the maximum value. Set limit to 0 (zero) and includeCount to true if you want to retrieve only a result count.

page

Use for pagination. - PNNext : Previously-returned cursor bookmark for fetching the next page. - PNPrev : Previously-returned cursor bookmark for fetching the previous page. Ignored if you also supply the start parameter.

filter

Expression used to filter the results. Only objects whose properties satisfy the given expression are returned.

sort

List of properties to sort by. Available options are id, name, and updated. @see PNAsc, PNDesc

include

Request specific elements to be available in response. Use com.pubnub.api.models.consumer.objects.member.MemberInclude to easily create the desired configuration.


actual abstract fun setChannelMembers(channel: String, uuids: List<MemberInput>, limit: Int?, page: PNPage?, filter: String?, sort: Collection<PNSortKey<PNMemberKey>>, includeCount: Boolean, includeCustom: Boolean, includeUUIDDetails: PNUUIDDetailsLevel?, includeType: Boolean): ManageChannelMembers

Deprecated

This function is deprecated. Use the new setChannelMembers(channel, userIds, limit, page, filter, sort, MembershipInclude(...))

Replace with

setChannelMembers(channel, userIds, limit, page, filter, sort, com.pubnub.api.models.consumer.objects.member.MemberInclude(includeTotalCount = includeCount, includeCustom = includeCustom, includeUser = true, includeUserCustom = true, includeUserType = includeUUIDType)

This method sets members in a channel.

Parameters

channel

Channel name

uuids

List of members to add to the channel. List can contain strings (uuid only) or objects (which can include custom data). @see PNMember.Partial

limit

Number of objects to return in the response. Default is 100, which is also the maximum value. Set limit to 0 (zero) and includeCount to true if you want to retrieve only a result count.

page

Use for pagination. - PNNext : Previously-returned cursor bookmark for fetching the next page. - PNPrev : Previously-returned cursor bookmark for fetching the previous page. Ignored if you also supply the start parameter.

filter

Expression used to filter the results. Only objects whose properties satisfy the given expression are returned.

sort

List of properties to sort by. Available options are id, name, and updated. @see PNAsc, PNDesc

includeCount

Request totalCount to be included in paginated response. By default, totalCount is omitted. Default is false.

includeCustom

Include respective additional fields in the response.

includeUUIDDetails

Include custom fields for UUIDs metadata.

actual abstract fun setChannelMembers(channel: String, users: List<MemberInput>, limit: Int?, page: PNPage?, filter: String?, sort: Collection<PNSortKey<PNMemberKey>>, include: MemberInclude): ManageChannelMembers
actual abstract fun setChannelMembers(channel: String, uuids: List<MemberInput>, limit: Int?, page: PNPage?, filter: String?, sort: Collection<PNSortKey<PNMemberKey>>, includeCount: Boolean, includeCustom: Boolean, includeUUIDDetails: PNUUIDDetailsLevel?, includeType: Boolean): ManageChannelMembers