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

Constructors

<init>

SocialService(multiplexer: Multiplexer!, feedService: FeedService!)

Functions

getFollowedBy

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

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

getFollowing

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

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

getFriends

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

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

getOwnIdentity

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

open fun getOwnIdentity(): AsyncResult<String!>!

getOwnProfile

Get the instance's current profile

open fun getOwnProfile(): AsyncResult<Profile!>!

getProfile

Gets the profile of a given user

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

setDisplayName

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

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