Documentation ¶
Index ¶
- Constants
- func Run()
- type App
- type Author
- type Config
- type Database
- func (db *Database) ContainsTweet(channel string, tweet *ts.Tweet) (bool, error)
- func (db *Database) GetNewestTweet(channel string) (*Tweet, error)
- func (db *Database) GetTweets(channel string) ([]*Tweet, error)
- func (db *Database) InsertTweet(channel string, tweet *ts.Tweet) error
- func (db *Database) PruneOldestTweets(channel string) error
- type Embed
- func (e *Embed) AddField(Name, Value string, Inline bool) *Embed
- func (e *Embed) SetAuthor(Name, URL, IconURL string) *Embed
- func (e *Embed) SetColor(color string) (*Embed, error)
- func (e *Embed) SetFooter(Text, IconURL string) *Embed
- func (e *Embed) SetImage(URL string) *Embed
- func (e *Embed) SetText(Description string) *Embed
- func (e *Embed) SetThumbnail(URL string) *Embed
- func (e *Embed) SetTimestamp(timestamp time.Time) *Embed
- func (e *Embed) SetTitle(Title string) *Embed
- func (e *Embed) SetVideo(URL string) *Embed
- type Field
- type Footer
- type Image
- type Mention
- type Tweet
- type Video
- type Webhook
Constants ¶
View Source
const ( SqliteSchema = `` /* 216-byte string literal not displayed */ KeepTweets int = 10 // How many tweets to keep in database before pruning )
View Source
const ( ScrapeInterval int = 3 // How often to check for new tweets (in minutes) ScrapeDelay int64 = 0 // How long to wait between api requests (in seconds) ScrapeStep int = 10 // How many tweets to get at a time )
View Source
const ( BaseURL = "https://twitter.com/" BaseIcon = "https://abs.twimg.com/icons/apple-touch-icon-192x192.png" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Username string Password string ProxyAddr string Channels []string Filter []uint8 Webhook string DbPath string CookiePath string }
func ConfigFromFile ¶
type Database ¶
func (*Database) ContainsTweet ¶
func (*Database) GetNewestTweet ¶
func (*Database) InsertTweet ¶
func (*Database) PruneOldestTweets ¶
type Embed ¶
type Embed struct { Author Author `json:"author,omitempty"` Title string `json:"title,omitempty"` URL string `json:"url,omitempty"` Description string `json:"description,omitempty"` Timestamp string `json:"timestamp,omitempty"` Color int64 `json:"color,omitempty"` Fields []Field `json:"fields,omitempty"` Thumbnail Image `json:"thumbnail,omitempty"` Image Image `json:"image,omitempty"` Video Video `json:"video,omitempty"` }
func (*Embed) SetThumbnail ¶
type Tweet ¶
Click to show internal directories.
Click to hide internal directories.