A minimalistic Apache Camel application that streams live Twitter photos.
471
A minimalistic Apache Camel application (one Java class with 150 lines) that streams live Twitter photos.

Read more about the app on my blog
The application is compiled and available at Docker Hub. Run the image using your own Twitter keys and preferred search term. For example:
docker run
-e "consumerKey=83VYApZjhdkKJHDa3qq2dq"
-e "consumerSecret=M00Lzd5XsHnvnRpips0LSKJDLSKJDLSKJDSApy1GFB9JjNhu"
-e "accessToken=19341814-3592zsZ1LKAJDLSAKDJVB8Z2FvNweYA0nfHACO"
-e "accessTokenSecret=ZBk0yIqjaBbWLAKSjdlskjdkLAKohve9wvgZj2XysiTo"
-e "searchTerm=euro2016,sport"
--rm -p 8080:8080 bibryam/camelympics:latest
Then go to http://DOCKER_HOST:8080
To have a larger number of previews images (which is 4x4 by default) for example 50x7 use following URL params: http://DOCKER_HOST:8080?rows=50&cols=7
Clone the project and update app.properties as described below.
Then compile and run the app with the following command: mvn clean compile exec:java
Then go to http://localhost:8080
To have a larger number of previews images (which is 4x4 by default) for example 50x7 use following URL params: http://localhost:8080?rows=50&cols=7
If you have an OpenShift Online account, use the following commands:
oc new-project camelympics
oc login https://OPENSHIFT_HOST --token=YOUR_TOKEN
oc new-app bibryam/camelympics:latest \
-e consumerKey="KEY" \
-e consumerSecret="SECRET" \
-e accessToken="TOKEN" \
-e accessTokenSecret="TOKEN_SECRET" \
-e searchTerm="your search term, for example: euro2016"
oc expose svc camelympics
To generate Twitter keys go to here. Then update app.properties and compile the application, or simply pass the keys as environment variables. Notice that the docker container on docker hub always expects environment variables and overrides the app.properties.
The application can run on any platform that supports docker containers, such as Digital Ocean or Google Compute Engine.
The Camel application has a filter to discard possibly sensitive and NSFW content, but it is not always working as expected with a real time photo stream. Use this at your own risk!!!
Camelympics is licensed under The MIT License.
100% Free. Camelympics is free to use but attribution is required. This means you must leave footer links and the license info intact. That's all.
Content type
Image
Digest
Size
305.8 MB
Last updated
over 10 years ago
docker pull bibryam/camelympics