@jamesgopsill/repetier-server-client

Typescript Repetier Server Client

The client has been developed as part of a research programme investigating agent-based manufacturing systems (Brokering Additive Manufacturing). It is isomorphic capable of running on server (Node.js) and client-side (Browser) applications.

Using the client

To install the package, use:

pnpm install @jamesgopsill/repetier-server-client

Use it in your code like so:

Typescript / Javascript (ESM)

import { RepetierServerClient } from "@jamesgopsill/repetier-server-client"

// Create a new client.
const client = new RepetierServerClient("URL")

const r = await client.info()
if (!r.ok) {
console.error("Could not access server")
process.exit()
}
client.apiKey = r.data.apikey
const connected = await client.connect()
if (!connected) {
console.error("Could not access server")
process.exit()
}

const ping = await client.ping()
if (ping) console.log(ping)

Javascript (CJS)

const {
EigerClRepetierServerClientient,
} = require("@jamesgopsill/repetier-server-client")

// Create a new client.
const client = new RepetierServerClient("URL")

const r = await client.info()
if (!r.ok) {
console.error("Could not access server")
process.exit()
}
client.apiKey = r.data.apikey
const connected = await client.connect()
if (!connected) {
console.error("Could not access server")
process.exit()
}

const ping = await client.ping()
if (ping) console.log(ping)

Client Docs

The client documentation have been produced using TypeDoc and can be accessed here. More details on the API can be found at Repetier Server API.

Contributing

We would love to have additional contributors to the project to help us maintain and add functionality to the project.

Support the Project

The project has been supported by the EPSRC-funded Brokering Additive Manufacturing project (EP/V05113X/1). More details on the project can be found at the Design Manufacturing Futures Lab website.

To donate and provide continued support, please consider sponsoring the maintainer.

Generated using TypeDoc