Package im.getsocial.sdk.communities
Class GroupsQuery
- java.lang.Object
-
- im.getsocial.sdk.communities.GroupsQuery
-
public final class GroupsQuery extends java.lang.Object
Query to get groups.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupsQuery
all()
Get all groups.static GroupsQuery
find(java.lang.String name)
Find groups by name or description.GroupsQuery
followedByUser(UserId userId)
Get groups followed by a specific user.java.lang.String
getSearchTerm()
GroupsQuery
onlyTrending(boolean trending)
Get trending groups.GroupsQuery
withLabels(java.util.List<java.lang.String> labels)
Get groups with the specified labels.GroupsQuery
withMember(UserId userId)
GroupsQuery
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Get groups with the specified properties.
-
-
-
Method Detail
-
all
public static GroupsQuery all()
Get all groups.- Returns:
- new instance.
-
find
public static GroupsQuery find(java.lang.String name)
Find groups by name or description.- Parameters:
name
- groups name/description or part of it.- Returns:
- new instance.
-
followedByUser
public GroupsQuery followedByUser(UserId userId)
Get groups followed by a specific user.- Parameters:
userId
- ID of user.- Returns:
- new instance.
-
withMember
public GroupsQuery withMember(UserId userId)
-
onlyTrending
public GroupsQuery onlyTrending(boolean trending)
Get trending groups.- Parameters:
trending
- Only trending or all groups.- Returns:
- new query.
-
withLabels
public GroupsQuery withLabels(java.util.List<java.lang.String> labels)
Get groups with the specified labels.- Parameters:
labels
- List of labels.- Returns:
- new query.
-
withProperties
public GroupsQuery withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Get groups with the specified properties.- Parameters:
properties
- Properties.- Returns:
- new query.
-
getSearchTerm
public java.lang.String getSearchTerm()
- Returns:
- string passed to
find(String)
. Empty string if searching for all groups.
-
-