/** * @see UserStore.Client#checkVersion(String, short, short) */ public boolean checkVersion(final String clientName, final short edamVersionMajor, final short edamVersionMinor) throws TException { return getClient().checkVersion(clientName, edamVersionMajor, edamVersionMinor); }
/** * Create a new NoteStore client. Each call to this method will return a new * NoteStore.Client instance. The returned client can be used for any number * of API calls, but is NOT thread safe. * * @throws TException * @throws EDAMSystemException * @throws EDAMUserException */ public NoteStoreClient createNoteStoreClient() throws EDAMUserException, EDAMSystemException, TException { String noteStoreUrl = this.evernoteAuth.getNoteStoreUrl(); if (noteStoreUrl == null) { noteStoreUrl = createUserStoreClient().getNoteStoreUrl(); this.evernoteAuth.setNoteStoreUrl(noteStoreUrl); } return createStoreClient(NoteStoreClient.class, noteStoreUrl, this.evernoteAuth.getToken()); }
/** * Create a new Business NoteStore client. Each call to this method will * return a new NoteStore.Client instance. The returned client can be used for * any number of API calls, but is NOT thread safe. * * This method will check expiration time for the business authorization * token, this is a network request * * This method is synchronous * * @throws TException * @throws EDAMUserException * @throws EDAMSystemException * User is not part of a business */ public BusinessNoteStoreClient createBusinessNoteStoreClient() throws TException, EDAMUserException, EDAMSystemException { NoteStoreClient mainNoteStoreClient = createNoteStoreClient(); AuthenticationResult businessAuthResult = createUserStoreClient() .authenticateToBusiness(); NoteStoreClient linkedNoteStoreClient = createStoreClient( NoteStoreClient.class, businessAuthResult.getNoteStoreUrl(), businessAuthResult.getAuthenticationToken()); return new BusinessNoteStoreClient(mainNoteStoreClient, linkedNoteStoreClient, businessAuthResult); }
@Override public boolean test(Evernote evernote) { try { evernote.userStoreClient().getUser(); return true; } catch (Exception e) { return false; } }
/** * @see UserStore.Client#getBootstrapInfo(String) */ public BootstrapInfo getBootstrapInfo(final String locale) throws TException { return getClient().getBootstrapInfo(locale); }
/** * Create a new NoteStore client. Each call to this method will return a new * NoteStore.Client instance. The returned client can be used for any number * of API calls, but is NOT thread safe. * * @throws TException * @throws EDAMSystemException * @throws EDAMUserException */ public NoteStoreClient createNoteStoreClient() throws EDAMUserException, EDAMSystemException, TException { String noteStoreUrl = this.evernoteAuth.getNoteStoreUrl(); if (noteStoreUrl == null) { noteStoreUrl = createUserStoreClient().getNoteStoreUrl(); this.evernoteAuth.setNoteStoreUrl(noteStoreUrl); } return createStoreClient(NoteStoreClient.class, noteStoreUrl, this.evernoteAuth.getToken()); }
/** * Create a new Business NoteStore client. Each call to this method will * return a new NoteStore.Client instance. The returned client can be used for * any number of API calls, but is NOT thread safe. * * This method will check expiration time for the business authorization * token, this is a network request * * This method is synchronous * * @throws TException * @throws EDAMUserException * @throws EDAMSystemException * User is not part of a business */ public BusinessNoteStoreClient createBusinessNoteStoreClient() throws TException, EDAMUserException, EDAMSystemException { NoteStoreClient mainNoteStoreClient = createNoteStoreClient(); AuthenticationResult businessAuthResult = createUserStoreClient() .authenticateToBusiness(); NoteStoreClient linkedNoteStoreClient = createStoreClient( NoteStoreClient.class, businessAuthResult.getNoteStoreUrl(), businessAuthResult.getAuthenticationToken()); return new BusinessNoteStoreClient(mainNoteStoreClient, linkedNoteStoreClient, businessAuthResult); }
/** * @see UserStore.Client#getBootstrapInfo(String) */ public BootstrapInfo getBootstrapInfo(final String locale) throws TException { return getClient().getBootstrapInfo(locale); }
/** * @see UserStore.Client#getPublicUserInfo(String) */ public PublicUserInfo getPublicUserInfo(final String username) throws EDAMNotFoundException, EDAMSystemException, EDAMUserException, TException { return getClient().getPublicUserInfo(username); }
/** * @see UserStore.Client#authenticate(String, String, String, String, boolean) */ public AuthenticationResult authenticate(final String username, final String password, final String consumerKey, final String consumerSecret, final boolean supportsTwoFactor) throws EDAMUserException, EDAMSystemException, TException { return getClient().authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor); }
/** * @see UserStore.Client#authenticateLongSession(String, String, String, * String, String, String, boolean) */ public AuthenticationResult authenticateLongSession(final String username, final String password, final String consumerKey, final String consumerSecret, final String deviceIdentifier, final String deviceDescription, final boolean supportsTwoFactor) throws EDAMUserException, EDAMSystemException, TException { return getClient().authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor); }
/** * @see UserStore.Client#getPublicUserInfo(String) */ public PublicUserInfo getPublicUserInfo(final String username) throws EDAMNotFoundException, EDAMSystemException, EDAMUserException, TException { return getClient().getPublicUserInfo(username); }
/** * @see UserStore.Client#completeTwoFactorAuthentication(String, String, * String, String) */ public void completeTwoFactorAuthentication(final String authenticationToken, final String oneTimeCode, final String deviceIdentifier, final String deviceDescription) throws EDAMUserException, EDAMSystemException, TException { getClient().completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription); }