getCollection method
Implementation
Future<Collection> getCollection({
required String userName,
bool own = false,
bool wishlist = false,
}) async {
try {
final xmlString = await _api.fetchCollection(
userName: userName,
own: own,
wishlist: wishlist,
);
final document = XmlDocument.parse(xmlString);
return Collection.fromXml(document.rootElement);
} on BggException {
rethrow;
} catch (e) {
throw BggParsingException();
}
}