This repository was archived by the owner on Nov 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 5151 <relativePath >../pom.xml</relativePath >
5252 </parent >
5353
54- <packaging >pom </packaging >
54+ <packaging >jar </packaging >
5555 <url >http://maven.apache.org</url >
5656 <artifactId >jsondemos-twitter</artifactId >
5757
7979 <target >1.7</target >
8080 </configuration >
8181 </plugin >
82- <!-- mvn exec:java
8382 <plugin >
8483 <groupId >org.codehaus.mojo</groupId >
8584 <artifactId >exec-maven-plugin</artifactId >
9291 </execution >
9392 </executions >
9493 <configuration >
95- <mainClass>org.glassfish.jsondemos.twitter.TwitterStreamSearch </mainClass>
94+ <mainClass >org.glassfish.jsondemos.twitter.TwitterObjectSearch </mainClass >
9695 </configuration >
9796 </plugin >
98- -->
9997 </plugins >
10098 </build >
10199</project >
Original file line number Diff line number Diff line change @@ -85,11 +85,17 @@ public static void main(String... args) throws Exception {
8585 System .out .println (result .get ("text" ));
8686 System .out .println ("-----------" );
8787 }
88+
89+ // All the tweets are collected into Stream<String> and printed
90+ // obj.getJsonArray("statuses").getValuesAs(JsonObject.class)
91+ // .stream()
92+ // .map(v -> v.getString("text"))
93+ // .forEach(s -> { System.out.println(s); } );
8894 }
8995 }
9096
9197 static InputStream getSearchStream () throws Exception {
92- final String searchStr = "#telugu " ;
98+ final String searchStr = "#javaone " ;
9399 String searchUrl = "https://api.twitter.com/1.1/search/tweets.json" ;
94100
95101 Properties config = new Properties ();
You can’t perform that action at this time.
0 commit comments