...

Package ext

import "github.com/mmcdole/gofeed/extensions"
Overview
Index

Overview ▾

type DublinCoreExtension

type DublinCoreExtension struct {
    Title       []string `json:"title,omitempty"`
    Creator     []string `json:"creator,omitempty"`
    Author      []string `json:"author,omitempty"`
    Subject     []string `json:"subject,omitempty"`
    Description []string `json:"description,omitempty"`
    Publisher   []string `json:"publisher,omitempty"`
    Contributor []string `json:"contributor,omitempty"`
    Date        []string `json:"date,omitempty"`
    Type        []string `json:"type,omitempty"`
    Format      []string `json:"format,omitempty"`
    Identifier  []string `json:"identifier,omitempty"`
    Source      []string `json:"source,omitempty"`
    Language    []string `json:"language,omitempty"`
    Relation    []string `json:"relation,omitempty"`
    Coverage    []string `json:"coverage,omitempty"`
    Rights      []string `json:"rights,omitempty"`
}

DublinCoreExtension represents a feed extension for the Dublin Core specification.

func NewDublinCoreExtension

func NewDublinCoreExtension(extensions map[string][]Extension) *DublinCoreExtension

NewDublinCoreExtension creates a new DublinCoreExtension given the generic extension map for the "dc" prefix.

type Extension

type Extension struct {
    Name     string                 `json:"name"`
    Value    string                 `json:"value"`
    Attrs    map[string]string      `json:"attrs"`
    Children map[string][]Extension `json:"children"`
}

Extension represents a single XML element that was in a non default namespace in a Feed or Item/Entry.

type Extensions

type Extensions map[string]map[string][]Extension

Extensions is the generic extension map for Feeds and Items. The first map is for the element namespace prefix (e.g., itunes). The second map is for the element name (e.g., author).

type ITunesCategory

type ITunesCategory struct {
    Text        string          `json:"text,omitempty"`
    Subcategory *ITunesCategory `json:"subcategory,omitempty"`
}

ITunesCategory is a category element for itunes feeds.

type ITunesFeedExtension

type ITunesFeedExtension struct {
    Author     string            `json:"author,omitempty"`
    Block      string            `json:"block,omitempty"`
    Categories []*ITunesCategory `json:"categories,omitempty"`
    Explicit   string            `json:"explicit,omitempty"`
    Keywords   string            `json:"keywords,omitempty"`
    Owner      *ITunesOwner      `json:"owner,omitempty"`
    Subtitle   string            `json:"subtitle,omitempty"`
    Summary    string            `json:"summary,omitempty"`
    Image      string            `json:"image,omitempty"`
    Complete   string            `json:"complete,omitempty"`
    NewFeedURL string            `json:"newFeedUrl,omitempty"`
}

ITunesFeedExtension is a set of extension fields for RSS feeds.

func NewITunesFeedExtension

func NewITunesFeedExtension(extensions map[string][]Extension) *ITunesFeedExtension

NewITunesFeedExtension creates an ITunesFeedExtension given an extension map for the "itunes" key.

type ITunesItemExtension

type ITunesItemExtension struct {
    Author            string `json:"author,omitempty"`
    Block             string `json:"block,omitempty"`
    Duration          string `json:"duration,omitempty"`
    Explicit          string `json:"explicit,omitempty"`
    Keywords          string `json:"keywords,omitempty"`
    Subtitle          string `json:"subtitle,omitempty"`
    Summary           string `json:"summary,omitempty"`
    Image             string `json:"image,omitempty"`
    IsClosedCaptioned string `json:"isClosedCaptioned,omitempty"`
    Order             string `json:"order,omitempty"`
}

ITunesItemExtension is a set of extension fields for RSS items.

func NewITunesItemExtension

func NewITunesItemExtension(extensions map[string][]Extension) *ITunesItemExtension

NewITunesItemExtension creates an ITunesItemExtension given an extension map for the "itunes" key.

type ITunesOwner

type ITunesOwner struct {
    Email string `json:"email,omitempty"`
    Name  string `json:"name,omitempty"`
}

ITunesOwner is the owner of a particular itunes feed.