Class: Elephrame::Bots::Watcher

Inherits:
BaseBot
  • Object
show all
Includes:
Reply, Streaming, TimelineWatcher
Defined in:
lib/elephrame/streaming/bots.rb

Overview

A bot that watches timelines or lists

Constant Summary

Constants inherited from BaseBot

BaseBot::FNGabLink, BaseBot::NoBotRegex

Instance Attribute Summary

Attributes included from TimelineWatcher

#endpoint

Attributes included from Reply

#on_reply

Attributes included from Streaming

#streamer

Attributes inherited from BaseBot

#client, #failed, #max_retries, #strip_html, #username

Instance Method Summary collapse

Methods included from TimelineWatcher

#run_watcher, #setup_watcher

Methods included from Reply

#reply, #reply_with_mentions, #run_reply

Methods included from Streaming

#setup_streaming

Methods inherited from BaseBot

backup_method, #fetch_account_id, #fetch_list_id, #find_ancestor, #no_bot?, #post

Constructor Details

#initialize(tl, name = nil) ⇒ Elephrame::Bots::Watcher

Creates a new Watcher bot

Parameters:

  • tl (String)

    the timeline you want to watch. accepted values are: ‘public’, ‘home’, ‘list’, ‘local’, ‘hashtag’/‘tag’, ‘local hashtag’

  • name (String) (defaults to: nil)

    the name of the list or hashtag to watch



87
88
89
90
91
92
# File 'lib/elephrame/streaming/bots.rb', line 87

def initialize tl, name = nil
  super()

  setup_streaming
  setup_watcher tl, name
end