Rename get-<endpoint>-object to get-<endpoint>

This commit is contained in:
Akira Tempaku 2025-04-21 09:16:43 +09:00
parent 574b760ff7
commit d72bafbad7
Signed by: paku
GPG key ID: 5B4E8402BCC50607
3 changed files with 4 additions and 4 deletions

View file

@ -45,7 +45,7 @@ This will generate the following functions:
| Function Name | Arguments | Description |
|---------------|-----------|-------------|
| `get-profile-object` | (&key `query`) | Retrieve the profile object. |
| `get-profile` | (&key `query`) | Retrieve the profile object. |
| `update-profile` | (`content`) | Update the content of the profile object. |
### 📄 License

View file

@ -99,10 +99,10 @@
(defmacro define-object-client (endpoint)
(let ((str-endpoint (string-downcase (string endpoint)))
(get-object (symbolicate 'get- endpoint '-object))
(get (symbolicate 'get- endpoint))
(update (symbolicate 'update- endpoint)))
`(list
(defun ,get-object (&key query)
(defun ,get (&key query)
(%request :get ,str-endpoint :query query))
(defun ,update (content)
(%request :patch ,str-endpoint :content content)))))

View file

@ -42,5 +42,5 @@
(testing "define-object-client creates expected functions"
(define-object-client config)
(ok (fboundp 'get-config-object))
(ok (fboundp 'get-config))
(ok (fboundp 'update-config))))