Package 

Class TDSUser


  • 
    public class TDSUser
    extends LCUser
                        

    **********************************************Friends API

    • Method Summary

      Modifier and Type Method Description
      void signUp() sign up
      Observable<LCUser> signUpInBackground() sign up
      static <T extends LCUser> Observable<T> signUpOrLoginByMobilePhoneInBackground(String mobilePhoneNumber, String smsCode, Class<T> clazz) signUp or Login with mobile phone and sms code.
      static <T extends LCUser> Observable<T> logIn(String username, String password, Class<T> clazz) user login
      static Observable<out LCUser> loginByEmail(String email, String password) user login
      static Observable<out LCUser> loginByMobilePhoneNumber(String mobile, String password) logIn with mobile phone and password.
      static <T extends LCUser> Observable<T> loginByMobilePhoneNumber(String mobile, String password, Class<T> clazz) user login
      static Observable<out LCUser> loginBySMSCode(String mobile, String smsCode) logIn with mobile phone and sms code.
      static <T extends LCUser> Observable<T> loginBySMSCode(String mobile, String smsCode, Class<T> clazz) user login
      static Observable<LCNull> requestLoginSmsCodeInBackground(String mobilePhone) request sms code for login in background
      static Observable<LCNull> requestLoginSmsCodeInBackground(String mobilePhone, String validateToken) request sms code for login in background, with validation token.
      static Observable<LCNull> requestMobilePhoneVerifyInBackground(String mobilePhone) request verification for mobile phone in background.
      static Observable<LCNull> requestMobilePhoneVerifyInBackground(String mobilePhone, String validateToken) request verification for mobile phone in background, with validation token.
      static Observable<LCNull> requestSMSCodeForUpdatingPhoneNumberInBackground(String mobilePhone, LCSMSOption option) request sms code for updating phone number in background.
      static Observable<LCNull> requestSMSCodeForUpdatingPhoneNumberInBackground(LCUser asAuthenticatedUser, String mobilePhone, LCSMSOption option) request sms code for updating phone number in background.
      static Observable<LCNull> requestPasswordResetBySmsCodeInBackground(String phoneNumber) request to reset password by sms code in background.
      static Observable<LCNull> requestPasswordResetBySmsCodeInBackground(String phoneNumber, String validateToken) request to reset password by sms code in background, with validation token.
      static Observable<LCNull> verifySMSCodeForUpdatingPhoneNumberInBackground(String code, String mobilePhone) verify sms code for updating phone number in background.
      static Observable<LCNull> verifySMSCodeForUpdatingPhoneNumberInBackground(LCUser asAuthenticatedUser, String code, String mobilePhone) verify sms code for updating mobile phone in background.
      static Observable<LCNull> verifyMobilePhoneInBackground(String verifyCode) verify mobile phone in background
      static void logOut() current user log out
      static Observable<TDSUser> loginWithAuthData(Map<String, Object> authData, String platform) login with auth data.
      static Observable<TDSUser> loginWithAuthData(Map<String, Object> authData, String platform, String unionId, String unionIdPlatform, boolean asMainAccount) login with auth data.
      static void loginWithTapTap(Activity activity, Callback<TDSUser> callback, Array<String> permissions) login with TapTap authenticated user.
      static TDSUser becomeWithSessionToken(String sessionToken) instantiate AVUser object with sessionToken(synchronized)
      static TDSUser becomeWithSessionToken(String sessionToken, boolean saveToCurrentUser) instantiate AVUser object with sessionToken(synchronized)
      static Observable<TDSUser> becomeWithSessionTokenInBackground(String sessionToken) instantiate AVUser object with sessionToken(asynchronous)
      static Observable<TDSUser> becomeWithSessionTokenInBackground(String sessionToken, boolean saveToCurrentUser) instantiate AVUser object with sessionToken(asynchronous)
      static TDSUser getCurrentUser() get current user, null if non-login.
      static TDSUser currentUser() 获取当前登录用户
      static Observable<out TDSUser> logInAnonymously() login as anonymous user in background.
      Observable<LCFriendshipRequest> applyFriendshipInBackground(TDSUser friend, Map<String, Object> attributes) apply new friendship to someone.
      Observable<LCFriendshipRequest> acceptFriendshipRequest(LCFriendshipRequest request, Map<String, Object> attributes) accept a friendship.
      Observable<LCFriendshipRequest> declineFriendshipRequest(LCFriendshipRequest request) decline a friendship.
      Observable<Boolean> deleteFriendshipRequest(LCFriendshipRequest request) delete friendship request directly.
      LCQuery<LCFriendshipRequest> friendshipRequestQuery(int status, boolean includeTargetUser, boolean reachToCurrentUser) get query for AVFriendshipRequest.
      LCQuery<LCFriendship> friendshipQuery() get friendship query of current user.
      void registerFriendshipNotification(TDSUser.FriendshipNotification notify, LCCallback<LCNull> callback) register friendship notification.
      void unregisterFriendshipNotification(LCCallback<LCNull> callback) unregister friendship notification.
      String toJSONInfo()
      • Methods inherited from class cn.leancloud.LCUser

        acceptFriendshipRequest, alwaysUseSubUserClass, applyFriendshipInBackground, associateWithAuthData, becomeWithSessionToken, becomeWithSessionToken, becomeWithSessionTokenInBackground, becomeWithSessionTokenInBackground, cast, changeCurrentUser, checkAuthenticatedInBackground, currentUser, declineFriendshipRequest, disableAutomaticUser, dissociateWithAuthData, enableAutomaticUser, followInBackground, followeeQuery, followeeQuery, followerQuery, followerQuery, friendshipQuery, friendshipRequestQuery, getCurrentUser, getCurrentUser, getEmail, getFollowersAndFolloweesInBackground, getMobilePhoneNumber, getPassword, getQuery, getRolesInBackground, getSessionToken, getUserQuery, getUsername, internalChangeSessionToken, isAnonymous, isAuthenticated, isEnableAutomatic, isMobilePhoneVerified, logIn, logIn, logInAnonymously, logOut, loginByEmail, loginByMobilePhoneNumber, loginByMobilePhoneNumber, loginBySMSCode, loginBySMSCode, loginWithAuthData, loginWithAuthData, loginWithAuthData, queryFriendship, refreshSessionTokenInBackground, requestEmailVerifyInBackground, requestLoginSmsCodeInBackground, requestMobilePhoneVerifyInBackground, requestPasswordResetBySmsCodeInBackground, requestPasswordResetInBackground, requestSMSCodeForUpdatingPhoneNumberInBackground, resetPasswordBySmsCodeInBackground, setEmail, setMobilePhoneNumber, setPassword, setUsername, signUp, signUpInBackground, signUpOrLoginByMobilePhone, signUpOrLoginByMobilePhone, signUpOrLoginByMobilePhoneInBackground, signUpOrLoginByMobilePhoneInBackground, strictlyFind, unfollowInBackground, updateFriendship, updatePasswordInBackground, verifyMobilePhoneInBackground, verifySMSCodeForUpdatingPhoneNumberInBackground
      • Methods inherited from class cn.leancloud.LCObject

        abortOperations, add, addAll, addAllUnique, addUnique, bitAnd, bitOr, bitXor, containsKey, createWithoutData, createWithoutData, decrement, delete, deleteAll, deleteAllInBackground, deleteEventually, deleteInBackground, disableAfterHook, disableBeforeHook, equals, fetch, fetchIfNeeded, fetchIfNeededInBackground, fetchInBackground, get, getACL, getBoolean, getBytes, getClassName, getCreatedAt, getCreatedAtString, getDate, getDouble, getInt, getJSONArray, getJSONObject, getLCFile, getLCGeoPoint, getLCObject, getList, getLong, getNumber, getObjectId, getQuery, getRelation, getRequestMethod, getRequestRawEndpoint, getServerData, getString, getUpdatedAt, getUpdatedAtString, getUuid, has, hasCircleReference, hashCode, ignoreHook, increment, internalClassName, isDataAvailable, isFetchWhenSave, parseLCObject, put, refresh, refreshInBackground, registerSubclass, remove, removeAll, resetServerData, save, saveAll, saveAllInBackground, saveEventually, saveInBackground, setACL, setClassName, setFetchWhenSave, setObjectId, toJSONObject, toJSONString, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • signUp

         void signUp()

        sign up

      • signUpOrLoginByMobilePhoneInBackground

         static <T extends LCUser> Observable<T> signUpOrLoginByMobilePhoneInBackground(String mobilePhoneNumber, String smsCode, Class<T> clazz)

        signUp or Login with mobile phone and sms code.

        Parameters:
        mobilePhoneNumber - mobile phone number
        smsCode - sms code
        clazz - class name
      • logIn

         static <T extends LCUser> Observable<T> logIn(String username, String password, Class<T> clazz)

        user login

        Parameters:
        username - user name
        password - password
        clazz - class name
      • loginByEmail

         static Observable<out LCUser> loginByEmail(String email, String password)

        user login

        Parameters:
        email - email
        password - password
      • loginByMobilePhoneNumber

         static Observable<out LCUser> loginByMobilePhoneNumber(String mobile, String password)

        logIn with mobile phone and password.

        Parameters:
        mobile - mobile phone
        password - password
      • loginByMobilePhoneNumber

         static <T extends LCUser> Observable<T> loginByMobilePhoneNumber(String mobile, String password, Class<T> clazz)

        user login

        Parameters:
        mobile - mobile phone number
        password - password
        clazz - class name
      • loginBySMSCode

         static Observable<out LCUser> loginBySMSCode(String mobile, String smsCode)

        logIn with mobile phone and sms code.

        Parameters:
        mobile - mobile phone.
        smsCode - sms code.
      • loginBySMSCode

         static <T extends LCUser> Observable<T> loginBySMSCode(String mobile, String smsCode, Class<T> clazz)

        user login

        Parameters:
        mobile - mobile phone number
        smsCode - sms code
        clazz - class name
      • requestLoginSmsCodeInBackground

         static Observable<LCNull> requestLoginSmsCodeInBackground(String mobilePhone)

        request sms code for login in background

        Parameters:
        mobilePhone - mobile phone number
      • requestLoginSmsCodeInBackground

         static Observable<LCNull> requestLoginSmsCodeInBackground(String mobilePhone, String validateToken)

        request sms code for login in background, with validation token.

        Parameters:
        mobilePhone - mobile phone number
        validateToken - validation token
      • requestMobilePhoneVerifyInBackground

         static Observable<LCNull> requestMobilePhoneVerifyInBackground(String mobilePhone)

        request verification for mobile phone in background.

        Parameters:
        mobilePhone - mobile phone number
      • requestMobilePhoneVerifyInBackground

         static Observable<LCNull> requestMobilePhoneVerifyInBackground(String mobilePhone, String validateToken)

        request verification for mobile phone in background, with validation token.

        Parameters:
        mobilePhone - mobile phone number
        validateToken - validation token
      • requestSMSCodeForUpdatingPhoneNumberInBackground

         static Observable<LCNull> requestSMSCodeForUpdatingPhoneNumberInBackground(String mobilePhone, LCSMSOption option)

        request sms code for updating phone number in background.

        Parameters:
        mobilePhone - mobile phone number
        option - sms option
      • requestSMSCodeForUpdatingPhoneNumberInBackground

         static Observable<LCNull> requestSMSCodeForUpdatingPhoneNumberInBackground(LCUser asAuthenticatedUser, String mobilePhone, LCSMSOption option)

        request sms code for updating phone number in background.

        Parameters:
        mobilePhone - mobile phone number
        option - sms option
      • requestPasswordResetBySmsCodeInBackground

         static Observable<LCNull> requestPasswordResetBySmsCodeInBackground(String phoneNumber, String validateToken)

        request to reset password by sms code in background, with validation token.

        Parameters:
        phoneNumber - mobile phone number
        validateToken - validation token
      • verifySMSCodeForUpdatingPhoneNumberInBackground

         static Observable<LCNull> verifySMSCodeForUpdatingPhoneNumberInBackground(LCUser asAuthenticatedUser, String code, String mobilePhone)

        verify sms code for updating mobile phone in background.

        Parameters:
        asAuthenticatedUser - authenticated user.
        code - sms code
        mobilePhone - mobile phone number
      • verifyMobilePhoneInBackground

         static Observable<LCNull> verifyMobilePhoneInBackground(String verifyCode)

        verify mobile phone in background

        Parameters:
        verifyCode - verify code.
      • logOut

         static void logOut()

        current user log out

      • loginWithAuthData

         static Observable<TDSUser> loginWithAuthData(Map<String, Object> authData, String platform, String unionId, String unionIdPlatform, boolean asMainAccount)

        login with auth data.

        Parameters:
        authData - auth data.
        platform - platform string.
        unionId - unionid.
        unionIdPlatform - unionid platform string.
        asMainAccount - flag to treat as main account.
      • loginWithTapTap

         static void loginWithTapTap(Activity activity, Callback<TDSUser> callback, Array<String> permissions)

        login with TapTap authenticated user.

        Parameters:
        activity - current activity
        callback - callback function.
        permissions - OAuth permissions.
      • becomeWithSessionToken

         static TDSUser becomeWithSessionToken(String sessionToken)

        instantiate AVUser object with sessionToken(synchronized)

        Parameters:
        sessionToken - session token
      • becomeWithSessionToken

         static TDSUser becomeWithSessionToken(String sessionToken, boolean saveToCurrentUser)

        instantiate AVUser object with sessionToken(synchronized)

        Parameters:
        sessionToken - session token
        saveToCurrentUser - flag indicating whether change current user or not.true - save user to AVUser#currentUser.false - not save.
      • becomeWithSessionTokenInBackground

         static Observable<TDSUser> becomeWithSessionTokenInBackground(String sessionToken, boolean saveToCurrentUser)

        instantiate AVUser object with sessionToken(asynchronous)

        Parameters:
        sessionToken - session token
        saveToCurrentUser - flag indicating whether change current user or not.true - save user to AVUser#currentUser.false - not save.
      • acceptFriendshipRequest

         Observable<LCFriendshipRequest> acceptFriendshipRequest(LCFriendshipRequest request, Map<String, Object> attributes)

        accept a friendship.

        Parameters:
        request - friendship request.
        attributes - additional attributes.
      • declineFriendshipRequest

         Observable<LCFriendshipRequest> declineFriendshipRequest(LCFriendshipRequest request)

        decline a friendship.

        Parameters:
        request - friendship request.
      • deleteFriendshipRequest

         Observable<Boolean> deleteFriendshipRequest(LCFriendshipRequest request)

        delete friendship request directly.

        Parameters:
        request - friendship request.
      • friendshipRequestQuery

         LCQuery<LCFriendshipRequest> friendshipRequestQuery(int status, boolean includeTargetUser, boolean reachToCurrentUser)

        get query for AVFriendshipRequest.

        Parameters:
        status - request status.
        includeTargetUser - boolean flag, indicating that need to include target user pointer or not.
        reachToCurrentUser - boolean flag, indicating all requests are sent to current user or not.true - someone others sent requests to current user.false - current user sent requests to others.
      • friendshipQuery

         LCQuery<LCFriendship> friendshipQuery()

        get friendship query of current user.

      • unregisterFriendshipNotification

         void unregisterFriendshipNotification(LCCallback<LCNull> callback)

        unregister friendship notification.

        Parameters:
        callback - function callback.