reddit

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct {
	Client http.Client
	Logger zerolog.Logger
}

Loader for Reddit API. Note that http.Client must provide a ~unique UserAgent as that's what reddit segments requests by.

func (*Loader) Discover

func (loader *Loader) Discover(ctx context.Context, link string) ([]iface.Result, error)

Discover returns more tangential links by crawling submissions and comments.

func (*Loader) ID

func (loader *Loader) ID() string

func (*Loader) Search

func (loader *Loader) Search(ctx context.Context, link string) ([]redditListing, error)

Jump to

Keyboard shortcuts

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