From d72bafbad7c6df593474abf030082ba3d33c52a6 Mon Sep 17 00:00:00 2001 From: Akira Tempaku <paku@skyizwhite.dev> Date: Mon, 21 Apr 2025 09:16:43 +0900 Subject: [PATCH] Rename get-<endpoint>-object to get-<endpoint> --- README.md | 2 +- src/client.lisp | 4 ++-- tests/client.lisp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2771676..64e8074 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/client.lisp b/src/client.lisp index 578167a..3800eae 100644 --- a/src/client.lisp +++ b/src/client.lisp @@ -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))))) diff --git a/tests/client.lisp b/tests/client.lisp index 4a3a09e..18b1a58 100644 --- a/tests/client.lisp +++ b/tests/client.lisp @@ -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))))