Common Lisp SDK for microCMS
Find a file
2025-04-28 23:27:07 +09:00
.forgejo/workflows Add test 2025-04-21 01:40:46 +09:00
.github/workflows Add test 2025-04-21 01:40:46 +09:00
src Apply parse recursively 2025-04-28 23:27:07 +09:00
tests Rename get-<endpoint>-object to get-<endpoint> 2025-04-21 09:16:43 +09:00
.gitignore init 2025-04-19 00:58:50 +09:00
microcms-test.asd Add test 2025-04-21 01:40:46 +09:00
microcms.asd Add test 2025-04-21 01:40:46 +09:00
qlfile Add test 2025-04-21 01:40:46 +09:00
qlfile.lock Add test 2025-04-21 01:40:46 +09:00
README.md Use the plural form for list endpoints 2025-04-21 09:22:24 +09:00

microcms-lisp-sdk

microcms-lisp-sdk is a Common Lisp SDK for interacting with microCMS via its REST API. It provides macros to define client functions for both list and object type endpoints.

⚙️ Configuration

Before making API requests, set your API key and service domain:

(setf microcms:*api-key* "your-api-key")
(setf microcms:*service-domain* "your-service-domain") ; e.g., "example" for example.microcms.io

🚀 Usage

List Type Endpoint

Use define-list-client macro to define functions for list-type content.

query and content must be provided as property list (plist), with keys written in kebab-case (e.g., :draft-key). The JSON response from the microCMS API are automatically converted into plist, with keys transformed from camelCase to kebab-case.

(microcms:define-list-client articles)

This will generate the following functions:

Function Name Arguments Description
get-articles-list (&key query) Get a list of articles.
get-articles-detail (id, &key query) Get details of a specific article by ID.
create-articles (content, &key query) Create a new article with the given content.
update-articles (id, content) Update an existing article by its ID with new content.
delete-articles (id) Delete an article by its ID.

Object Type Endpoint

Use define-object-client macro to define functions for object-type content.

(microcms:define-object-client profile)

This will generate the following functions:

Function Name Arguments Description
get-profile (&key query) Retrieve the profile object.
update-profile (content) Update the content of the profile object.

📄 License

MIT License © 2025 Akira Tempaku