Skip to content

Commit

Permalink
Bump to 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TimRobinson1 committed Jun 9, 2020
1 parent 0a2f6f4 commit 6ca0fd9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "notional",
"version": "0.1.0",
"version": "0.1.1",
"description": "An unofficial Notion API for interacting with table data in NodeJS",
"main": "build/index.js",
"types": "index.d.ts",
"types": "build/index.d.ts",
"scripts": {
"test": "jest",
"build": "rimraf ./build && tsc",
Expand Down
34 changes: 34 additions & 0 deletions src/tes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import notional from './lib/notional';

async function run() {
const { table, block } = notional({
apiKey:
'fbc8aac01a91cdccadb120f3389def57560041730b8b33d69296acc694a2cbf10f80134c9671307c0a274c540367449d3331ed87ee9c315b1628a7d8d38abf55a8039c72cbc2e9314730c626c9a4',
userId: '19ba23f4-8a7a-4344-8baf-9573367fce0b',
});

// const userTable = await table('https://www.notion.so/birdie/f51184ee6ecc41afbd9b796e35fa0c28');
const userTable = await table(
'https://www.notion.so/birdie/481ef7846c1a4f0c8f30e3a3911d9129',
);

console.log(await userTable.where({ Name: 'dods' }).get());

// await userTable
// .where({ Name: 'dods' })
// .update({
// Person: 'Tim Robinson'
// });

// const dateBlock = block('382c5059-3aa8-4cdd-a576-284ef11403b2');
// await dateBlock
// .update(
// (new Date()).toISOString()
// );

// We can call loadUserContent to get users, then call syncRecordValues with { id: -1 } to get data on that user

return 'success';
}

run().then(console.log).catch(console.error);

0 comments on commit 6ca0fd9

Please sign in to comment.