Package im.getsocial.sdk.communities
Class CommunitiesEntity
- java.lang.Object
-
- im.getsocial.sdk.communities.CommunitiesEntity
-
public class CommunitiesEntity extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CommunitiesEntity(CommunitiesEntityType type, java.lang.String id, boolean isFollower, int followersCount, java.lang.String title, java.lang.String avatarUrl, java.util.Map<CommunitiesAction,java.lang.Boolean> availableActions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAvatarUrl()
Get avatar URL of the topic/user.int
getFollowersCount()
Number of followers of the entity.java.lang.String
getId()
Unique identifier of the entity.java.lang.String
getTitle()
Title of the topic.CommunitiesEntityType
getType()
Type of entity.boolean
isActionAllowed(CommunitiesAction action)
Check if current user is allowed to perform a certain action.boolean
isFollowedByMe()
If current user follows the entity.
-
-
-
Constructor Detail
-
CommunitiesEntity
public CommunitiesEntity(CommunitiesEntityType type, java.lang.String id, boolean isFollower, int followersCount, java.lang.String title, java.lang.String avatarUrl, java.util.Map<CommunitiesAction,java.lang.Boolean> availableActions)
-
-
Method Detail
-
getType
public CommunitiesEntityType getType()
Type of entity.- Returns:
- entity type.
-
getId
public java.lang.String getId()
Unique identifier of the entity. For example. if it isCommunitiesEntityType.USER
, you can use ID as user ID in other calls. Could be null forCommunitiesEntityType.APP
orCommunitiesEntityType.UNKNOWN
.- Returns:
- ID of entity.
-
isFollowedByMe
public boolean isFollowedByMe()
If current user follows the entity.- Returns:
- true, if current user is entity follower, false otherwise.
-
getFollowersCount
public int getFollowersCount()
Number of followers of the entity.- Returns:
- total followers count of this entity.
-
getTitle
public java.lang.String getTitle()
Title of the topic. Display name of the user. Null string otherwise.- Returns:
- title/name of the entity.
-
getAvatarUrl
public java.lang.String getAvatarUrl()
Get avatar URL of the topic/user. Null if not set. Null for everything else.- Returns:
- avatar URL of entity if present.
-
isActionAllowed
public boolean isActionAllowed(CommunitiesAction action)
Check if current user is allowed to perform a certain action.- Parameters:
action
- action to be checked.- Returns:
- true, if current user is allowed to perform action, false otherwise.
-
-