Skip to content

Commit

Permalink
switch from google feeds service to pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
cfjedimaster committed Jun 14, 2016
1 parent 7ed0b55 commit 9f89f9f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
Empty file removed multiupload2/notes.txt
Empty file.
2 changes: 0 additions & 2 deletions rssreader_ionic/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>

<script type="text/javascript" src="https://www.google.com/jsapi"></script>

<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/services.js"></script>
Expand Down
18 changes: 6 additions & 12 deletions rssreader_ionic/www/js/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@
console.log('from cache');
deferred.resolve(entries);
} else {
google.load("feeds", "1",{callback:function() {
console.log('googles init called');
var feed = new google.feeds.Feed(url);

feed.setNumEntries(10);
feed.load(function(result) {
entries = result.feed.entries;
deferred.resolve(entries);
});


}});
var pipeUrl = 'https://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from rss where url="'+url+'"')+ '&format=json';

$http.get(pipeUrl).then(function(results) {
entries = results.data.query.results.item;
console.dir(entries);
deferred.resolve(entries);
});
}
return deferred.promise;
}
Expand Down
4 changes: 2 additions & 2 deletions rssreader_ionic/www/partials/entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ion-content class="padding">

<h2>{{entry.title}}</h2>
<p><b>Published:</b> {{entry.publishedDate}}</p>
<p><b>Published:</b> {{entry.pubDate}}</p>

<div ng-bind-html="entry.content"></div>
<div ng-bind-html="entry.description"></div>

</ion-content>

Expand Down

0 comments on commit 9f89f9f

Please sign in to comment.