DataSync

interface DataSync

Entry point for the DataSync API, reached via pubnub.dataSync().

Functions

Link copied to clipboard
abstract fun createChannel(classVersion: Int): CreateChannel
Create a DataSync channel.
Link copied to clipboard
abstract fun createEntity(className: String, classVersion: Int): CreateEntity
Create a DataSync entity.
Link copied to clipboard
abstract fun createMembership(channelId: String, userId: String, classVersion: Int): CreateMembership
Create a DataSync membership linking a Channel and a User.
Link copied to clipboard
abstract fun createRelationship(entityAId: String, entityBId: String, className: String, classVersion: Int): CreateRelationship
Create a DataSync relationship linking two entities.
Link copied to clipboard
abstract fun createUser(classVersion: Int): CreateUser
Create a DataSync user.
Link copied to clipboard
abstract fun getChannel(channelId: String): GetChannel
Get a DataSync channel by its id.
Link copied to clipboard
abstract fun getChannels(): GetChannels
List DataSync channels.
Link copied to clipboard
abstract fun getEntities(className: String): GetEntities
List DataSync entities of a class.
Link copied to clipboard
abstract fun getEntity(entityId: String): GetEntity
Get a DataSync entity by its id.
Link copied to clipboard
abstract fun getMembership(membershipId: String): GetMembership
Get a DataSync membership by its id.
Link copied to clipboard
List DataSync memberships, optionally filtered by channel and/or user.
Link copied to clipboard
abstract fun getRelationship(relationshipId: String): GetRelationship
Get a DataSync relationship by its id.
Link copied to clipboard
abstract fun getRelationships(className: String): GetRelationships
List DataSync relationships of a class, optionally filtered by entity A and/or entity B.
Link copied to clipboard
abstract fun getUser(userId: String): GetUser
Get a DataSync user by its id.
Link copied to clipboard
abstract fun getUsers(): GetUsers
List DataSync users.
Link copied to clipboard
abstract fun removeChannel(channelId: String): RemoveChannel
Remove a DataSync channel by its id.
Link copied to clipboard
abstract fun removeEntity(entityId: String): RemoveEntity
Remove a DataSync entity by its id.
Link copied to clipboard
abstract fun removeMembership(membershipId: String): RemoveMembership
Remove a DataSync membership by its id.
Link copied to clipboard
abstract fun removeRelationship(relationshipId: String): RemoveRelationship
Remove a DataSync relationship by its id.
Link copied to clipboard
abstract fun removeUser(userId: String): RemoveUser
Remove a DataSync user by its id.
Link copied to clipboard
abstract fun setChannel(channelId: String, classVersion: Int): SetChannel
Replaces a channel in full.
Link copied to clipboard
abstract fun setEntity(entityId: String, classVersion: Int): SetEntity
Replaces an entity in full.
Link copied to clipboard
abstract fun setMembership(membershipId: String, classVersion: Int): SetMembership
Replaces a membership in full.
Link copied to clipboard
abstract fun setRelationship(relationshipId: String, classVersion: Int): SetRelationship
Replaces a relationship in full.
Link copied to clipboard
abstract fun setUser(userId: String, classVersion: Int): SetUser
Replaces a user in full.
Link copied to clipboard
abstract fun updateChannel(channelId: String, operations: List<PNJsonPatchOperation>): UpdateChannel
Partially update a DataSync channel via JSON Patch (RFC-6902).
Link copied to clipboard
abstract fun updateEntity(entityId: String, operations: List<PNJsonPatchOperation>): UpdateEntity
Partially update a DataSync entity via JSON Patch (RFC-6902).
Link copied to clipboard
abstract fun updateMembership(membershipId: String, operations: List<PNJsonPatchOperation>): UpdateMembership
Partially update a DataSync membership via JSON Patch (RFC-6902).
Link copied to clipboard
abstract fun updateRelationship(relationshipId: String, operations: List<PNJsonPatchOperation>): UpdateRelationship
Partially update a DataSync relationship via JSON Patch (RFC-6902).
Link copied to clipboard
abstract fun updateUser(userId: String, operations: List<PNJsonPatchOperation>): UpdateUser
Partially update a DataSync user via JSON Patch (RFC-6902).