Simple console app in Scala which fetch tweets for most popular GitHub repositories by keyword
.
Application first searches GitHub for keyword
, sort projects by stars, limit the number of retrieved project by 10
and then fetches most recent tweets for these projects.
App is built using SBT + Scala + Spring Boot.
Application can be run via either com.github.tweets.TweetsGatherer
Main Class or via the built Jar file.
-
In order to build the jar file call
sbt clean oneJar
-
in order to launch the jar call
java -jar tweets-for-github-projects-gatherer_2.11-1.0-one-jar.jar --keyword="star wars" --output=out1.json
-
keyword
argument is mandatory. App will fail without it. If noouput
argument is provided, then json will be printed in console -
there should application.properties file next to the jar with two properties e.g.
twitter.consumer.key=xvz1evFS4wEEPTGEFPHBog
twitter.consumer.secret=L8qq9PZyRg6ieKGEKhZolGC0vJWLw8iEJ88DRdyOg
otherwise program will fail. Key and Secret should be valid twitter keys. They are private so they are not provided.
- in order to launch tests call
sbt test