From fb8e52c1dc022538e3e5874cc12c021e05d1fb50 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 4 Aug 2012 01:31:55 +0200 Subject: Add avandu-feeds command This command only returns a vector of feeds, it is not yet useful for users but will be used later to allow for different views of feeds. --- avandu.el | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'avandu.el') diff --git a/avandu.el b/avandu.el index e875b5f..20d7a3f 100644 --- a/avandu.el +++ b/avandu.el @@ -326,6 +326,26 @@ returned json." (feed_id . ,id)))) (revert-buffer)) +(defun avandu-feeds (&optional category unread limit offset) + "Get the subscribed feeds. If CATEGORY has been specified show +only the feeds in CATEGORY. If UNREAD has been specified only +show feeds with unread articles in them. Only fets LIMIT +number of feeds, starting from OFFSET. + +There are a number of special category IDs: + 0 -- Uncategorized feeds + -1 -- Special (e.g. Starred, Published, Archived, etc.) feeds + -2 -- Labels + -3 -- All feeds, excluding virtual feeds (e.g. Labels and such) + -4 -- All feeds, including virtual feeds" + (cdr (assq 'content + (avandu--send-command + `((op . "getFeeds") + ,@(when category `((cat_id . ,category))) + ,@(when unread `((unread_only . ,unread))) + ,@(when limit `((limit . ,limit))) + ,@(when offset `((offset . ,offset)))))))) + (defun avandu-logged-in-p () "Send a request to tt-rss to see if we're (still) logged in. This function returns t if we are, or nil if we're not." @@ -500,8 +520,6 @@ by feed." ;; (id . 109)) ;; (login user password) -;; (get-counters output-mode) -;; (get-feeds category-id unread-only limit offset) ;; (get-categories unread-only) ;; (get-headlines feed-id limit skip filter categoryp show-excerpt show-content view-mode include-attachments since-id search search-mode match-on) ;; (update-article article-ids mode field data) -- cgit v1.2.3-54-g00ecf