UserMetadata Entity
Since version 9.0.0, the java SDK supports entities, which are SDK objects that provide operations on endpoints associated with their type. They are designed as first-class citizens to facilitate working with various PubNub APIs.
Certain PubNub API functionality is already exposed via entities, while other may still be available using the pubnub
object.
Create UserMetadata
This method returns one local UserMetadata
entity.
pubnub.userMetadata(String userId)
Parameter | Type | Required | Description |
---|---|---|---|
userId | String | Yes | The String identifier for a single user metadata object to manage user information. |
Basic usage
UserMetadata userMetadata = pubnub.userMetadata("userId1")
Available operations
The UserMetadata
entity provides operations performed on PubNub App Context's user metadata.
Operation (click for more information) | Description |
---|---|
subscription(subscriptionOptions) | Returns a local channel subscription object with optional parameters to which you can subscribe and start receiving real-time updates for that channel. |