public interface AuthenticatedCaptainUpConnection extends CaptainUpConnection
Modifier and Type | Method and Description |
---|---|
CreateAcquireCaptainUpResponse |
acquire(Asset asset)
Acquire an asset, you will receive the
Asset object in the `AcquiredAssetCaptainUpUserListener` listener. |
void |
acquireAsync(Asset asset,
CaptainUpCallback<CreateAcquireCaptainUpResponse> callback)
Acquire an asset, you will receive the
Asset object in the `AcquiredAssetCaptainUpUserListener` listener. |
CreateClaimCaptainUpResponse |
claimReward(Badge badge)
See
claimRewardAsync(Badge, CaptainUpCallback) about details on the claim operation. |
CreateClaimCaptainUpResponse |
claimReward(Badge badge,
Reward reward) |
void |
claimRewardAsync(Badge badge,
CaptainUpCallback<CreateClaimCaptainUpResponse> callback)
Claim a reward from a Badge with reward (has its hasReward() function returns true).
|
void |
claimRewardAsync(Badge badge,
Reward reward,
CaptainUpCallback<CreateClaimCaptainUpResponse> callback) |
CreateActionCaptainUpResponse |
createAction(Action action)
See
createActionAsync(Action, CaptainUpCallback) about details on the create action
operation. |
void |
createActionAsync(Action action,
CaptainUpCallback<CreateActionCaptainUpResponse> callback)
Creates a new action and adds it to your app.
|
GetActionCaptainUpResponse |
deleteNotifications(ActionType actionType,
Query query)
Removes notifications of the specified type (private or inbox) – either all notifications,
or only a specified number.
|
GetActionCaptainUpResponse |
deleteNotifications(ActionType actionType,
Query query,
java.lang.String messageID)
Removes a specific notification of the specified type (private or inbox) – either all notifications,
or only a specified number.
|
void |
deleteNotificationsAsync(ActionType actionType,
Query query,
CaptainUpCallback<GetActionCaptainUpResponse> callback)
Removes notifications of the specified type (private or inbox) – either all notifications,
or only a specified number.
|
void |
deleteNotificationsAsync(ActionType actionType,
Query query,
java.lang.String messageID,
CaptainUpCallback<GetActionCaptainUpResponse> callback)
Removes a specific notification of the specified type (private or inbox) – either all notifications,
or only a specified number.
|
GetActionCaptainUpResponse |
queryActions(ActionType actionType,
Query query)
Returns several actions and information about the users associated with them.
|
void |
queryActionsAsync(ActionType actionType,
Query query,
CaptainUpCallback<GetActionCaptainUpResponse> callback)
Returns several actions and information about the users associated with them.
|
GetActionCaptainUpResponse |
queryUnreadInbox()
Retrieves the notification list by their type.
|
void |
queryUnreadInboxAsync(CaptainUpCallback<GetActionCaptainUpResponse> callback)
Retrieves the notification list by their type.
|
void |
setListener(SocketNotificationsListener listener)
Used to listen to notification events from actions (used by framework
|
addOrUpdateIntegrationUser, addOrUpdateIntegrationUserAsync, authenticate, queryActions, queryActionsAsync, queryLeaderboard, queryLeaderboardAsync, querySocialFeed, querySocialFeedAsync, retrieveApplication, retrieveApplicationAsync, retrieveUser, retrieveUserAsync, setLanguageCode
CreateActionCaptainUpResponse createAction(Action action) throws CaptainUpException
createActionAsync(Action, CaptainUpCallback)
about details on the create action
operation.action
- the action to create. The action can be obtained using
ActionBuilder
.CaptainUpException
void createActionAsync(Action action, CaptainUpCallback<CreateActionCaptainUpResponse> callback)
createAction(Action)
since this will not block the current
thread until the request returns.action
- the action to create. The action can be obtained using
ActionBuilder
.callback
- a callback that will contain the response and any exception that might
have risen during the execution. The response may contain an erro code or the
changes objects from the operation.CreateClaimCaptainUpResponse claimReward(Badge badge) throws CaptainUpException
claimRewardAsync(Badge, CaptainUpCallback)
about details on the claim operation.badge
- the badge with the reward to claim. (Must be a badge with a reward.)
Badge
.CaptainUpException
CreateClaimCaptainUpResponse claimReward(Badge badge, Reward reward) throws CaptainUpException
CaptainUpException
void claimRewardAsync(Badge badge, CaptainUpCallback<CreateClaimCaptainUpResponse> callback)
badge
- badge with reward to be claimedcallback
- response listenervoid claimRewardAsync(Badge badge, Reward reward, CaptainUpCallback<CreateClaimCaptainUpResponse> callback)
CreateAcquireCaptainUpResponse acquire(Asset asset)
Asset
object in the `AcquiredAssetCaptainUpUserListener` listener.
in some cases (for example when user does not have enough currency or stock is limited) call will return an error, you can listen to error
events to catch that error, or supply a callback.
This method is asynchronous.void acquireAsync(Asset asset, CaptainUpCallback<CreateAcquireCaptainUpResponse> callback)
Asset
object in the `AcquiredAssetCaptainUpUserListener` listener.
in some cases (for example when user does not have enough currency or stock is limited) call will return an error.
This method is asynchronous.GetActionCaptainUpResponse queryActions(ActionType actionType, Query query) throws CaptainUpException
actionType
- the type of actionquery
- query parametersCaptainUpException
void queryActionsAsync(ActionType actionType, Query query, CaptainUpCallback<GetActionCaptainUpResponse> callback)
queryActions
since this will not block the current
thread until the request returns.actionType
- the type of the actionquery
- query parameters. To create a query object use QueryBuilder
callback
- a callback that will contain the response and any exception that might
have risen during the execution.queryActions(ActionType, Query)
GetActionCaptainUpResponse queryUnreadInbox() throws CaptainUpException
CaptainUpException
java.lang.IllegalArgumentException
- if the actionType is PUBLICvoid queryUnreadInboxAsync(CaptainUpCallback<GetActionCaptainUpResponse> callback)
queryUnreadInbox()
since this will not block the current thread until the request returns.callback
- a callback that will contain the response and any exception that might
have risen during the execution.java.lang.IllegalArgumentException
- if the actionType is PUBLICGetActionCaptainUpResponse deleteNotifications(ActionType actionType, Query query) throws CaptainUpException
actionType
- the requested notification's type.
They only allowed values are ActionType.PRIVATE
and ActionType.INBOX
-
it is not possible to delete only the public notifications. Private
notifications also include the public ones.query
- query parameters. To create a query object use QueryBuilder
CaptainUpException
java.lang.IllegalArgumentException
- if the actionType is PUBLICvoid deleteNotificationsAsync(ActionType actionType, Query query, CaptainUpCallback<GetActionCaptainUpResponse> callback)
deleteNotifications(ActionType, Query)
since this will not block the current thread until the request returns.actionType
- the requested notification's type.
They only allowed values are ActionType.PRIVATE
and ActionType.INBOX
-
it is not possible to delete only the public notifications. Private
notifications also include the public ones.query
- query parameters. To create a query object use QueryBuilder
callback
- a callback that will contain the response and any exception that might
have risen during the execution.GetActionCaptainUpResponse deleteNotifications(ActionType actionType, Query query, java.lang.String messageID) throws CaptainUpException
actionType
- the requested notification's type.
They only allowed values are ActionType.PRIVATE
and ActionType.INBOX
-
it is not possible to delete only the public notifications. Private
notifications also include the public ones.query
- query parameters. To create a query object use QueryBuilder
messageID
- the ID of the notification to delete Action.getID()
CaptainUpException
java.lang.IllegalArgumentException
- if the actionType is PUBLICvoid deleteNotificationsAsync(ActionType actionType, Query query, java.lang.String messageID, CaptainUpCallback<GetActionCaptainUpResponse> callback)
deleteNotifications(ActionType, Query)
since this will not block the current thread until the request returns.actionType
- the requested notification's type.
They only allowed values are ActionType.PRIVATE
and ActionType.INBOX
-
it is not possible to delete only the public notifications. Private
notifications also include the public ones.query
- query parameters. To create a query object use QueryBuilder
messageID
- the ID of the notification to delete Action.getID()
callback
- a callback that will contain the response and any exception that might
have risen during the execution.void setListener(SocketNotificationsListener listener)
listener
-