Giter Site home page Giter Site logo

Comments (4)

Devorein avatar Devorein commented on July 23, 2024

@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.

Devorein avatar Devorein commented on July 23, 2024

@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.

mattcasey avatar mattcasey commented on July 23, 2024

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.

Devorein avatar Devorein commented on July 23, 2024

@mattcasey This feature has been implemented in the latest release of @nishans/tasks.

from nishan.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.