File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
nextcloud_mcp_server/client Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,21 @@ async def get_settings(self) -> Dict[str, Any]:
1818
1919 async def get_all_notes (self ) -> List [Dict [str , Any ]]:
2020 """Get all notes."""
21- response = await self ._make_request ("GET" , "/apps/notes/api/v1/notes" )
22- return response .json ()
21+ notes = []
22+ cursor = ""
23+
24+ while True :
25+ response = await self ._make_request (
26+ "GET" ,
27+ "/apps/notes/api/v1/notes" ,
28+ params = {"chunkSize" : 50 , "chunkCursor" : cursor },
29+ )
30+ notes .extend (response .json ())
31+ if "X-Notes-Chunk-Cursor" not in response .headers :
32+ break
33+ cursor = response .headers ["X-Notes-Chunk-Cursor" ]
34+
35+ return notes
2336
2437 async def get_note (self , note_id : int ) -> Dict [str , Any ]:
2538 """Get a specific note by ID."""
You can’t perform that action at this time.
0 commit comments