Files
podcast-search-go/model/feed_entry.go

75 lines
1.8 KiB
Go

// Package model 提供播客和剧集的数据模型
package model
// FeedEntry 表示 Apple Podcasts RSS Feed 中的一个条目
type FeedEntry struct {
Name struct {
Label string `json:"label"`
} `json:"im:name"`
Image []struct {
Label string `json:"label"`
Attributes struct {
Height string `json:"height"`
} `json:"attributes"`
} `json:"im:image"`
Summary struct {
Label string `json:"label"`
} `json:"summary"`
Price struct {
Label string `json:"label"`
Attributes struct {
Amount string `json:"amount"`
Currency string `json:"currency"`
} `json:"attributes"`
} `json:"im:price"`
ContentType struct {
Attributes struct {
Term string `json:"term"`
Label string `json:"label"`
} `json:"attributes"`
} `json:"im:contentType"`
Rights struct {
Label string `json:"label"`
} `json:"rights"`
Title struct {
Label string `json:"label"`
} `json:"title"`
Link struct {
Attributes struct {
Rel string `json:"rel"`
Type string `json:"type"`
Href string `json:"href"`
} `json:"attributes"`
} `json:"link"`
ID struct {
Label string `json:"label"`
Attributes struct {
ID string `json:"im:id"`
} `json:"attributes"`
} `json:"id"`
Artist struct {
Label string `json:"label"`
} `json:"im:artist"`
Category struct {
Attributes struct {
ID string `json:"im:id"`
Term string `json:"term"`
Scheme string `json:"scheme"`
Label string `json:"label"`
} `json:"attributes"`
} `json:"category"`
ReleaseDate struct {
Label string `json:"label"`
Attributes struct {
Label string `json:"label"`
} `json:"attributes"`
} `json:"im:releaseDate"`
}
// FeedResponse 表示 Apple Podcasts RSS Feed 的响应
type FeedResponse struct {
Feed struct {
Entry []FeedEntry `json:"entry"`
} `json:"feed"`
}