collected-notes
Advanced tools
Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "collected-notes", | ||
"description": "API wrapper for Collected Notes", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Sergio Xalambrí", |
@@ -94,3 +94,4 @@ # Collected Notes TS Client | ||
const siteId = 1; | ||
const notes = await cn.latestNotes(siteId); | ||
const page = 1; // default is 1 | ||
const notes = await cn.latestNotes(siteId, page); | ||
``` | ||
@@ -105,3 +106,3 @@ | ||
```ts | ||
const siteId = 1; | ||
const siteId = 1; // optional, if missing the API will use your first site | ||
const noteContent = { | ||
@@ -111,3 +112,3 @@ body: '# Title\nContent of the note.', | ||
}; | ||
const note = await cn.create(siteId, noteContent); | ||
const note = await cn.create(noteContent, siteId); | ||
``` | ||
@@ -144,3 +145,3 @@ | ||
const noteId = 2; | ||
const response = await cn.destroy(siteId, noteId); | ||
await cn.destroy(siteId, noteId); | ||
``` | ||
@@ -172,2 +173,13 @@ | ||
### Search | ||
You can use the client to search your notes. | ||
```ts | ||
const siteId = 1; | ||
const term = "new content"; | ||
const page = 1; // default is 1 | ||
const notes = await cn.search(siteId, term, page); | ||
``` | ||
### Site and Read | ||
@@ -174,0 +186,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
191433
1753
231