Added content to item
This commit is contained in:
parent
d1f684d63b
commit
9d8cc64645
45
rss.go
45
rss.go
@ -3,7 +3,6 @@ package rss
|
|||||||
import (
|
import (
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Image struct {
|
type Image struct {
|
||||||
@ -26,8 +25,8 @@ type TextInput struct {
|
|||||||
type Enclosure struct {
|
type Enclosure struct {
|
||||||
XMLName xml.Name `xml:"enclosure"`
|
XMLName xml.Name `xml:"enclosure"`
|
||||||
Url string `xml:"url,attr"`
|
Url string `xml:"url,attr"`
|
||||||
Lenght int `xml:"lenght,attr"`
|
|
||||||
Type string `xml:"type,attr"`
|
Type string `xml:"type,attr"`
|
||||||
|
Lenght int `xml:"lenght,attr"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Source struct {
|
type Source struct {
|
||||||
@ -36,42 +35,48 @@ type Source struct {
|
|||||||
Value string
|
Value string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Content struct {
|
||||||
|
XMLName xml.Name `xml:"content:encoded"`
|
||||||
|
Value string `xml:",cdata"`
|
||||||
|
}
|
||||||
|
|
||||||
type Item struct {
|
type Item struct {
|
||||||
XMLName xml.Name `xml:"item"`
|
XMLName xml.Name `xml:"item"`
|
||||||
Title string `xml:"title,omitempty"`
|
Title string `xml:"title,omitempty"`
|
||||||
Link string `xml:"link,omitempty"`
|
Link string `xml:"link,omitempty"`
|
||||||
Description string `xml:"description,omitempty"`
|
Description string `xml:"description,omitempty"`
|
||||||
Author string `xml:"author,omitempty"`
|
Author string `xml:"author,omitempty"`
|
||||||
Categories []string `xml:"category,omitempty"`
|
|
||||||
Comments string `xml:"comments,omitempty"`
|
Comments string `xml:"comments,omitempty"`
|
||||||
Enclosure *Enclosure
|
Enclosure *Enclosure
|
||||||
Guid string `xml:"guid,omitempty"`
|
Guid string `xml:"guid,omitempty"`
|
||||||
PubDate time.Time `xml:"pubDate,omitempty"`
|
PubDate string `xml:"pubDate,omitempty"`
|
||||||
Source *Source
|
Source *Source
|
||||||
|
Content *Content
|
||||||
|
Categories []string `xml:"category,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Channel struct {
|
type Channel struct {
|
||||||
XMLName xml.Name `xml:"channel"`
|
XMLName xml.Name `xml:"channel"`
|
||||||
Title string `xml:"title"`
|
Title string `xml:"title"`
|
||||||
Link string `xml:"link"`
|
Link string `xml:"link"`
|
||||||
Description string `xml:"description"`
|
Description string `xml:"description"`
|
||||||
Language string `xml:"language,omitempty"`
|
Language string `xml:"language,omitempty"`
|
||||||
Copyright string `xml:"copyright,omitempty"`
|
Copyright string `xml:"copyright,omitempty"`
|
||||||
ManagingEditor string `xml:"managingEditor,omitempty"`
|
ManagingEditor string `xml:"managingEditor,omitempty"`
|
||||||
WebMaster string `xml:"webMaster,omitempty"`
|
WebMaster string `xml:"webMaster,omitempty"`
|
||||||
PubDate time.Time `xml:"pubDate,omitempty"`
|
PubDate string `xml:"pubDate,omitempty"`
|
||||||
LastBuildDate time.Time `xml:"lastBuildDate,omitempty"`
|
LastBuildDate string `xml:"lastBuildDate,omitempty"`
|
||||||
Categories []string `xml:"category,omitempty"`
|
Categories []string `xml:"category,omitempty"`
|
||||||
Generator string `xml:"generator,omitempty"`
|
Generator string `xml:"generator,omitempty"`
|
||||||
Docs string `xml:"docs,omitempty"`
|
Docs string `xml:"docs,omitempty"`
|
||||||
Cloud string `xml:"cloud,omitempty"`
|
Cloud string `xml:"cloud,omitempty"`
|
||||||
Ttl int `xml:"ttl,omitempty"`
|
|
||||||
Image *Image
|
Image *Image
|
||||||
Rating string `xml:"rating,omitempty"`
|
Rating string `xml:"rating,omitempty"`
|
||||||
TextInput *TextInput
|
TextInput *TextInput
|
||||||
SkipHours []int `xml:"skipHours,omitempty"`
|
SkipHours []int `xml:"skipHours,omitempty"`
|
||||||
SkipDays []int `xml:"skipDays,omitempty"`
|
SkipDays []int `xml:"skipDays,omitempty"`
|
||||||
Items []*Item
|
Items []*Item
|
||||||
|
Ttl int `xml:"ttl,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Feed struct {
|
type Feed struct {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user