subreddit

package
v0.0.0-...-9c5270f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Score     int    `json:"ups"`
	Title     string `json:"title"`
	ItemURL   string `json:"url"`
	Permalink string `json:"permalink"`
}
func GetLinks(subreddit string, sortMode string, topTimePeriod string) ([]Link, error)

type RedditDocument

type RedditDocument struct {
	Data Subreddit `json:"data"`
}

type RedditLinkDocument

type RedditLinkDocument struct {
	Data Link `json:"data"`
}

type Settings

type Settings struct {
	*cfg.Common
	// contains filtered or unexported fields
}

Settings contains the settings for the subreddit view

func NewSettingsFromYAML

func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings

NewSettingsFromYAML creates the settings for this module from a yaml file

type Subreddit

type Subreddit struct {
	Children []RedditLinkDocument `json:"Children"`
}

type Widget

type Widget struct {
	view.ScrollableWidget
	// contains filtered or unexported fields
}

func NewWidget

func NewWidget(tviewApp *tview.Application, redrawChan chan bool, pages *tview.Pages, settings *Settings) *Widget

func (*Widget) Refresh

func (widget *Widget) Refresh()

func (*Widget) Render

func (widget *Widget) Render()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL