parent
574b760ff7
commit
d72bafbad7
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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)))))
|
||||
|
|
|
@ -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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue