use of com.evernote.edam.userstore.BootstrapInfo in project Notes by lguipeng.
the class EvernoteOAuthHelper method fetchBootstrapProfiles.
public List<BootstrapProfile> fetchBootstrapProfiles() throws Exception {
//Network request
BootstrapManager.BootstrapInfoWrapper infoWrapper = new BootstrapManager(mSession.getEvernoteService(), mSession, mLocale).getBootstrapInfo();
if (infoWrapper == null) {
return null;
}
BootstrapInfo info = infoWrapper.getBootstrapInfo();
if (info == null) {
return null;
}
return info.getProfiles();
}
use of com.evernote.edam.userstore.BootstrapInfo in project Notes by lguipeng.
the class BootstrapManager method getBootstrapInfo.
/**
* Makes a web request to get the latest bootstrap information.
* This is a requirement during the oauth process
*
* @return {@link BootstrapInfoWrapper}
* @throws Exception
*/
BootstrapInfoWrapper getBootstrapInfo() throws Exception {
Log.d(LOGTAG, "getBootstrapInfo()");
BootstrapInfo bsInfo = null;
try {
if (mBootstrapServerUsed == null) {
initializeUserStoreAndCheckVersion();
}
bsInfo = mEvernoteSession.getEvernoteClientFactory().getUserStoreClient(getUserStoreUrl(mBootstrapServerUsed), null).getBootstrapInfo(mLocale.toString());
printBootstrapInfo(bsInfo);
} catch (TException e) {
Log.e(LOGTAG, "error getting bootstrap info", e);
}
return new BootstrapInfoWrapper(mBootstrapServerUsed, bsInfo);
}
Aggregations