Redux Commands

Commands are functions that your app can dispatch to perform PubNub server operations and process the response. When you dispatch a command, the command returns an action that the process has begun. After the operation is performed on the PubNub server, the command dispatches an action that acknowledges either the success or failure of the operation. The reducer that responds to each action updates the application state in your store.

The commands for each feature fall into the following operational categories:

Fetch operations

Command NameDescription
fetchUserDataReturns the specified user object, optionally including the user's custom data object.
fetchAllUserDataReturns a paginated list of user objects, optionally including each user's custom data object.
fetchChannelDataReturns the specified channel object, optionally including the channel's custom data object.
fetchAllChannelDataReturns a paginated list of channel objects, optionally including each channel's custom data object.
fetchMembershipsReturns a list of channel memberships for a specified user.
fetchChannelMembersReturns a list of members in a specified channel.
fetchMessageHistoryFetch historical messages of a channel.
fetchHereNowObtain information about the current state of a channel, including a list of unique userIds currently subscribed to the channel and the total occupancy count of the channel.
fetchPresenceStateGet the current state information based on the current uuid for either specified channels or channelGroups.

Set operations

Command NameDescription
setUserDataSet data associated with a UUID.
setChannelDataSet data associated with a channel.
setMembershipsSet user memberships for a list of channels.
setChannelMembersSet channel memberships for a list of users.

Delete operations

Command NameDescription
removeUserDataDeletes the specified user object.
removeChannelDataDeletes the specified channel object.
removeMembershipsRemove a user from a list of channel.
removeChannelMembersRemove a list of members from a channel.

Send operations

Command NameDescription
sendMessageSend a message packaged in a request object.

External References

For more details about the concepts discussed in the PubNub Redux framework documentation, you should review the following references:

Last updated on