NetNewsWire/Modules/Parser/Sources/OPMLParser/OPMLFeedSpecifier.swift

42 lines
718 B
Swift
Raw Normal View History

//
// OPMLFeedSpecifier.swift
//
//
// Created by Brent Simmons on 8/18/24.
//
import Foundation
2024-08-27 07:39:46 +02:00
import SAX
public struct OPMLFeedSpecifier: Sendable {
let title: String?
let feedDescription: String?
let homePageURL: String?
let feedURL: String
init(title: String?, feedDescription: String?, homePageURL: String?, feedURL: String) {
if String.isEmptyOrNil(title) {
self.title = nil
} else {
self.title = title
}
if String.isEmptyOrNil(feedDescription) {
self.feedDescription = nil
} else {
self.feedDescription = feedDescription
}
if String.isEmptyOrNil(homePageURL) {
self.homePageURL = nil
} else {
self.homePageURL = homePageURL
}
self.feedURL = feedURL
}
}