UserMetadata Entity
As of version 1.1.0, the Unreal Engine software development kit (SDK) supports entities. Entities are SDK objects that bundle operations for a specific resource type and simplify working with PubNub application programming interfaces (APIs).
Use entities to perform common tasks without manually wiring requests. Some PubNub APIs are exposed via entities. Other operations are available on UPubnubClient (recommended) or on the UPubnubSubsystem object; see Configuration and the API reference for details.
Create UserMetadata
Use this factory method to return a local UserMetadata entity for a single user metadata object. A UserMetadata entity centralizes operations related to App Context user metadata.
1UPubnubUserMetadataEntity* CreateUserMetadataEntity(FString User);
| Parameter | Description |
|---|---|
User *Type: FString | Identifier of the user metadata object to manage. |
Sample code
Reference code
Available operations
The UserMetadata entity provides operations for PubNub App Context user metadata.
| Operation (click for more information) | Description |
|---|---|
CreateSubscription(SubscribeSettings) | Returns a local user metadata subscription object with optional parameters. You can then subscribe to receive real-time updates for that user metadata. |
SetUserMetadata(UserMetadata, OnSetUserMetadataResponse, Include) | Sets metadata for a specified user in the PubNub App Context. Requires the App Context add-on. |
GetUserMetadata(OnGetUserMetadataResponse, Include) | Retrieves metadata for a specified user from the PubNub App Context. Requires the App Context add-on. |
RemoveUserMetadata(OnRemoveUserMetadataResponse) | Removes all metadata associated with a specified user from the PubNub App Context. Requires the App Context add-on. |