tuweni / org.apache.tuweni.scuttlebutt.lib / SocialService

SocialService

open class SocialService (source)

Operations for querying the follow graph, and fetching the profiles of users. Assumes that the standard 'ssb-about' and 'ssb-friends' plugins are installed on the target instance (or that RPC functions meeting their manifests' contracts are available.) Should not be instantiated directly - an instance should be acquired via the ScuttlebuttClient instance

Functions

getFollowedBy

open fun getFollowedBy(): AsyncResult<MutableList<Profile>>

Get the profiles of all the instances that are following the instance.

getFollowing

open fun getFollowing(): AsyncResult<MutableList<Profile>>

Get the profiles of all the users that the instance is following.

getFriends

open fun getFriends(): AsyncResult<MutableList<Profile>>

Get the profiles of all the users that the instance is following that also follow the instance.

getOwnIdentity

open fun getOwnIdentity(): AsyncResult<String>

Get the instance's public key (the key used for its identity.)

getOwnProfile

open fun getOwnProfile(): AsyncResult<Profile>

Get the instance's current profile

getProfile

open fun getProfile(publicKey: String): AsyncResult<Profile>

Gets the profile of a given user

setDisplayName

open fun setDisplayName(displayName: String): AsyncResult<Profile>

Set the display name of the instance by posting an 'about' message to the feed.