Script API changes, finished porting reddit plugin, reddit importer tar file

This commit is contained in:
azivner
2018-02-26 20:47:34 -05:00
parent 1501fa8dbf
commit 66064f7a94
7 changed files with 35 additions and 159 deletions

View File

@@ -84,6 +84,9 @@ async function createNewNote(parentNoteId, noteOpts, dataKey, sourceId) {
}
async function createNote(parentNoteId, title, content = "", extraOptions = {}) {
if (!parentNoteId) throw new Error("Empty parentNoteId");
if (!title) throw new Error("Empty title");
const note = {
title: title,
content: extraOptions.json ? JSON.stringify(content, null, '\t') : content,