Getting the feed URL from the feed ID if it isn't supplied.
This commit is contained in:
parent
a273398317
commit
3e9f208dff
|
@ -47,7 +47,7 @@ struct ReaderAPISubscription: Codable {
|
|||
let feedID: String
|
||||
let name: String?
|
||||
let categories: [ReaderAPICategory]
|
||||
let url: String
|
||||
let feedURL: String?
|
||||
let homePageURL: String?
|
||||
let iconURL: String?
|
||||
|
||||
|
@ -55,11 +55,18 @@ struct ReaderAPISubscription: Codable {
|
|||
case feedID = "id"
|
||||
case name = "title"
|
||||
case categories = "categories"
|
||||
case url = "url"
|
||||
case feedURL = "url"
|
||||
case homePageURL = "htmlUrl"
|
||||
case iconURL = "iconUrl"
|
||||
}
|
||||
|
||||
var url: String {
|
||||
if let feedURL = feedURL {
|
||||
return feedURL
|
||||
} else {
|
||||
return feedID.stripping(prefix: "feed/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ReaderAPICategory: Codable {
|
||||
|
|
Loading…
Reference in New Issue