public void obtainsCurrentTrends() throws Exception {
System.out.println("***************************************************************************");
System.out.println("Returns the current top 10 trending topics on Twitter.");
// Returns the current top 10 trending topics on Twitter.
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
Trends trends = TWITTER_CLIENT.getCurrentTrends();
System.out.printf("==> Day %s <===\n", dateFormat.format(trends.getTrendAt()));
if (trends.getTrends() != null) {
for (Trend trend : trends.getTrends()) {
System.out.printf("Name:[%s] - Query:[%s] - Url:[%s]\n", trend.getName(), trend.getQuery(), trend.getUrl());
}
}
}