Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -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 || "";
Expand All @@ -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
})
Expand All @@ -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();
main();