Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 4.26 KB

File metadata and controls

79 lines (62 loc) · 4.26 KB

TOP > Core API

Table of Contents


Core API

RakutenReward

RakutenReward class provides main settings and main functions of Reward SDK.
Refer here for the available API.


RakutenRewardCoroutine

support version
RakutenRewardCoroutine class provide API in suspend function.

API Name Description
getMissions Get missions
getMissionsLite Get mission lite list
getMissionDetails Get mission details
getPointHistory Get 3 month user's point history
logAction Post user action
getUnclaimedItems Get Unclaim item list
memberInfo Get the latest member info

These API return RewardApiResult which is either Success or Failed.

val result = RakutenRewardCoroutine.memberInfo()
when (result) {
    is Success -> {
        result.data // api data
    }
    is Failed -> {
        result.error // error code
    }
}

RakutenAuth

RakutenAuth class provides login and logout functions and access to basic user information.

API Name Description
openLoginPage Open Log In page
handleActivityResult Parse activity result from login page
hasUserSignedIn Check if user is logged in with internal system (token not expired)
logout Log out from Rakuten Auth, you might force removing session even if server sync up failed
getUserName Get Rakuten Member name
getUserInfo Load latest point & rank from server

RakutenRewardConfig

RakutenRewardConfig is user settings class.

API Name Description
isOptedOut Get Optout status
true : Optout (Reward SDK function does not work)
setOptedOut Set Optout status
isUiEnabled Get whether Notification UI is enabled or not
setUiEnabled Set whether Notification UI is enabled or not
isDebuggable Set Reward SDK to be debuggable
isUsingSdkPortal Set whether using SDK Portal or not (only available in UI module)


LANGUAGE :

ja