feed

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	Name        string
	Url         string
	Items       []*Item
	UnreadCount int
}

func NewFeed

func NewFeed(name string) *Feed

func NewFeedFrom

func NewFeedFrom(parsedFeed *gofeed.Feed, url string) *Feed

func (*Feed) CountUnread

func (f *Feed) CountUnread()

func (*Feed) GetItemsOrderedByDate

func (f *Feed) GetItemsOrderedByDate() []*Item

func (*Feed) HasItem

func (f *Feed) HasItem(title string) bool

func (*Feed) WithUrl

func (f *Feed) WithUrl(url string) *Feed

type Item

type Item struct {
	Title   string
	Url     string
	PubDate time.Time
	Unread  bool
}

func NewItem

func NewItem(title, url string, pubDate time.Time) *Item

func NewItemFrom

func NewItemFrom(parsedItem *gofeed.Item) *Item

type Parser

type Parser struct {
	*gofeed.Parser
	// contains filtered or unexported fields
}

func NewParser

func NewParser() *Parser

func (*Parser) Parse

func (p *Parser) Parse(url string) (*Feed, error)

Jump to

Keyboard shortcuts

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