Function: secrets-get-secret
secrets-get-secret is an autoloaded and byte-compiled function defined
in secrets.el.gz.
Signature
(secrets-get-secret COLLECTION ITEM)
Documentation
Return the secret of item labeled ITEM in COLLECTION.
If there are several items labeled ITEM, it is undefined which one is returned. If there is no such item, return nil.
ITEM can also be an object path, which is used if contained in COLLECTION.
Source Code
;; Defined in /usr/src/emacs/lisp/net/secrets.el.gz
(defun secrets-get-secret (collection item)
"Return the secret of item labeled ITEM in COLLECTION.
If there are several items labeled ITEM, it is undefined which
one is returned. If there is no such item, return nil.
ITEM can also be an object path, which is used if contained in COLLECTION."
(let ((item-path (secrets-item-path collection item)))
(unless (secrets-empty-path item-path)
(dbus-byte-array-to-string
(nth 2
(dbus-call-method
:session secrets-service item-path secrets-interface-item
"GetSecret" :object-path secrets-session-path))))))