aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-08-03 23:54:35 +0200
committerGravatar Tom Willemsen2012-08-03 23:54:35 +0200
commit08a2b3c8dd4a624407b4d20368d2a3467426c7fd (patch)
tree6d1737a4f62126c1e380df52a9b9726c1c894008
parentdef7e63e19506cff4070c8d5bb2e5fad960c1e83 (diff)
downloadavandu-08a2b3c8dd4a624407b4d20368d2a3467426c7fd.tar.gz
avandu-08a2b3c8dd4a624407b4d20368d2a3467426c7fd.zip
Add avandu-tt-rss-api-level command
This command gets the api level from tt-rss, this doesn't serve any purpose yet, but it could be used later-on to determine which features are and aren't available.
-rw-r--r--avandu.el12
-rw-r--r--doc/avandu.texinfo12
2 files changed, 24 insertions, 0 deletions
diff --git a/avandu.el b/avandu.el
index a343c64..570673b 100644
--- a/avandu.el
+++ b/avandu.el
@@ -397,6 +397,18 @@ feeds."
(interactive)
(avandu--next-button-of-type backward feed))
+(defun avandu-tt-rss-api-level ()
+ "Get the API level of the your Tiny Tiny RSS instance."
+ (interactive)
+ (let ((level (cdr (assq 'level
+ (assq 'content
+ (avandu--send-command
+ '((op . "getApiLevel"))))))))
+ (when (called-interactively-p 'any)
+ (message "API Level: %d" level))
+
+ level))
+
;; 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 4d36491..3cd6ec3 100644
--- a/doc/avandu.texinfo
+++ b/doc/avandu.texinfo
@@ -241,3 +241,15 @@ the session variable that was returned by the api.
Log out of the Tiny Tiny RSS instance, reset the session id, username
and password used by avandu.
@end deffn
+
+@deffn Command avandu-tt-rss-api-level
+Request the api level of the Tiny Tiny RSS instance. If called
+interactively in any way it will print a message like:
+
+@example
+API Level: #
+@end example
+
+This does not currently serve any purpose, but it might be used in the
+future to determine which functions are available.
+@end deffn