reddit

package
v1.33.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: OSL-3.0 Imports: 5 Imported by: 0

README

Documentation

Index

Constants

View Source
const Origin = "https://api.reddit.com"

Variables

View Source
var Verbose bool

Functions

func Valid added in v1.33.2

func Valid(id string) error

redd.it/ppbsh redd.it/pql06n

Types

type Adaptation added in v1.30.2

type Adaptation struct {
	MimeType       string `xml:"mimeType,attr"`
	Representation []struct {
		BaseURL string
		Height  int `xml:"height,attr"`
	}
}
type Link struct {
	Media struct {
		Reddit_Video struct {
			DASH_URL string
		}
	}
	Subreddit string
	Title     string
	URL       string // https://v.redd.it/pjn0j2z4v6o71
}

func (Link) MPD added in v1.30.5

func (l Link) MPD() (*MPD, error)

type MPD

type MPD struct {
	Period struct {
		AdaptationSet []Adaptation
	}
}

type Post

type Post struct {
	Data struct {
		Children []struct {
			Kind string
			Data json.RawMessage
		}
	}
}

func NewPost

func NewPost(id string) (*Post, error)
func (p Post) Link() (*Link, error)

Jump to

Keyboard shortcuts

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