diff --git a/index.js b/index.js index dc356a4..f9797f8 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,5 @@ -const { Notion } = require("@neurosity/notion"); +//const { Notion } = require("@neurosity/notion"); +const { Neurosity } = require("@neurosity/sdk"); require('dotenv').config(); const deviceId = process.env.DEVICE_ID || ""; @@ -17,12 +18,14 @@ const verifyEnvs = (email, password, deviceId) => { verifyEnvs(email, password, deviceId); console.log(`${email} attempting to authenticate with ${deviceId}`); -const notion = new Notion({ +//const notion = new Notion({ +const neurosity = new Neurosity({ deviceId }); const main = async () => { - await notion.login({ +// await notion.login({ + await neurosity.login({ email, password }) @@ -32,11 +35,12 @@ const main = async () => { }); console.log("Logged in"); - notion.calm().subscribe((calm) => { +// notion.calm().subscribe((calm) => { + neurosity.calm().subscribe((calm) => { if (calm.probability > 0.3) { console.log("Hello world"); } }); } -main(); \ No newline at end of file +main();