aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-08-04 00:05:24 +0200
committerGravatar Tom Willemsen2012-08-04 00:05:24 +0200
commit7546b86c4b4d5913c8b1ba83eae9f92d99977c7e (patch)
tree91bc080202d89dacaeb0c3997b0220840e068748
parent74d96c4a93325bbb2548e10c2ac12e096d9c4e63 (diff)
downloadavandu-7546b86c4b4d5913c8b1ba83eae9f92d99977c7e.tar.gz
avandu-7546b86c4b4d5913c8b1ba83eae9f92d99977c7e.zip
Add avandu-tt-rss-version command
Also add some doc fixes.
-rw-r--r--avandu.el14
-rw-r--r--doc/avandu.texinfo13
2 files changed, 26 insertions, 1 deletions
diff --git a/avandu.el b/avandu.el
index f7c7bb7..0c46426 100644
--- a/avandu.el
+++ b/avandu.el
@@ -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.
diff --git a/doc/avandu.texinfo b/doc/avandu.texinfo
index 3cd6ec3..dd0bc09 100644
--- a/doc/avandu.texinfo
+++ b/doc/avandu.texinfo
@@ -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