|
|
@@ -1,11 +1,13 @@ |
|
|
import 'package:http/http.dart' as http; |
|
|
import 'package:http/http.dart' as http; |
|
|
import 'client.dart'; |
|
|
|
|
|
|
|
|
import 'package:webfeed/domain/rss_feed.dart'; |
|
|
|
|
|
|
|
|
void main() { |
|
|
void main() { |
|
|
var client = new WebFeedClient(new http.Client()); |
|
|
|
|
|
client.fetch("https://developer.apple.com/news/releases/rss/releases.rss").then((channel) { |
|
|
|
|
|
|
|
|
var client = new http.Client(); |
|
|
|
|
|
client.get("https://developer.apple.com/news/releases/rss/releases.rss").then((response) { |
|
|
|
|
|
return response.body; |
|
|
|
|
|
}).then((bodyString) { |
|
|
|
|
|
var channel = new RssFeed.parse(bodyString); |
|
|
print(channel); |
|
|
print(channel); |
|
|
}).catchError((error) { |
|
|
|
|
|
print(error); |
|
|
|
|
|
|
|
|
return channel; |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |