-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPrintUtils.java
More file actions
23 lines (19 loc) · 852 Bytes
/
PrintUtils.java
File metadata and controls
23 lines (19 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package utils;
import twitter4j.QueryResult;
import twitter4j.Status;
public class PrintUtils {
public static void prettyPrint(QueryResult result) {
System.out.println("\nRESULTS FOUND: " + result.getTweets().size() );
for (Status status : result.getTweets()) {
System.out.println(
"\nUser: " + status.getUser().getName()
+ "\nScreenName: @" + status.getUser().getScreenName()
+ "\n\t ID: " + status.getId()
+ "\n\t Text: " + status.getText()
+ "\n\t Created At: " + status.getCreatedAt()
+ "\n\t Favorite Count: " + status.getFavoriteCount()
+ "\n\t Retweet Count: " + status.getRetweetCount()
);
}
}
}