lxd-ui icon indicating copy to clipboard operation
lxd-ui copied to clipboard

Extract LXD TypeScript client

Open Igorgro opened this issue 1 year ago • 2 comments

I'm not sure, how the source code of this software is organized, but there should be some kind of typescript wrapper around LXD API. Can it be extracted and published as a separate npm package please?

Igorgro avatar Apr 13 '23 06:04 Igorgro

The typescript types can easily be extracted and published. But I am not sure if I understand correctly if that is what you meant. Could you clarify the use case for the NPM package?

edlerd avatar Apr 13 '23 17:04 edlerd

If i want to integrate my nodejs application with LXD, I will need to define all the TypeScript types and make a method for every api of rest api (something like getInstnaces(), getInstance(name: string), etc.). Why should I do the work which already done? You can provide the package based on this codebase. For example, this is a python binding for lxd: https://github.com/lxc/pylxd. Speaking about nodejs, there is, for example, rest api wrapper for gitlab: https://www.npmjs.com/package/@gitbeaker/node

Igorgro avatar Apr 13 '23 20:04 Igorgro