ISMEFollow
ISMEFollow is used to manage the follow relationship between DID users, and the instance of ISMEFollow can be accessed through client.follow
Method
count
Amount of followers
Type
class ISMEFollow {
  count(identifier?: string): Promise<{
    following: number
    followers: number
  }>
}
Details
If identifier is not provided, the DID of the currently logged in user will be queried, and the return value will be
following: the number of users following a DIDfollowers: the number of users who follow a DID
following
A list of users followed by current DID
Type
interface FollowMember {
  identifier: string
  name: string
  avatar: string
  bio: string
}
class ISMEFollow {
  following(options: {
    identifier?: string
    offset?: number
    limit?: number
  }): Promise<FollowMember[]>
}
followers
List of users who follow a DID
Type
class ISMEFollow {
  followers(options: {
    identifier?: string
    offset?: number
    limit?: number
  }): Promise<FollowMember[]>
}
follow
Follow a DID user
Type
class ISMEFollow {
  follow(identifier: string): Promise<{
    dataId: string
  }>
}
unfollow
Unfollow a DID user
Type
class ISMEFollow {
  unfollow(identifier: string): Promise<{
    dataId: string
  }>
}
check
Check if a DID is being followed
Type
class ISMEFollow {
  check(identifier: string, followingDid: string): Promise<boolean>
}