mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Updated systems to include list.Item funcs
This commit is contained in:
parent
78da08af0b
commit
351049310f
@ -2,6 +2,7 @@ package discourse
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -63,6 +64,23 @@ func (sys *System) GetCapabilities() []adapter.Capability {
|
||||
return caps
|
||||
}
|
||||
|
||||
func (sys *System) FilterValue() string {
|
||||
return fmt.Sprintf(
|
||||
"Discourse %s",
|
||||
sys.config["url"],
|
||||
)
|
||||
}
|
||||
|
||||
func (sys *System) Title() string {
|
||||
return sys.config["url"].(string)
|
||||
}
|
||||
|
||||
func (sys *System) Description() string {
|
||||
return fmt.Sprintf(
|
||||
"Discourse",
|
||||
)
|
||||
}
|
||||
|
||||
func (sys *System) Load() error {
|
||||
url := sys.config["url"]
|
||||
if url == nil {
|
||||
|
@ -3,6 +3,7 @@ package hackernews
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -62,6 +63,22 @@ func (sys *System) GetCapabilities() []adapter.Capability {
|
||||
return caps
|
||||
}
|
||||
|
||||
func (sys *System) FilterValue() string {
|
||||
return fmt.Sprintf(
|
||||
"Hacker News https://news.ycombinator.com",
|
||||
)
|
||||
}
|
||||
|
||||
func (sys *System) Title() string {
|
||||
return "https://news.ycombinator.com"
|
||||
}
|
||||
|
||||
func (sys *System) Description() string {
|
||||
return fmt.Sprintf(
|
||||
"Hacker News",
|
||||
)
|
||||
}
|
||||
|
||||
func (sys *System) Load() error {
|
||||
sys.client = hn.NewClient()
|
||||
return nil
|
||||
|
@ -2,6 +2,7 @@ package lemmy
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@ -62,6 +63,23 @@ func (sys *System) GetCapabilities() []adapter.Capability {
|
||||
return caps
|
||||
}
|
||||
|
||||
func (sys *System) FilterValue() string {
|
||||
return fmt.Sprintf(
|
||||
"Lemmy %s",
|
||||
sys.config["url"],
|
||||
)
|
||||
}
|
||||
|
||||
func (sys *System) Title() string {
|
||||
return sys.config["url"].(string)
|
||||
}
|
||||
|
||||
func (sys *System) Description() string {
|
||||
return fmt.Sprintf(
|
||||
"Lemmy",
|
||||
)
|
||||
}
|
||||
|
||||
func (sys *System) Load() error {
|
||||
var err error
|
||||
|
||||
|
@ -20,6 +20,10 @@ type System interface {
|
||||
SetLogger(logger *zap.SugaredLogger)
|
||||
GetCapabilities() []adapter.Capability
|
||||
|
||||
FilterValue() string
|
||||
Title() string
|
||||
Description() string
|
||||
|
||||
Connect(sysURL string) error
|
||||
Load() error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user