ChannelAttributeFetchOptions

public struct ChannelAttributeFetchOptions : OptionSet
extension ChannelAttributeFetchOptions: CustomStringConvertible

Attributes of an occupied Channel that can be fetched from the Pusher HTTP API.

The attributes that can be fetched for a channel are dependent on its ChannelType. Attempting to fetch an attribute for a channel that does not support that attribute query will result in an error.

  • Declaration

    Swift

    public let rawValue: Int
  • Declaration

    Swift

    public init(rawValue: Int)
  • The number of distinct users that are currently subscribed.

    This attribute is only supported for presence channels.

    Declaration

    Swift

    public static let userCount: ChannelAttributeFetchOptions
  • The number of all connections currently subscribed.

    This attribute is not available by default. To enable it, please see the app settings page of your Channels dashboard. Attempts to fetch it when it is disabled result in an error.

    Declaration

    Swift

    public static let subscriptionCount: ChannelAttributeFetchOptions
  • all

    All available attributes for the occupied channel. (i.e. [.userCount, .subscriptionCount]).

    This is only supported for presence channels and applications that have enabled subscriptionCount attribute queries.

    Declaration

    Swift

    public static let all: `Self`
  • Declaration

    Swift

    public var description: String { get }