redditJSON

package
v0.0.0-...-0f9930f Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Poller

type Poller struct {
	// contains filtered or unexported fields
}

func NewPoller

func NewPoller(c ctx.Ctx, client *reddit.SpoofClient, subreddit string, interval time.Duration) *Poller

func (*Poller) Start

func (r *Poller) Start(c chan []*RedditPost)

func (*Poller) Stop

func (r *Poller) Stop()

type PollerInterface

type PollerInterface interface {
	Start(c chan []*RedditPost)
	Stop()
}

type RedditPost

type RedditPost struct {
	Author      string  `json:"author"`
	ID          string  `json:"id"`
	Permalink   string  `json:"permalink"`
	Selftext    string  `json:"selftext"`
	Subreddit   string  `json:"subreddit"`
	Thumbnail   string  `json:"thumbnail"`
	Title       string  `json:"title"`
	URL         string  `json:"URL"`
	Score       int     `json:"score"`
	NumComments int     `json:"num_comments"`
	CreatedUTC  float64 `json:"created_utc"`
}

Jump to

Keyboard shortcuts

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