Add avandu-categories function

Remove texinfo documentation abount avandu-feeds, as it is not a
command it should not (yet) be documented in the info manual.
This commit is contained in:
Tom Willemsen 2012-08-04 02:28:18 +02:00
parent fb8e52c1dc
commit ed39e627de
2 changed files with 27 additions and 34 deletions

View file

@ -306,25 +306,13 @@ returned json."
(kill-buffer buffer) (kill-buffer buffer)
result)) result))
;; Commands (defun avandu-categories (&optional unread)
(defun avandu-browse-article () "Get the created categories. If UNREAD is non-nil only get
"Browse the current button's article url." categories with feeds with unread articles in them."
(interactive) (cdr (assq 'content
(let ((button (button-at (point)))) (avandu--send-command
(browse-url (button-get button 'link)) `((op . "getCategories")
(avandu-mark-article-read button))) ,@(when unread `((unread_only . ,unread))))))))
(defun avandu-feed-catchup ()
"Send a request to tt-rss to \"Catch up\" with a feed. This
means that all the (unread) articles in a feed will be marked
as read. After having completed this request the overview is
reloaded."
(interactive)
(let* ((button (button-at (point)))
(id (button-get button 'feed-id)))
(avandu--send-command `((op . "catchupFeed")
(feed_id . ,id))))
(revert-buffer))
(defun avandu-feeds (&optional category unread limit offset) (defun avandu-feeds (&optional category unread limit offset)
"Get the subscribed feeds. If CATEGORY has been specified show "Get the subscribed feeds. If CATEGORY has been specified show
@ -346,6 +334,26 @@ There are a number of special category IDs:
,@(when limit `((limit . ,limit))) ,@(when limit `((limit . ,limit)))
,@(when offset `((offset . ,offset)))))))) ,@(when offset `((offset . ,offset))))))))
;; Commands
(defun avandu-browse-article ()
"Browse the current button's article url."
(interactive)
(let ((button (button-at (point))))
(browse-url (button-get button 'link))
(avandu-mark-article-read button)))
(defun avandu-feed-catchup ()
"Send a request to tt-rss to \"Catch up\" with a feed. This
means that all the (unread) articles in a feed will be marked
as read. After having completed this request the overview is
reloaded."
(interactive)
(let* ((button (button-at (point)))
(id (button-get button 'feed-id)))
(avandu--send-command `((op . "catchupFeed")
(feed_id . ,id))))
(revert-buffer))
(defun avandu-logged-in-p () (defun avandu-logged-in-p ()
"Send a request to tt-rss to see if we're (still) logged "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." in. This function returns t if we are, or nil if we're not."

View file

@ -273,18 +273,3 @@ Tiny Tiny RSS Version: #
and it returns the version as a string. and it returns the version as a string.
@end deffn @end deffn
@deffn avandu-feeds &optional category unread limit offset
Get a list of all the feeds in CATEGORY. If CATEGORY is @code{nil},
unspicified or 0, show uncategorized feeds.
If UNREAD is non-@code{nil} only get feeds with unread articles in
them.
If LIMIT is non-@code{nil} only get LIMIT number of feeds and if
OFFSET is non-@code{nil} start at OFFSET.
Returns a vector of all the feeds. This is not useful for users on
its own, but if will be used in the future to make more views
available.
@end deffn