[icinga-checkins] icinga.org: dashing-icinga2/master: Drop twitter job

git at icinga.org git at icinga.org
Sun Jun 26 17:14:22 CEST 2016


Module: dashing-icinga2
Branch: master
Commit: 80206d3ad2ea814ee939297298cb6d1b4fb541cc
URL:    https://git.icinga.org/?p=dashing-icinga2.git;a=commit;h=80206d3ad2ea814ee939297298cb6d1b4fb541cc

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Sun Jun 26 17:11:08 2016 +0200

Drop twitter job

---

 jobs/twitter.rb |   28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/jobs/twitter.rb b/jobs/twitter.rb
deleted file mode 100644
index 7b2bd6f..0000000
--- a/jobs/twitter.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-require 'twitter'
-
-
-#### Get your twitter keys & secrets:
-#### https://dev.twitter.com/docs/auth/tokens-devtwittercom
-twitter = Twitter::REST::Client.new do |config|
-  config.consumer_key = 'YOUR_CONSUMER_KEY'
-  config.consumer_secret = 'YOUR_CONSUMER_SECRET'
-  config.access_token = 'YOUR_OAUTH_TOKEN'
-  config.access_token_secret = 'YOUR_OAUTH_SECRET'
-end
-
-search_term = URI::encode('#todayilearned')
-
-SCHEDULER.every '10m', :first_in => 0 do |job|
-  begin
-    tweets = twitter.search("#{search_term}")
-
-    if tweets
-      tweets = tweets.map do |tweet|
-        { name: tweet.user.name, body: tweet.text, avatar: tweet.user.profile_image_url_https }
-      end
-      send_event('twitter_mentions', comments: tweets)
-    end
-  rescue Twitter::Error
-    puts "\e[33mFor the twitter widget to work, you need to put in your twitter API keys in the jobs/twitter.rb file.\e[0m"
-  end
-end
\ No newline at end of file



More information about the icinga-checkins mailing list