public class MemberResource extends BaseResource
apiClient, baseUrl, MAX_RESULTS, OM| Constructor and Description |
|---|
MemberResource(GroupsIOApiClient apiClient,
String baseUrl) |
| Modifier and Type | Method and Description |
|---|---|
Subscription |
approveMember(Integer groupId,
Integer subscriptionId)
Approve a member to a group
|
Subscription |
banMember(Integer groupId,
Integer subscriptionId)
Ban a member if they aren't already banned
|
void |
directAddMember(Integer groupId,
List<String> emails)
Add members directly to a group
|
Subscription |
getMemberInGroup(Integer groupId,
Integer memberId)
Gets a user's
Subscription for the specified group and member IDs |
List<Subscription> |
getMembersInGroup(Integer groupId)
Gets a list of members (represented by
Subscription) subscribed
to a particular group. |
void |
inviteMember() |
Subscription |
removeMember(Integer groupId,
Integer subscriptionId)
Remove a member from a group
|
List<Subscription> |
searchMembers(Integer groupId,
String query)
Gets a list of members (represented by
Subscription) subscribed
to a particular group. |
Subscription |
sendBounceProbe(Integer groupId,
Integer subscriptionId)
Send a bounce probe to a user if they are bouncing
|
Subscription |
sendConfirmationEmail(Integer groupId,
Integer subscriptionId)
Send a confirmation email to a user if they are not yet confirmed
|
Subscription |
updateMember(Subscription subscription)
Update a subscription to a group given a blank
Subscription
object with only the updated
fields set. |
callApi, callApi, loginpublic MemberResource(GroupsIOApiClient apiClient, String baseUrl)
public Subscription getMemberInGroup(Integer groupId, Integer memberId) throws URISyntaxException, IOException, GroupsIOApiException
Subscription for the specified group and member IDsSubscription for the specified group IDURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic List<Subscription> getMembersInGroup(Integer groupId) throws URISyntaxException, IOException, GroupsIOApiException
Subscription) subscribed
to a particular group.groupId - - which group to get members fromList<Subscription> representing the subscribed
membersURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic List<Subscription> searchMembers(Integer groupId, String query) throws URISyntaxException, IOException, GroupsIOApiException
Subscription) subscribed
to a particular group.groupId - - which group to get members fromquery - - what to search for (will search over email or name)List<Subscription> representing the subscribed
membersURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic Subscription updateMember(Subscription subscription) throws URISyntaxException, IOException, GroupsIOApiException
Subscription
object with only the updated
fields set.
Example:
final Subscription subToUpdate = new Subscription(); subToUpdate.setAutoFollowReplies(true); final Subscription updateSub = client.member().updateMember(subToUpdate);
subscription - - with only the updated fields setSubscription after a successful updateURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic Subscription banMember(Integer groupId, Integer subscriptionId) throws URISyntaxException, IOException, GroupsIOApiException
groupId - of the group they belong tosubscriptionId - of the subscription they haveSubscriptionURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic Subscription approveMember(Integer groupId, Integer subscriptionId) throws URISyntaxException, IOException, GroupsIOApiException
groupId - of the group they should belong tosubscriptionId - of the subscription they haveSubscriptionURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic void directAddMember(Integer groupId, List<String> emails) throws URISyntaxException, IOException, GroupsIOApiException
groupId - of the group they should be added toemails - a list of email address to add.URISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic void inviteMember()
public Subscription removeMember(Integer groupId, Integer subscriptionId) throws URISyntaxException, IOException, GroupsIOApiException
groupId - of the group they belong tosubscriptionId - of the subscription they haveSubscriptionURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic Subscription sendBounceProbe(Integer groupId, Integer subscriptionId) throws URISyntaxException, IOException, GroupsIOApiException
groupId - of the group they belong tosubscriptionId - of the subscription they haveSubscriptionURISyntaxExceptionIOExceptionGroupsIOApiExceptionpublic Subscription sendConfirmationEmail(Integer groupId, Integer subscriptionId) throws URISyntaxException, IOException, GroupsIOApiException
groupId - of the group they belong tosubscriptionId - of the subscription they haveSubscriptionURISyntaxExceptionIOExceptionGroupsIOApiExceptionCopyright © 2017–2018. All rights reserved.