App Context API for Unreal SDK
App Context provides easy-to-use, serverless storage for user and channel data you need to build innovative, reliable, scalable applications. Use App Context to easily store metadata about your application users and channels, and their membership associations, without the need to stand up your own databases.
PubNub also triggers events when object data is changed: set, updated, or removed from the database. At the same time, making a request to set the same data that already exist, doesn't trigger any event. Clients can receive these events in real time and update their front-end application accordingly.
User
Get metadata for all users
Retrieve user metadata in pages. The list includes the Custom object if requested.
Method(s)
Method variants
You can also call the GetAllUserMetadataRaw variant of this method which takes String values for Include and Sort instead of the FPubnubGetAllInclude and FPubnubGetAllSort structs.
1PubnubSubsystem->GetAllUserMetadata(
2 FOnGetAllUserMetadataResponse OnGetAllUserMetadataResponse,
3 FPubnubGetAllInclude Include = FPubnubGetAllInclude(),
4 int Limit = 100,
5 FString Filter = "",
6 FPubnubGetAllSort Sort = FPubnubGetAllSort(),
7 FString PageNext = "",
8 FString PagePrev = ""
9);
| Parameter | Description |
|---|---|
OnGetAllUserMetadataResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetAllUserMetadataResponseNative to handle the result using a lambda. |
IncludeType: FPubnubGetAllInclude | A list of property names to include in the response. |
LimitType: int | Number of objects to return. Default/Max: 100. |
FilterType: FString | Filter expression. Only matching objects are returned. See filtering. |
SortType: FPubnubGetAllSort | Sort by id, name, updated with asc/desc for sort direction (for example, {name: 'asc'}). |
PageNextType: FString | Cursor-based pagination. Use to retrieve the next page. |
PagePrevType: FString | Cursor-based pagination. Use to retrieve the previous page. Ignored if PageNext is provided. |
CountType: EPubnubTribool enum | Whether to include a total count of users in the response (default: not set). |
FPubnubGetAllInclude
| Field | Type | Description |
|---|---|---|
IncludeCustom | bool | Whether to include the Custom object in the response. |
IncludeStatus | bool | Whether to include the membership Status field. |
IncludeType | bool | Whether to include the membership Type field. |
IncludeTotalCount | bool | Whether to include the total count. |
FPubnubGetAllSort
| Field | Type | Description |
|---|---|---|
GetAllSort | TArray<FPubnubGetAllSingleSort> | Array of sorts for Membership related function. The order matters, sorts will be applied from the first index to the last. |
Sample code
Reference code
ACTION REQUIRED before running the code.Other examples
Reference code
ACTION REQUIRED before running the code.Get metadata for all users with additional settings
Actor.h
1
Actor.cpp
1
Get metadata for all users with all includes
Actor.h
1
Actor.cpp
1
Get metadata for all users with lambda
Actor.h
1
Actor.cpp
1
Get metadata for all users raw
Actor.h
1
Actor.cpp
1
Returns
This function is void, but the delegate returns the FOnGetAllUserMetadataResponse struct.
FOnGetAllUserMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
UsersData | const TArray<FPubnubUserData>& | Aa array of FPubnubUserData structs which are the users with their associated User metadata. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FPubnubUserData
| Field | Type | Description |
|---|---|---|
UserID | FString | UUID. If not supplied, the current user's UUID is used. |
UserName | FString | Display name for the user. |
ExternalID | FString | User's identifier in an external system. |
ProfileUrl | FString | The URL of the user's profile picture. |
Email | FString | The user's email address. |
Custom | FString | Custom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported. |
Status | FString | User status. Max. 50 characters. |
Type | FString | User type. Max. 50 characters. |
Updated | FString | The date when the user's metadata was last updated. |
ETag | FString | Information on the object's content fingerprint. |
FOnGetAllUserMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
UsersData | const TArray<FPubnubUserData>& | Aa array of FPubnubUserData structs which are the users with their associated User metadata. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Get user metadata - UserMetadata entity
Requires App Context add-on
This method requires the App Context add-on enabled for your key in the Admin Portal.
Retrieve metadata for a user. You can include the Custom object.
Method(s)
1UPubnubUserMetadataEntity* UserMetadataEntity = PubnubSubsystem->CreateUserMetadataEntity("user-id");
2
3UserMetadataEntity->GetUserMetadata(
4 FOnGetUserMetadataResponse OnGetUserMetadataResponse,
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
| Parameter | Description |
|---|---|
OnGetUserMetadataResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetUserMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetUserMetadataResponse struct.
Other examples
Reference code
ACTION REQUIRED before running the code.Get user metadata with lambda
Actor.h
1
Actor.cpp
1
Get user metadata - PubNub client
Retrieve metadata for a user. You can include the Custom object.
Method(s)
1PubnubSubsystem->GetUserMetadata(
2 FString User,
3 FOnGetUserMetadataResponse OnGetUserMetadataResponse,
4 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
5);
| Parameter | Description |
|---|---|
User *Type: FString | The metadata ID for which to retrieve the user object. Can't be empty. |
OnGetUserMetadataResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetUserMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetUserMetadataResponse struct.
FOnGetUserMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
UserData | FPubnubUserData | Aa instance of FPubnubUserData struct which is the user with their associated User metadata. |
FOnGetUserMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
UserData | const FPubnubUserData& | Aa instance of FPubnubUserData struct which is the user with their associated User metadata. |
Other examples
Reference code
ACTION REQUIRED before running the code.Get metadata for a user with all includes
Actor.h
1
Actor.cpp
1
Get metadata for a user with lambda
Actor.h
1
Actor.cpp
1
Get metadata for a user raw
Actor.h
1
Actor.cpp
1
Set user metadata with additional settings
Actor.h
1
Actor.cpp
1
Set user metadata with result struct
Actor.h
1
Actor.cpp
1
Remove user metadata with result struct
Actor.h
1
Actor.cpp
1
Set user metadata - UserMetadata entity
Requires App Context add-on
This method requires the App Context add-on enabled for your key in the Admin Portal.
Unsupported partial updates of custom metadata
The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:
- Get the existing metadata and store it locally.
- Append the new custom metadata to the existing one.
- Set the entire updated custom object.
Set metadata for a User in the database, optionally including the custom data object for each.
Method(s)
1UPubnubUserMetadataEntity* UserMetadataEntity = PubnubSubsystem->CreateUserMetadataEntity("user-id");
2
3UserMetadataEntity->SetUserMetadata(
4 FPubnubUserData UserMetadata,
5 FOnSetUserMetadataResponse OnSetUserMetadataResponse,
6 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
7);
| Parameter | Description |
|---|---|
UserMetadataType: FPubnubUserData | The user metadata object to create. |
FOnSetUserMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnSetUserMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
API limits
To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
1{
2 "Uuid": "uuid-1",
3 "Name": "John Doe",
4 "Email": "john.doe@pubnub.com",
5 "ExternalId": "",
6 "ProfileUrl": "",
7 "Custom": "",
8 "Updated": "2020-06-17T16:28:14.060718Z"
9}
Other examples
Reference code
ACTION REQUIRED before running the code.Set user metadata with result
Actor.h
1
Actor.cpp
1
Set user metadata with lambda
Actor.h
1
Actor.cpp
1
Set user metadata - PubNub client
Unsupported partial updates of custom metadata
The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:
- Get the existing metadata and store it locally.
- Append the new custom metadata to the existing one.
- Set the entire updated custom object.
Set metadata for a User in the database, optionally including the custom data object for each.
Method(s)
1PubnubSubsystem->SetUserMetadata(
2 FString User,
3 FPubnubUserData UserMetadata,
4 FOnSetUserMetadataResponse OnSetUserMetadataResponse,
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
| Parameter | Description |
|---|---|
UserType: FString | The metadata ID for which to retrieve the user object. Can't be empty. |
UserMetadataType: FPubnubUserData | The user metadata object to create. |
FOnSetUserMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnSetUserMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
API limits
To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.
FPubnubGetMetadataInclude
| Field | Type | Description |
|---|---|---|
IncludeCustom | bool | Whether to include the object's Custom field. |
IncludeStatus | bool | Whether to include the object's Status field. |
IncludeType | bool | Whether to include the object's Type field. |
FOnSetUserMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
UserData | FPubnubUserData | The user metadata object that was created. |
FOnSetUserMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
UserData | const FPubnubUserData& | The user metadata object that was created. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
1{
2 "Uuid": "uuid-1",
3 "Name": "John Doe",
4 "Email": "john.doe@pubnub.com",
5 "ExternalId": "",
6 "ProfileUrl": "",
7 "Custom": "",
8 "Updated": "2020-06-17T16:28:14.060718Z"
9}
Other examples
Reference code
ACTION REQUIRED before running the code.Set metadata for a user with result
Actor.h
1
Actor.cpp
1
Set metadata for a user with lambda
Actor.h
1
Actor.cpp
1
Set metadata for a user raw
Actor.h
1
Actor.cpp
1
Iteratively update existing metadata
Actor.h
1
Actor.cpp
1
Remove user metadata - UserMetadata entity
Requires App Context add-on
This method requires the App Context add-on enabled for your key in the Admin Portal.
Removes the metadata from a specified user UUID.
Method(s)
1UPubnubUserMetadataEntity* UserMetadataEntity = PubnubSubsystem->CreateUserMetadataEntity("user-id");
2
3UserMetadataEntity->RemoveUserMetadata(
4 FOnRemoveUserMetadataResponse OnRemoveUserMetadataResponse
5);
| Parameter | Description |
|---|---|
OnRemoveUserMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnRemoveUserMetadataResponseNative to handle the result using a lambda. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnRemoveUserMetadataResponse struct.
Other examples
Reference code
ACTION REQUIRED before running the code.Remove user metadata with result
Actor.h
1
Actor.cpp
1
Remove user metadata with lambda
Actor.h
1
Actor.cpp
1
Remove user metadata - PubNub client
Removes the metadata from a specified user UUID.
Method(s)
1PubnubSubsystem->RemoveUserMetadata(
2 FString User,
3 FOnRemoveUserMetadataResponse OnRemoveUserMetadataResponse
4);
| Parameter | Description |
|---|---|
UserType: FString | The metadata ID to delete from the user object. Can't be empty. |
OnRemoveUserMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnRemoveUserMetadataResponseNative to handle the result using a lambda. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnRemoveUserMetadataResponse struct.
FOnRemoveUserMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
FOnRemoveUserMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
Other examples
Reference code
ACTION REQUIRED before running the code.Remove metadata for a user with result
Actor.h
1
Actor.cpp
1
Remove metadata for a user with lambda
Actor.h
1
Actor.cpp
1
Channel
Get metadata for all channels
Retrieve channel metadata in pages. The list includes the Custom object if requested.
Method(s)
Method variants
You can also call the GetAllChannelMetadataRaw variant of this method which takes String values for Include and Sort instead of the FPubnubGetAllInclude and FPubnubGetAllSort structs.
1PubnubSubsystem->GetAllChannelMetadata(
2 FOnGetAllChannelMetadataResponse OnGetAllChannelMetadataResponse,
3 FPubnubGetAllInclude Include = FPubnubGetAllInclude(),
4 int Limit = 100,
5 FString Filter = "",
6 FPubnubGetAllSort Sort = FPubnubGetAllSort(),
7 FString PageNext = "",
8 FString PagePrev = ""
9);
| Parameter | Description |
|---|---|
OnGetAllChannelMetadataResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetAllChannelMetadataResponseNative to handle the result using a lambda. |
IncludeType: FPubnubGetAllInclude | A list of property names to include in the response. |
LimitType: int | Number of objects to return. Default/Max: 100. |
FilterType: FString | Filter expression. Only matching objects are returned. See filtering. |
SortType: FPubnubGetAllSort | Sort by id, name, updated with asc/desc for sort direction (for example, {name: 'asc'}). |
PageNextType: FString | Cursor-based pagination. Use to retrieve the next page. |
PagePrevType: FString | Cursor-based pagination. Use to retrieve the previous page. Ignored if PageNext is provided. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetAllChannelMetadataResponse struct.
FOnGetAllChannelMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
ChannelsData | const TArray<FPubnubChannelData>& | Aa array of FPubnubChannelData structs which are the users with their associated Channel metadata. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FPubnubChannelData
| Field | Type | Description |
|---|---|---|
ChannelID | FString | ID of the channel. |
ChannelName | FString | Name of the channel. |
Description | FString | Additional description of the channel. |
Custom | FString | Custom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported. |
Status | FString | Channel status. Max 50 characters. |
Type | FString | Channel type. Max 50 characters. |
Updated | FString | The date when the channel's metadata was last updated. |
ETag | FString | Version identifier of the user's metadata. |
FOnGetAllChannelMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
ChannelsData | const TArray<FPubnubChannelData>& | Aa array of FPubnubChannelData structs which are the users with their associated Channel metadata. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Other examples
Reference code
ACTION REQUIRED before running the code.Get metadata for all channels with settings
Actor.h
1
Actor.cpp
1
Get metadata for all channels with all includes
Actor.h
1
Actor.cpp
1
Get metadata for all channels with lambda
Actor.h
1
Actor.cpp
1
Get metadata for all channels raw
Actor.h
1
Actor.cpp
1
Get channel metadata - ChannelMetadata entity
Requires App Context add-on
This method requires the App Context add-on enabled for your key in the Admin Portal.
Retrieve metadata for a channel. You can include the Custom object.
Method(s)
1UPubnubChannelMetadataEntity* ChannelMetadataEntity = PubnubSubsystem->CreateChannelMetadataEntity("channel-id");
2
3ChannelMetadataEntity->GetChannelMetadata(
4 FOnGetChannelMetadataResponse OnGetChannelMetadataResponse,
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
| Parameter | Description |
|---|---|
OnGetChannelMetadataResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetChannelMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetChannelMetadataResponse struct.
Other examples
Reference code
ACTION REQUIRED before running the code.Get channel metadata with lambda
Actor.h
1
Actor.cpp
1
Get channel metadata - PubNub client
Retrieve metadata for a channel. You can include the Custom object.
Method(s)
1PubnubSubsystem->GetChannelMetadata(
2 FString Include,
3 FString Channel,
4 FOnGetChannelMetadataResponse OnGetChannelMetadataResponse
5);
| Parameter | Description |
|---|---|
IncludeType: FString | A comma delimited string with additional/complex user attributes to include in response. Use "" if you don't want to retrieve additional attributes. |
ChannelType: FString | The channel ID for which to retrieve the channel object. Can't be empty. |
OnGetChannelMetadataResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetChannelMetadataResponseNative to handle the result using a lambda. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetChannelMetadataResponse struct.
FOnGetChannelMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
ChannelData | FPubnubChannelData | Aa instance of FPubnubChannelData struct which is the channel with its associated metadata. |
FOnGetChannelMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
ChannelData | const FPubnubChannelData& | Aa instance of FPubnubChannelData struct which is the channel with its associated metadata. |
Other examples
Reference code
ACTION REQUIRED before running the code.Get metadata for a channel with all includes
Actor.h
1
Actor.cpp
1
Get metadata for a channel with lambda
Actor.h
1
Actor.cpp
1
Get metadata for a channel raw
Actor.h
1
Actor.cpp
1
Set channel metadata with additional settings
Actor.h
1
Actor.cpp
1
Set channel metadata with result struct
Actor.h
1
Actor.cpp
1
Remove channel metadata with result struct
Actor.h
1
Actor.cpp
1
Set channel metadata - ChannelMetadata entity
Requires App Context add-on
This method requires the App Context add-on enabled for your key in the Admin Portal.
Unsupported partial updates of custom metadata
The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:
- Get the existing metadata and store it locally.
- Append the new custom metadata to the existing one.
- Set the entire updated custom object.
Set metadata for a channel in the database, optionally including the custom data object for each.
Method(s)
1UPubnubChannelMetadataEntity* ChannelMetadataEntity = PubnubSubsystem->CreateChannelMetadataEntity("channel-id");
2
3ChannelMetadataEntity->SetChannelMetadata(
4 FPubnubChannelData ChannelMetadata,
5 FOnSetChannelMetadataResponse OnSetChannelMetadataResponse,
6 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
7);
| Parameter | Description |
|---|---|
ChannelMetadataType: FPubnubChannelData | The channel metadata object to create. |
FOnSetChannelMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnSetChannelMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
API limits
To learn about the maximum length of parameters used to set channel metadata, refer to REST API docs.
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
1{
2 "Channel": "my-channel",
3 "Name": "PubNub channel",
4 "Description": "The channel for announcements",
5 "Updated": "2020-06-17T16:52:19.562469Z"
6}
Other examples
Reference code
ACTION REQUIRED before running the code.Set channel metadata with result
Actor.h
1
Actor.cpp
1
Set channel metadata with lambda
Actor.h
1
Actor.cpp
1
Set channel metadata - PubNub client
Unsupported partial updates of custom metadata
The value of the custom metadata parameter sent in this method always overwrites the value stored on PubNub servers. If you want to add new custom data to an existing one, you must:
- Get the existing metadata and store it locally.
- Append the new custom metadata to the existing one.
- Set the entire updated custom object.
Set metadata for a channel in the database, optionally including the custom data object for each.
Method(s)
1PubnubSubsystem->SetChannelMetadata(
2 FString Channel,
3 FPubnubChannelData ChannelMetadata,
4 FOnSetChannelMetadataResponse OnSetChannelMetadataResponse,
5 FPubnubGetMetadataInclude Include = FPubnubGetMetadataInclude()
6);
| Parameter | Description |
|---|---|
ChannelType: FString | The metadata ID for which to retrieve the channel object. Can't be empty. |
ChannelMetadataType: FPubnubChannelData | The channel metadata object to create. |
FOnSetChannelMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnSetChannelMetadataResponseNative to handle the result using a lambda. |
Include | List of property names to include in the response. |
API limits
To learn about the maximum length of parameters used to set channel metadata, refer to REST API docs.
FOnSetChannelMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
ChannelData | FPubnubChannelData | The channel metadata object that was created. |
FOnSetChannelMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
ChannelData | const FPubnubChannelData& | The channel metadata object that was created. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
1{
2 "Channel": "my-channel",
3 "Name": "PubNub channel",
4 "Description": "The channel for announcements",
5 "Updated": "2020-06-17T16:52:19.562469Z"
6}
Other examples
Reference code
ACTION REQUIRED before running the code.Set metadata for a channel with result
Actor.h
1
Actor.cpp
1
Set metadata for a channel with lambda
Actor.h
1
Actor.cpp
1
Set metadata for a channel raw
Actor.h
1
Actor.cpp
1
Iteratively update existing metadata
Actor.h
1
Actor.cpp
1
Remove channel metadata - ChannelMetadata entity
Requires App Context add-on
This method requires the App Context add-on enabled for your key in the Admin Portal.
Removes the metadata from a specified channel.
Method(s)
1UPubnubChannelMetadataEntity* ChannelMetadataEntity = PubnubSubsystem->CreateChannelMetadataEntity("channel-id");
2
3ChannelMetadataEntity->RemoveChannelMetadata(
4 FOnRemoveChannelMetadataResponse OnRemoveChannelMetadataResponse
5);
| Parameter | Description |
|---|---|
OnRemoveChannelMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnRemoveChannelMetadataResponseNative to handle the result using a lambda. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnRemoveChannelMetadataResponse struct.
Other examples
Reference code
ACTION REQUIRED before running the code.Remove channel metadata with result
Actor.h
1
Actor.cpp
1
Remove channel metadata with lambda
Actor.h
1
Actor.cpp
1
Remove channel metadata - PubNub client
Removes the metadata from a specified channel.
Method(s)
1PubnubSubsystem->RemoveChannelMetadata(
2 FString Channel,
3 FOnRemoveChannelMetadataResponse OnRemoveChannelMetadataResponse
4);
| Parameter | Description |
|---|---|
ChannelType: FString | The metadata ID to delete from the channel object. Can't be empty. |
OnRemoveChannelMetadataResponse | The delegate for the operation's result. You can also use a native callback of the type FOnRemoveChannelMetadataResponseNative to handle the result using a lambda. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnRemoveChannelMetadataResponse struct.
FOnRemoveChannelMetadataResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
FOnRemoveChannelMetadataResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
Other examples
Reference code
ACTION REQUIRED before running the code.Remove metadata for a channel with result
Actor.h
1
Actor.cpp
1
Remove metadata for a channel with lambda
Actor.h
1
Actor.cpp
1
Channel memberships
Get channel memberships
The method returns a list of channel memberships for a user. This method doesn't return a user's subscriptions.
Method(s)
Method variants
You can also call the GetMembershipsRaw variant of this method which takes String values for Include and Sort instead of the FPubnubMembershipInclude and FPubnubMembershipSort structs.
1PubnubSubsystem->GetMemberships(
2 FString User,
3 FOnGetMembershipsResponse OnGetMembershipsResponse,
4 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
5 int Limit = 100,
6 FString Filter = "",
7 FPubnubMembershipSort Sort = FPubnubMembershipSort(),
8 FString PageNext = "",
9 FString PagePrev = ""
10);
| Parameter | Description |
|---|---|
User *Type: FString | The user UUID for whom to retrieve memberships. |
OnGetMembershipsResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetMembershipsResponseNative to handle the result using a lambda. |
IncludeType: FPubnubMembershipInclude | List of property names to include in the response. |
LimitType: int | Number of objects to return. Default/Max: 100. |
FilterType: FString | Filter expression. Only matching objects are returned. See filtering. |
SortType: FPubnubMembershipSort | Key-value pair of a property to sort by, and a sort direction. |
PageNextType: FString | Cursor-based pagination. Use to retrieve the next page. |
PagePrevType: FString | Cursor-based pagination. Use to retrieve the previous page. Ignored if PageNext is provided. |
FPubnubMembershipInclude
| Field Name | Type | Default Value | Description |
|---|---|---|---|
IncludeCustom | bool | false | Whether to include the membership's Custom field. |
IncludeStatus | bool | false | Whether to include the membership's Status field. |
IncludeType | bool | false | Whether to include the membership's Type field. |
IncludeChannel | bool | false | Whether to include the membership's Channel data field (in form of FPubnubChannelData). |
IncludeChannelCustom | bool | false | Whether to include the membership's Channel Custom field. |
IncludeChannelStatus | bool | false | Whether to include the membership's Channel Status field |
IncludeChannelType | bool | false | Whether to include the membership's Channel Type field |
IncludeTotalCount | bool | false | Whether to include the total count of memberships |
FPubnubMembershipSort
| Field Name | Type | Description |
|---|---|---|
MembershipSort | TArray<FPubnubMembershipSingleSort> | Array of sort criteria used in Membership-related functions. Order matters (applied in sequence). |
FPubnubMembershipSingleSort
| Field Name | Type | Default | Description |
|---|---|---|---|
| SortType | EPubnubMembershipSortType | EPubnubMembershipSortType::PMST_ChannelID | Field to sort by in the Membership context |
| SortOrder | bool | false | Ascending when false, descending when true |
EPubnubMembershipSortType
| Enum Value | Display Name | Description |
|---|---|---|
PMST_ChannelID | ChannelID | Sort by Channel ID |
PMST_ChannelName | ChannelName | Sort by Channel Name |
PMST_ChannelUpdated | ChannelUpdated | Sort by last update to the Channel |
PMST_ChannelStatus | ChannelStatus | Sort by Channel Status |
PMST_ChannelType | ChannelType | Sort by Channel Type |
PMST_Updated | Updated | Sort by Membership update timestamp |
PMST_Status | Status | Sort by Membership status |
PMST_Type | Type | Sort by Membership type |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetMembershipsResponse struct.
FOnGetMembershipsResponse
| Field | Type | Description |
|---|---|---|
MembershipsData | TArray<FPubnubMembershipData>& | Aa array of FPubnubMembershipData structs which are the memberships of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FPubnubMembershipData
| Field | Type | Description |
|---|---|---|
Channel | FPubnubChannelData | Contains channel metadata, including unique channel identifier and other relevant information. |
Custom | FString | Custom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported. |
Status | FString | Status of the membership. Max 50 characters. |
Type | FString | Type of the membership. Max 50 characters. |
Updated | FString | The date when the channel's membership was last updated. |
ETag | FString | Version identifier of the membership metadata. |
FOnGetMembershipsResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
MembershipsData | const TArray<FPubnubMembershipData>& | Aa array of FPubnubMembershipData structs which are the memberships of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Other examples
Reference code
ACTION REQUIRED before running the code.Get memberships for a user with settings
Actor.h
1
Actor.cpp
1
Get memberships for a user with lambda
Actor.h
1
Actor.cpp
1
Get memberships for a user with raw
Actor.h
1
Actor.cpp
1
Set channel memberships
Set channel memberships for a User.
Method(s)
1PubnubSubsystem->SetMemberships(
2 FString User,
3 TArray<FPubnubMembershipInputData> Channels,
4 FOnSetMembershipsResponse OnSetMembershipsResponse,
5 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMembershipSort Sort = FPubnubMembershipSort(),
9 FString PageNext = "",
10 FString PagePrev = "");
| Parameter | Description |
|---|---|
UserType: FString | The user UUID to add/update the memberships. Can't be empty. |
Channels | The array of channel memberships to add/update. Can't be empty. |
FOnSetMembershipsResponse | The delegate for the operation's result. You can also use a native callback of the type FOnSetMembershipsResponseNative to handle the result using a lambda. |
IncludeType: FPubnubMembershipInclude | List of property names to include in the response. |
LimitType: int | The maximum number of memberships to return. |
FilterType: FString | The filter to apply to the memberships. |
SortType: FPubnubMembershipSort | The sort order to apply to the memberships. |
PageNextType: FString | The next page token to use for pagination. |
PagePrevType: FString | The previous page token to use for pagination. |
API limits
To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.
FPubnubMembershipInputData
| Field | Type | Description |
|---|---|---|
Channel | FString | The channel ID to add/update the membership. Can't be empty. |
Custom | FString | The custom data to add/update the membership. |
Status | FString | The status of the membership. |
Type | FString | The type of the membership. |
FOnSetMembershipsResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
MembershipsData | TArray<FPubnubMembershipData>& | An array of FPubnubMembershipData structs which are the memberships of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FOnSetMembershipsResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
MembershipsData | const TArray<FPubnubMembershipData>& | An array of FPubnubMembershipData structs which are the memberships of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Sample code
Reference code
ACTION REQUIRED before running the code.API limits
To learn about the maximum length of parameters used to set channel membership metadata, refer to REST API docs.
Returns
1{
2 "Memberships": [
3 {
4 "ChannelMetadata": {
5 "Channel": "my-channel",
6 "Name": "My channel",
7 "Description": "A channel that is mine",
8 "Custom": "",
9 "Updated": "2020-06-17T16:55:44.632042Z"
10 },
11 "Custom": {
12 "starred": false
13 },
14 "Updated": "2020-06-17T17:05:25.987964Z"
15 },
show all 38 linesOther examples
Reference code
ACTION REQUIRED before running the code.Set memberships for a user with result
Actor.h
1
Actor.cpp
1
Set memberships for a user with lambda
Actor.h
1
Actor.cpp
1
Set memberships for a user with raw
Actor.h
1
Actor.cpp
1
Remove Channel Memberships
Remove channel memberships for a user.
Method(s)
1PubnubSubsystem->RemoveMemberships(
2 FString User,
3 TArray<FString> Channels,
4 FOnRemoveMembershipsResponse OnRemoveMembershipsResponse,
5 FPubnubMembershipInclude Include = FPubnubMembershipInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMembershipSort Sort = FPubnubMembershipSort(),
9 FString PageNext = "",
10 FString PagePrev = ""
11);
| Parameter | Description |
|---|---|
UserType: FString | The user UUID to remove the memberships. Can't be empty. |
ChannelsType: TArray<FString> | The array of channel IDs to remove the memberships. Can't be empty. |
FOnRemoveMembershipsResponse | The delegate for the operation's result. You can also use a native callback of the type FOnRemoveMembershipsResponseNative to handle the result using a lambda. |
IncludeType: FPubnubMembershipInclude | List of property names to include in the response. |
LimitType: int | The maximum number of memberships to return. |
FilterType: FString | The filter to apply to the memberships. |
SortType: FPubnubMembershipSort | The sort order to apply to the memberships. |
PageNextType: FString | The next page token to use for pagination. |
PagePrevType: FString | The previous page token to use for pagination. |
API limits
To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnRemoveMembershipsResponse struct.
FOnRemoveMembershipsResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
MembershipsData | TArray<FPubnubMembershipData>& | An array of FPubnubMembershipData structs which are the memberships of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FOnRemoveMembershipsResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
MembershipsData | const TArray<FPubnubMembershipData>& | An array of FPubnubMembershipData structs which are the memberships of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Other examples
Reference code
ACTION REQUIRED before running the code.Remove memberships for a user with result
Actor.h
1
Actor.cpp
1
Remove memberships for a user with lambda
Actor.h
1
Actor.cpp
1
Remove memberships for a user with raw
Actor.h
1
Actor.cpp
1
Channel members
Get channel members
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.
Method(s)
Method variants
You can also call the GetChannelMembersRaw variant of this method which takes String values for Include, and Sort instead of the FPubnubMemberInclude and FPubnubMemberSort structs.
1PubnubSubsystem->GetChannelMembers(
2 FString Channel,
3 FOnGetChannelMembersResponse OnGetChannelMembersResponse,
4 FPubnubMemberInclude Include = FPubnubMemberInclude(),
5 int Limit = 100,
6 FString Filter = "",
7 FPubnubMemberSort Sort = FPubnubMemberSort(),
8 FString PageNext = "",
9 FString PagePrev = ""
10);
| Parameter | Description |
|---|---|
Channel *Type: FString | The Channel ID for which to retrieve members. |
OnGetChannelMembersResponse * | The delegate for the operation's result. You can also use a native callback of the type FOnGetChannelMembersResponseNative to handle the result using a lambda. |
IncludeType: FPubnubMemberInclude | A comma-separated list of property names to include in the response. |
LimitType: int | Number of objects to return. Default/Max: 100. |
FilterType: FString | Expression used to filter the results. Check online documentation to see exact filter formulas. |
SortType: FPubnubMemberSort | Key-value pair of a property to sort by, and a sort direction. |
PageNextType: FString | A string to retrieve the next page of results (if applicable). |
PagePrevType: FString | A string to retrieve the previous page of results (if applicable). Ignored if PageNext is provided. |
FPubnubMemberInclude
| Field Name | Type | Default | Description |
|---|---|---|---|
IncludeCustom | bool | false | Whether to include the member's Custom field |
IncludeStatus | bool | false | Whether to include the member's Status field |
IncludeType | bool | false | Whether to include the member's Type field |
IncludeUUID | bool | false | Whether to include the member's User data (FPubnubUUIDMetadata) |
IncludeUUIDCustom | bool | false | Whether to include the member's User Custom field |
IncludeUUIDStatus | bool | false | Whether to include the member's User Status field |
IncludeUUIDType | bool | false | Whether to include the member's User Type field |
IncludeTotalCount | bool | false | Whether to include the total count of paginated records |
FPubnubMemberSort
| Field Name | Type | Description |
|---|---|---|
MemberSort | TArray<FPubnubMemberSingleSort> | Array of sort criteria used in Member-related functions. Order matters (applied in sequence). |
FPubnubMemberSingleSort
| Field Name | Type | Default | Description |
|---|---|---|---|
| SortType | EPubnubMemberSortType | EPubnubMemberSortType::PMeST_UserID | Field to sort by in the Member context |
| SortOrder | bool | false | Ascending when false, descending when true |
EPubnubMemberSortType
| Enum Value | Display Name | Description |
|---|---|---|
PMeST_UserID | UserID | Sort by Member's User ID |
PMeST_UserName | UserName | Sort by Member's User Name |
PMeST_UserUpdated | UserUpdated | Sort by when the User was updated |
PMeST_UserStatus | UserStatus | Sort by User Status |
PMeST_UserType | UserType | Sort by User Type |
PMeST_Updated | Updated | Sort by Member record update timestamp |
PMeST_Status | Status | Sort by Member Status |
PMeST_Type | Type | Sort by Member Type |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnGetChannelMembersResponse struct.
FOnGetChannelMembersResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
MembersData | TArray<FPubnubChannelMemberData>& | Aa array of FPubnubChannelMemberData structs which are the members of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FPubnubChannelMemberData
| Field | Type | Description |
|---|---|---|
User | FPubnubUserData | Contains user metadata, including unique channel identifier and other relevant information. |
Custom | FString | Custom JSON values. Can be strings, numbers, or booleans. Filtering by Custom isn’t supported. |
Status | FString | Status of the member. Max 50 characters. |
Type | FString | Type of the member. Max 50 characters. |
Updated | FString | The date when the channel's member was last updated. |
ETag | FString | Version identifier of the member metadata. |
FOnGetChannelMembersResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
MembersData | const TArray<FPubnubChannelMemberData>& | Aa array of FPubnubChannelMemberData structs which are the members of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Other examples
Reference code
ACTION REQUIRED before running the code.Get channel members with settings
Actor.h
1
Actor.cpp
1
Get channel members with lambda
Actor.h
1
Actor.cpp
1
Get channel members raw
Actor.h
1
Actor.cpp
1
Set channel members
This method sets members in a channel.
Method(s)
1PubnubSubsystem->SetChannelMembers(
2 FString Channel,
3 TArray<FPubnubChannelMemberInputData> Users,
4 FOnSetChannelMembersResponse OnSetChannelMembersResponse,
5 FPubnubMemberInclude Include = FPubnubMemberInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMemberSort Sort = FPubnubMemberSort(),
9 FString PageNext = "",
10 FString PagePrev = ""
11);
| Parameter | Description |
|---|---|
ChannelType: FString | The channel ID to add/update the members. Can't be empty. |
Users | The array of channel members to add/update. Can't be empty. |
FOnSetChannelMembersResponse | The delegate for the operation's result. You can also use a native callback of the type FOnSetChannelMembersResponseNative to handle the result using a lambda. |
IncludeType: FPubnubMemberInclude | List of property names to include in the response. |
LimitType: int | The maximum number of members to return. |
FilterType: FString | The filter to apply to the members. |
SortType: FPubnubMemberSort | The sort order to apply to the members. |
PageNextType: FString | The next page token to use for pagination. |
PagePrevType: FString | The previous page token to use for pagination. |
API limits
To learn about the maximum length of parameters used to set user metadata, refer to REST API docs.
FPubnubChannelMemberInputData
| Field | Type | Description |
|---|---|---|
User | FString | The user UUID to add/update the membership. Can't be empty. |
Custom | FString | The custom data to add/update the membership. |
Status | FString | The status of the membership. |
Type | FString | The type of the membership. |
FOnSetChannelMembersResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
MembersData | TArray<FPubnubChannelMemberData>& | An array of FPubnubChannelMemberData structs which are the members of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FOnSetChannelMembersResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
MembersData | const TArray<FPubnubChannelMemberData>& | An array of FPubnubChannelMemberData structs which are the members of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Sample code
Reference code
ACTION REQUIRED before running the code.API limits
To learn about the maximum length of parameters used to set channel members metadata, refer to REST API docs.
Returns
1{
2 "ChannelMembers": [
3 {
4 "UuidMetadata": {
5 "Uuid": "uuid-1",
6 "Name": "John Doe",
7 "Email": "john.doe@pubnub.com",
8 "ExternalId": "",
9 "ProfileUrl": "",
10 "Custom": "",
11 "Updated": "2019-02-20T23:11:20.89375"
12 },
13 "Custom": {
14 "role": "admin"
15 },
show all 39 linesOther examples
Reference code
ACTION REQUIRED before running the code.Set channel members with result
Actor.h
1
Actor.cpp
1
Set channel members with lambda
Actor.h
1
Actor.cpp
1
Set channel members raw
Actor.h
1
Actor.cpp
1
Remove Channel Members
Remove members from a channel.
Method(s)
1PubnubSubsystem->RemoveChannelMembers(
2 FString Channel,
3 TArray<FString> Users,
4 FOnRemoveChannelMembersResponse OnRemoveChannelMembersResponse,
5 FPubnubMemberInclude Include = FPubnubMemberInclude(),
6 int Limit = 100,
7 FString Filter = "",
8 FPubnubMemberSort Sort = FPubnubMemberSort(),
9 FString PageNext = "",
10 FString PagePrev = ""
11);
| Parameter | Description |
|---|---|
ChannelType: FString | The channel ID to remove the members. Can't be empty. |
UsersType: TArray<FString> | The array of user UUIDs to remove from the channel. Can't be empty. |
FOnRemoveChannelMembersResponse | The delegate for the operation's result. You can also use a native callback of the type FOnRemoveChannelMembersResponseNative to handle the result using a lambda. |
IncludeType: FPubnubMemberInclude | List of property names to include in the response. |
LimitType: int | The maximum number of members to return. |
FilterType: FString | The filter to apply to the members. |
SortType: FPubnubMemberSort | The sort order to apply to the members. |
PageNextType: FString | The next page token to use for pagination. |
PagePrevType: FString | The previous page token to use for pagination. |
Sample code
Reference code
ACTION REQUIRED before running the code.Returns
This function is void, but the delegate returns the FOnRemoveChannelMembersResponse struct.
FOnRemoveChannelMembersResponse
| Field | Type | Description |
|---|---|---|
Result | FPubnubOperationResult | The result of the operation. |
MembersData | TArray<FPubnubChannelMemberData>& | An array of FPubnubChannelMemberData structs which are the members of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
FOnRemoveChannelMembersResponseNative
| Field | Type | Description |
|---|---|---|
Result | const FPubnubOperationResult& | The result of the operation. |
MembersData | const TArray<FPubnubChannelMemberData>& | An array of FPubnubChannelMemberData structs which are the members of the channel. |
PageNext | FString | Random string returned from the server, indicating a specific position in a data set. Used for forward pagination, it fetches the next page, allowing you to continue from where you left off. |
PagePrev | FString | Random string returned from the server, indicating a specific position in a data set. Used for backward pagination, it fetches the previous page, enabling access to earlier data. Ignored if the pageNext parameter is supplied. |
Other examples
Reference code
ACTION REQUIRED before running the code.Remove channel members with result
Actor.h
1
Actor.cpp
1
Remove channel members with lambda
Actor.h
1
Actor.cpp
1
Remove channel members raw
Actor.h
1
Actor.cpp
1
Complete example
Reference code
ACTION REQUIRED before running the code.ASample_AppContextFull.h
1
ASample_AppContextFull.cpp
1