2012-05-17 18:40:46 -07:00
|
|
|
NEWSBLUR.Models.Feed = Backbone.Model.extend({
|
|
|
|
|
2012-05-18 16:59:39 -07:00
|
|
|
is_social: function() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-05-17 18:40:46 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
NEWSBLUR.Collections.Feeds = Backbone.Collection.extend({
|
|
|
|
|
|
|
|
model: NEWSBLUR.Models.Feed,
|
|
|
|
|
|
|
|
url: '/reader/feeds',
|
|
|
|
|
|
|
|
fetch: function(options) {
|
|
|
|
options = _.extend({
|
|
|
|
data: {
|
|
|
|
v: 2
|
2012-05-17 20:50:08 -07:00
|
|
|
},
|
|
|
|
silent: true
|
2012-05-17 18:40:46 -07:00
|
|
|
}, options);
|
|
|
|
return Backbone.Collection.prototype.fetch.call(this, options);
|
|
|
|
},
|
|
|
|
|
|
|
|
parse: function(data) {
|
|
|
|
return data.feeds;
|
2012-05-18 18:13:45 -07:00
|
|
|
},
|
2012-05-17 18:40:46 -07:00
|
|
|
|
2012-05-18 18:13:45 -07:00
|
|
|
has_chosen_feeds: function() {
|
|
|
|
return this.any(function(feed) {
|
|
|
|
return feed.get('active');
|
|
|
|
});
|
|
|
|
}
|
2012-05-17 18:40:46 -07:00
|
|
|
|
|
|
|
});
|