}
}
public List<JSONObject> getProfiles() throws IOException {
Analytics analytics = initializeAnalytics();
Accounts accounts = analytics.management().accounts().list().execute();
List<JSONObject> jsonProfiles = Lists.newArrayList();
if (accounts.getItems().isEmpty()) {
System.err.println("No accounts found");
}
else {
for (Account account : accounts.getItems()) {
String accountId = account.getId();
// Query webproperties collection.
Webproperties webproperties = analytics.management().webproperties().list(accountId).execute();