parser

package module
v0.0.0-...-49e4fde Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: MIT Imports: 5 Imported by: 0

README

WikiNewsFeed Parser

Go Reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Html          string        `json:"html"`
	HtmlOriginal  string        `json:"html_original"`
	Text          string        `json:"text"`
	TextOriginal  string        `json:"text_original"`
	Category      string        `json:"category"`
	Topics        []EventPage   `json:"topics"`
	PrimaryTopic  EventPage     `json:"primary_topic"`
	Sources       []EventSource `json:"sources"`
	PrimarySource EventSource   `json:"primary_source"`
	References    []EventPage   `json:"references"`
	Date          time.Time     `json:"date"`
	DateOriginal  string        `json:"date_original"`
}

func Parse

func Parse(content io.Reader) ([]Event, error)

type EventPage

type EventPage struct {
	Title       string `json:"title"`
	Uri         string `json:"uri"`
	ExternalUrl string `json:"external_url"`
}

func GetPrimaryTopic

func GetPrimaryTopic(topics []EventPage) EventPage

type EventSource

type EventSource struct {
	Title  string `json:"title"`
	Url    string `json:"url"`
	Domain string `json:"domain"`
}

func GetPrimarySource

func GetPrimarySource(sources []EventSource) EventSource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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