PubNub
Properties
The configuration that was used to initialize this PubNub instance. Modifying the values in this configuration is not advised, as it may lead to undefined behavior.
A nullable property to set a function or lambda for responding to file events. This function is invoked whenever a new file event is received, providing a convenient way to process or react to file events.
A nullable property that can be set to a function (or lambda expression) to handle incoming message events. This function is invoked whenever a new message is received, providing a convenient way to process or react to messages.
A nullable property that allows setting a function or lambda to react to message action events. This function is invoked whenever a new message action is received, providing a convenient way to process or react to message actions.
A nullable property for assigning a function or lambda to handle object events. This function is triggered with each new object event, providing a mechanism to manage object-related updates.
A nullable property designed to set a function or lambda expression for handling incoming presence events. This function is called whenever a new presence event occurs, offering an efficient method for tracking presence updates.
A nullable property for assigning a function or lambda expression to handle incoming signal events. This function is called whenever a new signal is received, providing a convenient way to process or react to signals.
Functions
Adds a channel to a channel group.
Add a legacy listener for both client status and events. Prefer addListener(EventListener) and addListener(StatusListener) if possible.
Add a listener.
Add an action on a published message. Returns the added action in the response.
Enable push notifications on provided set of channels.
Request a list of all channels on which push notifications have been enabled using specified ListPushProvisions.deviceId.
Create a handle to a ChannelMetadata object that can be used to obtain a Subscription to metadata events.
Perform Cryptographic decryption of an input string using cipher key provided by PNConfiguration.cipherKey.
Perform Cryptographic decryption of an input string using a cipher key.
Perform Cryptographic decryption of an input stream using provided cipher key.
Removes the channel group.
Delete file from specified Channel.
Removes messages from the history of a specific channel.
Cancel any subscribe and heartbeat loops or ongoing re-connections.
Download file from specified Channel.
Perform Cryptographic encryption of an input stream using provided cipher key.
Fetch historical messages from multiple channels. The includeMessageActions flag also allows you to fetch message actions along with the messages.
Send a message to PubNub Functions Event Handlers.
Same as destroy but immediately.
Returns a paginated list of Channel Metadata objects, optionally including the custom data object for each.
Returns a paginated list of UUID Metadata objects, optionally including the custom data object for each.
The method returns a list of members in a channel. The list will include user metadata for members that have additional metadata stored in the database.
Returns metadata for the specified Channel, optionally including the custom data object for each.
Generate URL which can be used to download file from target Channel.
The method returns a list of channel memberships for a user. This method doesn't return a user's subscriptions.
Get a list of message actions in a channel. Returns a list of actions in the response.
Queries the local subscribe loop for channel groups currently in the mix.
Queries the local subscribe loop for channels currently in the mix.
Returns metadata for the specified UUID, optionally including the custom data object for each.
This function establishes access permissions for PubNub Access Manager (PAM) by setting the read or write attribute to true. A grant with read or write set to false (or not included) will revoke any previous grants with read or write set to true.
See grant
This function generates a grant token for PubNub Access Manager (PAM).
Obtain information about the current state of a channel including a list of unique user IDs currently subscribed to the channel and the total occupancy count of the channel.
Lists all registered channel groups for the subscribe key.
Lists all the channels of the channel group.
Retrieve list of files uploaded to Channel.
Set or remove members in a channel.
Add and remove channel memberships for a UUID.
Fetches the number of messages published on one or more channels since a given time. The count returned is the number of messages in history with a timetoken value greater than the passed value in the MessageCounts.channelsTimetoken parameter.
Track the online and offline status of users and devices in real time and store custom state information. When you have Presence enabled, PubNub automatically creates a presence channel for each channel.
Publish file message from specified Channel.
Removes all listeners.
Disable push notifications from all channels registered with the specified RemoveAllPushChannelsForDevice.deviceId.
Remove members from a Channel.
Removes the metadata from a specified channel.
Removes channels from a channel group.
Remove a listener.
Remove channel memberships for a UUID.
Remove a previously added action on a published message. Returns an empty response.
Disable push notifications on provided set of channels.
Removes the metadata from a specified UUID.
This method allows you to disable an existing token and revoke all permissions embedded within.
This method sets members in a channel.
Set metadata for a Channel in the database, optionally including the custom data object for each.
Set channel memberships for a UUID.
Set state information specific to a subscriber UUID.
Set metadata for a UUID in the database, optionally including the custom data object for each.
Send a signal to all subscribers of a channel.
Create a SubscriptionSet from the given subscriptions.
Create a SubscriptionSet containing Subscription objects for the given sets of channels and channelGroups.
When subscribed to a single channel, this function causes the client to issue a leave from the channel and close any open socket to the PubNub Network.
Unsubscribe from all channels and all channel groups.
Create a handle to a UserMetadata object that can be used to obtain a Subscription to user metadata events.