public final class Invites
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
create(InviteContent customInviteContent,
Callback<InvitePackage> success,
FailureCallback failure)
Create invite with localized values and a link.
|
static void |
createLink(java.util.Map<java.lang.String,java.lang.Object> linkParams,
Callback<java.lang.String> callback,
FailureCallback failure)
Creates a Smart Link with user referral data attached used for Smart Invites.
|
static void |
getAvailableChannels(Callback<java.util.List<InviteChannel>> success,
FailureCallback failure)
Get the list of available invite channels.
|
static void |
getReferredUsers(PagingQuery<ReferralUsersQuery> query,
Callback<PagingResult<ReferralUser>> callback,
FailureCallback failure)
Returns list of users who were referred by this user for a specific event.
|
static void |
getReferrerUsers(PagingQuery<ReferralUsersQuery> query,
Callback<PagingResult<ReferralUser>> callback,
FailureCallback failure)
Returns list of users who are referrers for this user for a specific event.
|
static boolean |
registerPlugin(InviteChannelPlugin inviteChannelPlugin,
java.lang.String channelId)
Register a new instance of a plugin for a specified channel.
|
static void |
send(InviteContent customInviteContent,
java.lang.String channelId,
CompletionCallback success,
CompletionCallback cancel,
FailureCallback failure)
Invite friends via a specified invite channel.
|
static void |
setReferralDataListener(ReferralDataListener listener)
Set listener to receive referral data if there is any.
|
static void |
setReferrer(UserId referrerId,
java.lang.String event,
java.util.Map<java.lang.String,java.lang.String> customData,
CompletionCallback callback,
FailureCallback failure)
Sets referrer id for current user.
|
public static void getAvailableChannels(Callback<java.util.List<InviteChannel>> success, FailureCallback failure)
success
- called with a list of available invite channels.failure
- called if operation failed.public static void send(InviteContent customInviteContent, java.lang.String channelId, CompletionCallback success, CompletionCallback cancel, FailureCallback failure)
customInviteContent
- Custom content to override the default content provided from the Dashboard.channelId
- The channel through which the invite will be sent, one of the constants defined in InviteChannelIds
.success
- Called when the invite process is complete.cancel
- Called if a user canceled an invite.failure
- Called if operation failed.public static void create(InviteContent customInviteContent, Callback<InvitePackage> success, FailureCallback failure)
customInviteContent
- Custom content to override the default content provided from the Dashboard.success
- Called with invite content when it is created.failure
- Called if operation failed.public static boolean registerPlugin(InviteChannelPlugin inviteChannelPlugin, java.lang.String channelId)
inviteChannelPlugin
- An instance of a plugin implementation.channelId
- Id of the channel for the plugin implementation, one of the constants defined in InviteChannelIds
.public static void setReferralDataListener(ReferralDataListener listener)
listener
- to be called with a new referral data.public static void getReferredUsers(PagingQuery<ReferralUsersQuery> query, Callback<PagingResult<ReferralUser>> callback, FailureCallback failure)
query
- Users query.callback
- Called with list of referred users. If there is no referred user, the list is empty.failure
- Called if operation failed.public static void getReferrerUsers(PagingQuery<ReferralUsersQuery> query, Callback<PagingResult<ReferralUser>> callback, FailureCallback failure)
query
- Users query.callback
- Called with list of referred users. If there is no referred user, the list is empty.failure
- Called if operation failed.public static void createLink(java.util.Map<java.lang.String,java.lang.Object> linkParams, Callback<java.lang.String> callback, FailureCallback failure)
linkParams
- Link customization parameters. More info @see herecallback
- Called when the url creation is finished.failure
- Called if operation failed.public static void setReferrer(UserId referrerId, java.lang.String event, java.util.Map<java.lang.String,java.lang.String> customData, CompletionCallback callback, FailureCallback failure)
referrerId
- Id of referrer user.event
- Referrer event.customData
- Custom key-value pairs.callback
- Called when the referrer setting is finished.failure
- Called if operation failed.(c) Copyright GetSocial BV, 2020. All Rights Reserved.