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.
This commit is contained in:
parent
def7e63e19
commit
08a2b3c8dd
2 changed files with 24 additions and 0 deletions
12
avandu.el
12
avandu.el
|
@ -397,6 +397,18 @@ feeds."
|
||||||
(interactive)
|
(interactive)
|
||||||
(avandu--next-button-of-type backward feed))
|
(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
|
;; Overview
|
||||||
(define-derived-mode avandu-overview-mode special-mode "Avandu:Overview"
|
(define-derived-mode avandu-overview-mode special-mode "Avandu:Overview"
|
||||||
"Major mode fo the avandu overview screen.
|
"Major mode fo the avandu overview screen.
|
||||||
|
|
|
@ -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
|
Log out of the Tiny Tiny RSS instance, reset the session id, username
|
||||||
and password used by avandu.
|
and password used by avandu.
|
||||||
@end deffn
|
@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
|
||||||
|
|
Loading…
Reference in a new issue