rsshub

package
v0.0.0-...-67a1707 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DisableCache    bool // 默认开启缓存
	CacheExpiration int  // 缓存时间
}

type Feed

type Feed struct {
	Title string  `json:"title"`
	Items []*Item `json:"items"`
}

func (*Feed) Copy

func (feed *Feed) Copy(from cache.Serializer) error

func (*Feed) Deserialize

func (feed *Feed) Deserialize(data string) error

func (*Feed) IsOverrideMode

func (feed *Feed) IsOverrideMode() bool

IsOverrideMode 如果 RSS 都没有发布时间,则为全量覆盖模式

func (*Feed) Serialize

func (feed *Feed) Serialize() (string, error)

type Item

type Item struct {
	GUID         string   `json:"guid"`
	Title        string   `json:"title"`
	Description  string   `json:"description"`
	Link         string   `json:"link"`
	Authors      []string `json:"authors"`
	PubDate      int64    `json:"pub_date"`
	CategoryList []string `json:"category_list"`
}

func (*Item) SetValueWith

func (item *Item) SetValueWith(v *gofeed.Item)

type RSSHubService

type RSSHubService interface {
	Fetch(subscribeURL string, opts ...WithOptions) (*Feed, error)
}

func NewService

func NewService() RSSHubService

type WithOptions

type WithOptions func(*Config)

func CacheExpiration

func CacheExpiration(expiration int) WithOptions

func DisableCache

func DisableCache(disable bool) WithOptions

Jump to

Keyboard shortcuts

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