1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Implement initial twitterstats module

* Create module skeleton based off of the existing twitter module
  * Strip out unused pieces and try to make it as minimal as possible
 * Implement settings parsing, converting the untyped `screenNames` slice into an slice of strings
 * Implement initial minimal display, showing a table with all usernames and their follower count + # of tweets (using dummy metrics for now)
This commit is contained in:
Casey Primozic
2019-10-22 11:58:20 -07:00
committed by Casey Primozic
parent d7b0669796
commit 4c9990bafd
4 changed files with 149 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ import (
"github.com/wtfutil/wtf/modules/travisci"
"github.com/wtfutil/wtf/modules/trello"
"github.com/wtfutil/wtf/modules/twitter"
"github.com/wtfutil/wtf/modules/twitterstats"
"github.com/wtfutil/wtf/modules/unknown"
"github.com/wtfutil/wtf/modules/victorops"
"github.com/wtfutil/wtf/modules/weatherservices/arpansagovau"
@@ -239,6 +240,9 @@ func MakeWidget(
case "twitter":
settings := twitter.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = twitter.NewWidget(app, pages, settings)
case "twitterstats":
settings := twitterstats.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = twitterstats.NewWidget(app, pages, settings)
case "victorops":
settings := victorops.NewSettingsFromYAML(moduleName, moduleConfig, config)
widget = victorops.NewWidget(app, settings)