mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 16:35:57 +08:00
Add notion icon remove no use code
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { App, requestUrl } from "obsidian";
|
||||
import { requestUrl } from "obsidian";
|
||||
import { Client } from "@notionhq/client";
|
||||
import { markdownToBlocks, markdownToRichText } from "@tryfabric/martian";
|
||||
import { markdownToBlocks, } from "@tryfabric/martian";
|
||||
import * as fs from "fs";
|
||||
import * as yamlFrontMatter from "yaml-front-matter";
|
||||
import * as yaml from "yaml"
|
||||
@@ -13,10 +13,11 @@ export class Upload2Notion {
|
||||
constructor(app: MyPlugin) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
async createPage(title:string, childArr: any) {
|
||||
const bodyString = {
|
||||
"parent": { "database_id": this.app.settings.databaseID },
|
||||
parent: {
|
||||
database_id: this.app.settings.databaseID
|
||||
},
|
||||
properties: {
|
||||
Name: {
|
||||
title: [
|
||||
@@ -35,7 +36,7 @@ export class Upload2Notion {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'User-Agent': 'obsidian.md',
|
||||
// 'User-Agent': 'obsidian.md',
|
||||
'Authorization': 'Bearer ' + this.app.settings.notionAPI,
|
||||
'Notion-Version': '2021-08-16',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user