Fix formatting of docstring

This commit is contained in:
Lucien Cartier-Tilet 2022-07-13 15:49:50 +02:00
parent 2f712b8a4d
commit ed42053b5c
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 16 additions and 13 deletions

4
.dir-locals.el Normal file
View File

@ -0,0 +1,4 @@
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((emacs-lisp-mode . ((sentence-end-double-space . t))))

View File

@ -44,8 +44,8 @@
(defcustom appwrite-endpoint "" (defcustom appwrite-endpoint ""
"Appwrite endpoint. "Appwrite endpoint.
Must not include the API version, e.g. Must not include the API version, e.g.
\"https://appwrite.example.org\". The variable must not end with \"https://appwrite.example.org\". The variable must not end with
a trailing forward slash. Setting this variable with a trailing forward slash. Setting this variable with
`customize-set-variable' takes care of it automatically." `customize-set-variable' takes care of it automatically."
:group 'appwrite :group 'appwrite
:type 'string :type 'string
@ -78,9 +78,8 @@ in the else branch is the definition of `plistp' in Emacs 29."
(defun appwrite--get-full-url (api) (defun appwrite--get-full-url (api)
"Get the full url for API. "Get the full url for API.
If API does not begin with an initial forward slash, add it If API does not begin with an initial forward slash, add it
automatically. automatically. If it does not contain an API version, prefix
\"/v1\" by default."
If it does not contain an API version, prefix \"/v1\" by default."
(let ((versionp (string-match-p "^/?v[[:digit:]]+.*" api)) (let ((versionp (string-match-p "^/?v[[:digit:]]+.*" api))
(initial-forward-slash-p (string-prefix-p "/" api))) (initial-forward-slash-p (string-prefix-p "/" api)))
(concat appwrite-endpoint (concat appwrite-endpoint
@ -103,9 +102,9 @@ This will show a message in the modeline in this format:
"In case of failure when calling the Appwrite API, display MESSAGE. "In case of failure when calling the Appwrite API, display MESSAGE.
The function considers a call to the API a failure in case the The function considers a call to the API a failure in case the
HTTP status code in RESPONSE differs from SUCCESS-STATUS, the HTTP status code in RESPONSE differs from SUCCESS-STATUS, the
HTTP status code hoped for. If thats the case, warn the user, HTTP status code hoped for. If thats the case, warn the user,
see `appwrite--message-failure'. Else, return the JSON returned see `appwrite--message-failure', else return the JSON returned by
by the API." the API."
(let ((status (car response)) (let ((status (car response))
(json (cdr response))) (json (cdr response)))
(if (= status success-status) (if (= status success-status)
@ -134,10 +133,10 @@ automatic conversion depending on its type.
If ASYNCP is t, `appwrite--post-api' will be asynchronous. If ASYNCP is t, `appwrite--post-api' will be asynchronous.
CALLBACK must then be set as it will be called once the request CALLBACK must then be set as it will be called once the request
finishes. See `url-retrieve'. finishes. See `url-retrieve'.
The function returns a pair composed of the HTTP status code as The function returns a pair composed of the HTTP status code as
its car. The cdr is a hash table from the response answer if its car. The cdr is a hash table from the response answer if
Content-Type in the headers is \"application/json\"." Content-Type in the headers is \"application/json\"."
(let* ((url (appwrite--get-full-url api)) (let* ((url (appwrite--get-full-url api))
(url-request-method method) (url-request-method method)
@ -196,7 +195,7 @@ Content-Type in the headers is \"application/json\"."
Create bucket named NAME with id ID. Create bucket named NAME with id ID.
PERMISSION is the permissioin type model to use for reading files PERMISSION is the permissioin type model to use for reading files
in this bucket. By default, PERMISSION is \"bucket\". For more in this bucket. By default, PERMISSION is \"bucket\". For more
info, see https://appwrite.io/docs/permissions info, see https://appwrite.io/docs/permissions
READ is an array of roles for read permissions. READ is an array of roles for read permissions.
@ -241,7 +240,7 @@ than 20MB are skipped. t by default."
(cl-defun appwrite-storage-list-buckets (&key search (limit 25) offset cursor cursor-direction order-type) (cl-defun appwrite-storage-list-buckets (&key search (limit 25) offset cursor cursor-direction order-type)
"List of all storage buckets. "List of all storage buckets.
SEARCH is a string to filter the list results when non-nil. Max SEARCH is a string to filter the list results when non-nil. Max
length of 256 chars. length of 256 chars.
LIMIT is the maximum amount of buckets returned by the LIMIT is the maximum amount of buckets returned by the
@ -258,7 +257,7 @@ CURSOR-DIRECTION can be either \\='after or \\='before.
ORDER-TYPE can be either \\='ascending or \\='descending. ORDER-TYPE can be either \\='ascending or \\='descending.
If the query is successful, return a hash table made from the If the query is successful, return a hash table made from the
acquired JSON. Otherwise, return nil and warn the user." acquired JSON. Otherwise, return nil and warn the user."
(let (payload) (let (payload)
(when search (setq payload (append payload `(search ,search)))) (when search (setq payload (append payload `(search ,search))))
(setq payload (append payload `(limit ,limit))) (setq payload (append payload `(limit ,limit)))