Sha256: af28c411384e8bd5bf8df7d91191c635e37e32a8ea15caabbaecb03b317e3c5a

Contents?: true

Size: 539 Bytes

Versions: 14

Compression:

Stored size: 539 Bytes

Contents

module Chatterbot

  # routines for favorites
  module Favorite

    # simple wrapper for favoriting 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 favorite(id=@current_tweet)
      return if require_login == false

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

Version data entries

14 entries across 14 versions & 1 rubygems

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