@defun secrets-create-item collection item password &rest attributes
This function creates a new item in @var{collection} with label
-@var{item} and password @var{password}. @var{attributes} are
-key-value pairs set for the created item. The keys are keyword
-symbols, starting with a colon. Example:
+@var{item} and password @var{password}. The label @var{item} does not
+have to be unique in @var{collection}. @var{attributes} are key-value
+pairs set for the created item. The keys are keyword symbols,
+starting with a colon. Example:
@example
-;;; The session "session", the label is "my item"
-;;; and the secret (password) is "geheim"
+;;; The session is "session", the label is "my item"
+;;; and the secret (password) is "geheim".
(secrets-create-item "session" "my item" "geheim"
:method "sudo" :user "joe" :host "remote-host")
@end example
+
+The key @code{:xdg:schema} determines the scope of the item to be
+generated, i.e.@: for which applications the item is intended for.
+This is just a string like "org.freedesktop.NetworkManager.Mobile" or
+"org.gnome.OnlineAccounts", the other required keys are determined by
+this. If no @code{:xdg:schema} is given,
+"org.freedesktop.Secret.Generic" is used by default.
@end defun
@defun secrets-get-secret collection item
-Return the secret of item labeled @var{item} in @var{collection}.
-If there is no such item, return @code{nil}.
+Return the secret of item labeled @var{item} in @var{collection}. If
+there are several items labeled @var{item}, it is undefined which one
+is returned. If there is no such item, return @code{nil}.
@end defun
@defun secrets-delete-item collection item
-This function deletes item @var{item} in @var{collection}.
+This function deletes item @var{item} in @var{collection}. If there
+are several items labeled @var{item}, it is undefined which one is
+deleted.
@end defun
The lookup attributes, which are specified during creation of a
@defun secrets-get-attribute collection item attribute
Returns the value of key @var{attribute} of item labeled @var{item} in
-@var{collection}. If there is no such item, or the item doesn't own
-this key, the function returns @code{nil}.
+@var{collection}. If there are several items labeled @var{item}, it
+is undefined which one is returned. If there is no such item, or the
+item doesn't own this key, the function returns @code{nil}.
@end defun
@defun secrets-get-attributes collection item
Return the lookup attributes of item labeled @var{item} in
-@var{collection}. If there is no such item, or the item has no
-attributes, it returns @code{nil}. Example:
+@var{collection}. If there are several items labeled @var{item}, it
+is undefined which one is returned. If there is no such item, or the
+item has no attributes, it returns @code{nil}. Example:
@example
(secrets-get-attributes "session" "my item")
- @result{} ((:user . "joe") (:host ."remote-host"))
+ @result{} ((:user . "joe") (:host . "remote-host"))
@end example
@end defun