fetcher

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package fetcher provides functionality to fetch articles from Medium

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Items []Item `xml:"item"`
}

Channel represents the channel element in RSS feed

type Item

type Item struct {
	Title       string `xml:"title"`
	Link        string `xml:"link"`
	PubDate     string `xml:"pubDate"`
	Description string `xml:"description"`
	Content     string `xml:"encoded"`
}

Item represents a single article in the RSS feed

type MediumFetcher

type MediumFetcher struct {
	// contains filtered or unexported fields
}

MediumFetcher handles fetching articles from Medium

func NewMediumFetcher

func NewMediumFetcher(source string, isDomain bool) *MediumFetcher

NewMediumFetcher creates a new MediumFetcher instance

func (*MediumFetcher) FetchArticles

func (m *MediumFetcher) FetchArticles() ([]models.Article, error)

FetchArticles retrieves all articles for the configured source

type RSSFeed

type RSSFeed struct {
	XMLName xml.Name `xml:"rss"`
	Channel Channel  `xml:"channel"`
}

RSSFeed represents the structure of Medium's RSS feed

Jump to

Keyboard shortcuts

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