This document summarizes the fixes made to support the Memos V1 API in the Logseq plugin.
-
Incorrect API endpoints:
- Changed
/api/v1/memoto/api/v1/memosfor listing memos - Changed
/api/v1/memo/{id}to/api/v1/memos/{id}for updates - Changed
/api/v1/user/meto/api/v1/users/mefor user info
- Changed
-
Response format transformation:
- V1 API returns different field names than expected by the plugin
- Added transformation from V1 format (name, createTime, etc.) to V0 format (id, createdTs, etc.)
- Properly extract memo ID from the
namefield (e.g., "memos/123" → 123)
-
Request parameters:
- Changed from
limit/offsettopageSize/pageToken - Removed incorrect
rowStatusfilter (V1 API doesn't support it) - Added client-side filtering for archived memos
- Changed from
-
HTTP headers:
- Added proper Accept and Content-Type headers
- Ensured proper JSON response handling
src/memos/impls/clientV1.ts: Main V1 client implementationsrc/memos.ts: Fixed typo "fitler" → "filter"
The plugin has been tested and can now:
- ✅ Connect to Memos V1 API
- ✅ Fetch memos list
- ✅ Create new memos
- ✅ Update existing memos
- ✅ Get user information
Run pnpm build to build the plugin with these fixes.