MCPcopy Index your code
hub / github.com/simstudioai/sim / listNotebooks

Function listNotebooks

apps/sim/app/api/tools/evernote/lib/client.ts:370–393  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

368}
369
370export async function listNotebooks(token: string): Promise<EvernoteNotebook[]> {
371 const writer = new ThriftWriter()
372 writer.writeMessageBegin('listNotebooks', 0)
373 writer.writeStringField(1, token)
374 writer.writeFieldStop()
375
376 const reader = await callNoteStore(token, writer)
377 const notebooks: EvernoteNotebook[] = []
378
379 reader.readStruct((r, fieldId, fieldType) => {
380 if (fieldId === 0 && fieldType === TYPE_LIST) {
381 const { size } = r.readListBegin()
382 for (let i = 0; i < size; i++) {
383 notebooks.push(readNotebook(r))
384 }
385 } else {
386 if (!checkEvernoteException(r, fieldId, fieldType)) {
387 r.skip(fieldType)
388 }
389 }
390 })
391
392 return notebooks
393}
394
395export async function getNote(
396 token: string,

Callers 1

route.tsFile · 0.90

Calls 10

writeMessageBeginMethod · 0.95
writeStringFieldMethod · 0.95
writeFieldStopMethod · 0.95
readNotebookFunction · 0.85
checkEvernoteExceptionFunction · 0.85
readStructMethod · 0.80
readListBeginMethod · 0.80
skipMethod · 0.80
callNoteStoreFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected