Comments (4)
@mattcasey You could use the following code snippet to export a page into HTML
import { NotionTasks } from '@nishans/tasks';
async function main () {
const export_url = await NotionTasks.Export.block(
`<block_id>`,
{
exportType: 'html',
locale: 'en',
timeZone: 'Asia/Dhaka'
},
{
token,
user_id: `<user_id>`,
logger: true
}
);
console.log(export_url);
}
main();
If you visit the export_url
you'll be able to download the zipped asset.
from nishan.
@mattcasey Sorry for that I really thought you meant export 😆. Unfortunately, it's not implemented in tasks
package yet but will definitely do so in the near future.
from nishan.
Right. I was able to literally copy the enqueueAndPollTask file into my own project and re-use it, so i was proposing we just expose that for now, even, with the additional types from types/tasks.ts as input? This seems like an uncommon use case, I didn't even expect nishans to support tasks but was surprised it can!
from nishan.
@mattcasey This feature has been implemented in the latest release of @nishans/tasks
.
from nishan.
Related Issues (11)
- How to create a page in a workspace HOT 3
- Nishan documentation not upto date HOT 1
- How do I add records to a collection ? collection.addRows is not available HOT 2
- Ability to searching a collection HOT 4
- Question: Is it possible to list rows in a database? HOT 2
- Having some issues creating pages HOT 3
- Docs link on homepage leads to dead page HOT 4
- Add support for transclusion_reference HOT 2
- Permission error HOT 1
- Unable to copy a page and have it save
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nishan.