Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

documented on_interval

  • Loading branch information...
commit 19dd9f1ec43be4531858b9d3c34722abfc1e0a99 1 parent e53cf52
@stve stve authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 lib/tweetstream/client.rb
View
14 lib/tweetstream/client.rb
@@ -182,7 +182,7 @@ def on_error(&block)
# Set a Proc to be run when a direct message is encountered in the
# processing of the stream.
#
- # @client = TweetStream::Client.new('user','pass')
+ # @client = TweetStream::Client.new
# @client.on_direct_message do |direct_message|
# # do something with the direct message
# end
@@ -203,7 +203,7 @@ def on_direct_message(&block)
# Set a Proc to be run whenever anything is encountered in the
# processing of the stream.
#
- # @client = TweetStream::Client.new('user','pass')
+ # @client = TweetStream::Client.new
# @client.on_anything do |status|
# # do something with the status
# end
@@ -224,7 +224,7 @@ def on_anything(&block)
# Set a Proc to be run when a regular timeline message is encountered in the
# processing of the stream.
#
- # @client = TweetStream::Client.new('user','pass')
+ # @client = TweetStream::Client.new
# @client.on_timeline_message do |status|
# # do something with the status
# end
@@ -259,6 +259,14 @@ def on_inited(&block)
end
end
+ # Set a Proc to be run on a regular interval
+ # independent of timeline status updates
+ #
+ # @client = TweetStream::Client.new
+ # @client.on_interval(20) do
+ # # do something every 20 seconds
+ # end
+ #
def on_interval(time_interval=nil, &block)
if block_given?
@on_interval_time = time_interval
Please sign in to comment.
Something went wrong with that request. Please try again.