1
0
mirror of https://github.com/stonega/tsacdop synced 2024-12-08 06:31:51 +01:00
tsacdop-podcast-app-android/lib/webfeed/domain/atom_source.dart
2020-02-09 20:29:09 +08:00

22 lines
537 B
Dart

import 'package:webfeed/util/helpers.dart';
import 'package:xml/xml.dart';
class AtomSource {
final String id;
final String title;
final String updated;
AtomSource(this.id, this.title, this.updated);
factory AtomSource.parse(XmlElement element) {
if (element == null) {
return null;
}
var id = findElementOrNull(element, "id")?.text;
var title = findElementOrNull(element, "title")?.text;
var updated = findElementOrNull(element, "updated")?.text;
return AtomSource(id, title, updated);
}
}