ソースを参照

add atom example

master
Wito Chandra 8年前
コミット
51b6b5b555
1個のファイルの変更12行の追加0行の削除
  1. +12
    -0
      example/main.dart

+ 12
- 0
example/main.dart ファイルの表示

@@ -1,8 +1,11 @@
import 'package:http/http.dart' as http;
import 'package:webfeed/domain/atom_feed.dart';
import 'package:webfeed/domain/rss_feed.dart';

void main() {
var client = new http.Client();

// RSS feed
client.get("https://developer.apple.com/news/releases/rss/releases.rss").then((response) {
return response.body;
}).then((bodyString) {
@@ -10,4 +13,13 @@ void main() {
print(channel);
return channel;
});

// Atom feed
client.get("https://www.theverge.com/rss/index.xml").then((response) {
return response.body;
}).then((bodyString) {
var feed = new AtomFeed.parse(bodyString);
print(feed);
return feed;
});
}

読み込み中…
キャンセル
保存