|
|
@@ -16,12 +16,13 @@ import (
|
|
|
)
|
|
|
|
|
|
type jsonFeed struct {
|
|
|
- Version string `json:"version"`
|
|
|
- Title string `json:"title"`
|
|
|
- SiteURL string `json:"home_page_url"`
|
|
|
- FeedURL string `json:"feed_url"`
|
|
|
- Author jsonAuthor `json:"author"`
|
|
|
- Items []jsonItem `json:"items"`
|
|
|
+ Version string `json:"version"`
|
|
|
+ Title string `json:"title"`
|
|
|
+ SiteURL string `json:"home_page_url"`
|
|
|
+ FeedURL string `json:"feed_url"`
|
|
|
+ Authors []jsonAuthor `json:"authors"`
|
|
|
+ Author jsonAuthor `json:"author"`
|
|
|
+ Items []jsonItem `json:"items"`
|
|
|
}
|
|
|
|
|
|
type jsonAuthor struct {
|
|
|
@@ -38,6 +39,7 @@ type jsonItem struct {
|
|
|
HTML string `json:"content_html"`
|
|
|
DatePublished string `json:"date_published"`
|
|
|
DateModified string `json:"date_modified"`
|
|
|
+ Authors []jsonAuthor `json:"authors"`
|
|
|
Author jsonAuthor `json:"author"`
|
|
|
Attachments []jsonAttachment `json:"attachments"`
|
|
|
}
|
|
|
@@ -51,6 +53,9 @@ type jsonAttachment struct {
|
|
|
}
|
|
|
|
|
|
func (j *jsonFeed) GetAuthor() string {
|
|
|
+ if len(j.Authors) > 0 {
|
|
|
+ return (getAuthor(j.Authors[0]))
|
|
|
+ }
|
|
|
return getAuthor(j.Author)
|
|
|
}
|
|
|
|
|
|
@@ -108,6 +113,9 @@ func (j *jsonItem) GetDate() time.Time {
|
|
|
}
|
|
|
|
|
|
func (j *jsonItem) GetAuthor() string {
|
|
|
+ if len(j.Authors) > 0 {
|
|
|
+ return getAuthor(j.Authors[0])
|
|
|
+ }
|
|
|
return getAuthor(j.Author)
|
|
|
}
|
|
|
|