Sha256: 9b4e43025cfd79cf09c22df94749ba5225ff77b4d9159afb9203728dafef0510

Contents?: true

Size: 550 Bytes

Versions: 12

Compression:

Stored size: 550 Bytes

Contents

module Chatterbot

  # routines for retweet
  module Retweet 

    # simple wrapper for retweeting a message
    # @param [id] id A tweet or the ID of a tweet. if not specified,
    # tries to use the current tweet if available
    def retweet(id=@current_tweet)
      return if require_login == false || id.nil?

      id = id_from_tweet(id)
      #:nocov:
      if debug_mode?
        debug "I'm in debug mode, otherwise I would retweet with tweet id: #{id}"
        return
      end
      #:nocov:
      
      client.retweet id
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chatterbot-2.2.0 lib/chatterbot/retweet.rb
chatterbot-2.1.0 lib/chatterbot/retweet.rb
chatterbot-2.0.5 lib/chatterbot/retweet.rb
chatterbot-2.0.4 lib/chatterbot/retweet.rb
chatterbot-2.0.3 lib/chatterbot/retweet.rb
chatterbot-2.0.2 lib/chatterbot/retweet.rb
chatterbot-2.0.0.pre lib/chatterbot/retweet.rb
chatterbot-1.0.0 lib/chatterbot/retweet.rb
chatterbot-0.9.3 lib/chatterbot/retweet.rb
chatterbot-0.9.2 lib/chatterbot/retweet.rb
chatterbot-0.9.1 lib/chatterbot/retweet.rb
chatterbot-0.9.0 lib/chatterbot/retweet.rb