Renders
interface Renders
Document generation: /render.
Functions
Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun convert(document: TemplateSource.Content, to: OutputFormat, options: RenderOptions = RenderOptions.None): RenderedDocument
abstract suspend fun convert(document: TemplateSource.Content, to: OutputFormat, options: RenderOptions = RenderOptions.None): RenderedDocument
Pure format conversion through POST /render/template: no templating, tags are left untouched.
Link copied to clipboard
GET /render/{renderId}. No authentication. On the cloud the file is kept one hour and served once.
Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun render(template: TemplateSource, data: RenderData, options: RenderOptions = RenderOptions.None): RenderedDocument
abstract suspend fun render(template: TemplateSource, data: RenderData, options: RenderOptions = RenderOptions.None): RenderedDocument
Synchronous, one round-trip: POST /render/{id}?download=true.
context(_: Raise<KarboneError>)
open suspend fun render(template: TemplateSource, data: RenderData, configure: RenderOptions.Builder.() -> Unit): RenderedDocument
open suspend fun render(template: TemplateSource, data: RenderData, configure: RenderOptions.Builder.() -> Unit): RenderedDocument
Same as render but RenderOptions are built inline through configure.
Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun start(template: TemplateSource, data: RenderData, options: RenderOptions = RenderOptions.None): RenderId
abstract suspend fun start(template: TemplateSource, data: RenderData, options: RenderOptions = RenderOptions.None): RenderId
Link copied to clipboard
context(_: Raise<KarboneError>)
abstract suspend fun startAsync(template: TemplateSource, data: RenderData, webhook: Webhook, options: RenderOptions = RenderOptions.None): AsyncRenderAccepted
abstract suspend fun startAsync(template: TemplateSource, data: RenderData, webhook: Webhook, options: RenderOptions = RenderOptions.None): AsyncRenderAccepted
Asynchronous render: Carbone calls webhook with {success, data: {renderId}} when done. Required for batch.