Skip to content
This repository was archived by the owner on Jul 15, 2024. It is now read-only.

W24-Service-GmbH/werk24-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BETA Version!

Read a drawing synchronously

const asks = [W24AskPageThumbnail.parse({})];
const drawing = getDrawing(); // Assume getDrawing is implemented
const model = getModel(); // Assume getModel is implemented

const client = await W24TechreadClient.makeFromEnv(null);
for await (const msg of client.readDrawing(drawing, asks, model)) {
    console.log(msg);
}

Read a drawing asynchronously

const drawing = getDrawing();
var message = null;

const client = await W24TechreadClient.makeFromEnv();
const hooks = [
    new Hook({
        ask:W24AskTitleBlock.parse({}),
        func: async (result) => {message = result;}
    })
];

await client.readDrawingWithHooks(drawing, hooks);
console.log(message);

Read a drawing with a webhook as callback

const asks = [W24AskPageThumbnail.parse({})];
const drawingBytes = getDrawing();

const client = await W24TechreadClient.makeFromEnv();
await client.readDrawingWithCallback(
    drawingBytes,
    asks,
    "https://werk24.io",
    5
)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •