README.rdoc in streambot-0.3.0 vs README.rdoc in streambot-0.4.0
- old
+ new
@@ -10,17 +10,44 @@
gem install streambot
== Usage
require 'streambot'
-
- @auth = {:username=>'username',:password=>'password'}
+
+ @params = {"auth_type" => "oauth",
+ "oauth" => {"key" => "consumer key", "secret" => "consumer secret"},
+ "http" => {"username" => "username", "password" => "password"}
+ }
@blacklist = ['mac_rt','apple_rt']
- bot = StreamBot::Tracker.new(@auth, @blacklist, 'apple','ipad','iphone os 4','steve jobs')
+ bot = StreamBot::Tracker.new(@params, @blacklist, 'apple','ipad','iphone os 4','steve jobs')
bot.start
-
+=== Configuration
+
+Twitter is shutting down http basic authentication with June 30th 2010. But only for the REST API. The Streaming API which the tracker is using still works with http basic authentication only.
+
+So we still need the http basic authentication credentials for tracking the keywords after June 30th, but only for tracking and not for retweeting. So I introduced a new way of configuration, the params attribute that you need to pass into Tracker. Actually I don't know what happens when twitter is shutting down the http basic authentication.
+
+==== auth_type
+The auth type is the authentication mechanism you want to use for retweeting.
+*oauth* or *http*
+
+==== oauth
+*Warning!* You need to register an application of the type desktop application on http://dev.twitter.com first!
+
+*key*:: The consumer key Twitter provides you
+*secret*:: The consumer secret Twitter provides you
+
+==== http
+*username*:: Your login username
+*password*:: Your login password
+
+I wrote this stuff into my config.yml and load the params with
+
+ require 'yaml'
+ @params = YAML.load_file('config.yml')
+
== Contribution
=== Testing
All Tests should inherit from StreamBot::BaseTest
@@ -40,6 +67,6 @@
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
== Copyright
-Copyright (c) 2010 Sascha Wessel. See LICENSE for details.
\ No newline at end of file
+Copyright (c) 2010 Sascha Wessel. See LICENSE for details.