Add avandu-tt-rss-version command

Also add some doc fixes.
This commit is contained in:
Tom Willemsen 2012-08-04 00:05:24 +02:00
parent 74d96c4a93
commit 7546b86c4b
2 changed files with 26 additions and 1 deletions

View file

@ -401,7 +401,7 @@ feeds."
(avandu--next-button-of-type backward feed))
(defun avandu-tt-rss-api-level ()
"Get the API level of the your Tiny Tiny RSS instance."
"Get the API level of your Tiny Tiny RSS instance."
(interactive)
(let ((level (cdr (assq 'level
(assq 'content
@ -412,6 +412,18 @@ feeds."
level))
(defun avandu-tt-rss-version ()
"Get the version of your Tiny Tiny RSS instance."
(interactive)
(let ((version (cdr (assq 'version
(assq 'content
(avandu--send-command
'((op . "getVersion"))))))))
(when (called-interactively-p 'any)
(message "Tiny Tiny RSS Version: %s" version))
version))
;; Overview
(define-derived-mode avandu-overview-mode special-mode "Avandu:Overview"
"Major mode fo the avandu overview screen.

View file

@ -250,6 +250,19 @@ interactively in any way it will print a message like:
API Level: #
@end example
and it returns the api level as an integer.
This does not currently serve any purpose, but it might be used in the
future to determine which functions are available.
@end deffn
@deffn Command avandu-tt-rss-version
Get the version of the Tiny Tiny RSS instance. If called
interactively in any way it will print a message like:
@example
Tiny Tiny RSS Version: #
@end example
and it returns the version as a string.
@end deffn