reddit

package
v1.34.2 Latest Latest
Warning

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

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

README

Reddit

fffrnw
<Representation bandwidth="2435033" codecs="avc1.4d401f" frameRate="30"
height="720" id="VIDEO-2" mimeType="video/mp4" startWithSAP="1" width="404">

pqoz44
<AdaptationSet contentType="audio" group="1" mimeType="audio/mp4"
segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true"
subsegmentStartsWithSAP="1">

https://www.reddit.com/dev/api

Documentation

Index

Constants

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

Variables

View Source
var Verbose = mech.Verbose

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"`
		MimeType string `xml:"mimeType,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