/** * GETs the daily unique conversation counts. * * @return the daily unique conversation counts. */ public static DailyUniqueConversationCounts getDailyUniqueConversationCounts() { String pageToken = FbBotMillContext.getInstance().getPageToken(); BotMillNetworkResponse response = NetworkUtils .get(FbBotMillNetworkConstants.FACEBOOK_BASE_URL + FbBotMillNetworkConstants.FACEBOOK_MESSAGING_INSIGHT_CONVERSATION_URL + pageToken); return FbBotMillJsonUtils.fromJson(response.getResponse(), DailyUniqueConversationCounts.class); }
/** * GETs the daily unique active thread counts. * * @return the daily unique active thread counts. */ public static DailyUniqueActiveThreadCounts getDailyUniqueActiveThreadCounts() { String pageToken = FbBotMillContext.getInstance().getPageToken(); BotMillNetworkResponse response = NetworkUtils .get(FbBotMillNetworkConstants.FACEBOOK_BASE_URL + FbBotMillNetworkConstants.FACEBOOK_MESSAGING_INSIGHT_ACTIVE_THREADS_URL + pageToken); return FbBotMillJsonUtils.fromJson(response.getResponse(), DailyUniqueActiveThreadCounts.class); }
/** * Method used to retrieve a {@link FacebookUserProfile} from an ID using * the GET method. * * @param userId * the ID of the user to retrieve. * @return the user profile info. */ public static FacebookUserProfile getUserProfile(String userId) { String pageToken = FbBotMillContext.getInstance().getPageToken(); BotMillNetworkResponse response = NetworkUtils .get(FbBotMillNetworkConstants.FACEBOOK_BASE_URL + userId + FbBotMillNetworkConstants.USER_PROFILE_FIELDS + pageToken); FacebookUserProfile user = FbBotMillJsonUtils.fromJson( response.getResponse(), FacebookUserProfile.class); return user; }