App is now based on categories

Now the entry point of the app is the categories page and user can browse them until the articles
This commit is contained in:
Markel Arizaga 2014-10-26 19:49:50 +01:00
parent 6b0d08f28d
commit e81bd87919
4 changed files with 64 additions and 32 deletions

View file

@ -54,17 +54,17 @@ TinyTinyRSS.prototype.doOperation = function(operation, new_options, callback) {
xhr.send(JSON.stringify(options));
}
TinyTinyRSS.prototype.reload = function(callback,limit) {
this.getUnreadFeeds(callback, 0, limit);
TinyTinyRSS.prototype.reload = function(callback,limit, feedId) {
this.getUnreadFeeds(callback, 0, limit, feedId);
};
TinyTinyRSS.prototype.getUnreadFeeds = function(callback, skip, limit) {
TinyTinyRSS.prototype.getUnreadFeeds = function(callback, skip, limit, feedId) {
skip = skip.length;
var options = {
show_excerpt: false,
view_mode: "unread",
show_content: true,
feed_id: -4,
feed_id: feedId || -4,
limit: limit || 0,
skip: skip || 0
};
@ -72,6 +72,16 @@ TinyTinyRSS.prototype.getUnreadFeeds = function(callback, skip, limit) {
this.doOperation("getHeadlines", options, callback);
}
TinyTinyRSS.prototype.getFeedsByCategory = function (categoryId, callback) {
var options = {
cat_id: categoryId,
unread_only: true,
include_nested: false
};
this.doOperation("getFeeds", options, callback);
};
TinyTinyRSS.prototype.setArticlesRead = function(articles, callback) {
var options = {