@lune-climate/lune
TypeScript icon, indicating that this package has built-in type declarations

2.17.5 • Public • Published

Lune

Lune is Javascript/Typescript library that allows easy communication with Lune's API. All endpoints are supported allowing for easier integration into any codebase. For a full list of possible operations, you can rely on your IDE auto-completion, check the source classes directly or go through our full OpenAPI schema present here: https://docs.lune.co/openapi.yml

The library is ESM and CommonJS compatible.

How to use

You can check some basic example usage from our github repo here: https://github.com/lune-climate/lune-ts/tree/master/example-usage

Overview:

// Setup your client once in your application
import * as lune from '@lune-climate/lune';
var luneClient = new lune.LuneClient('your_api_key_would_go_here');

// Whenever you want to use it (remember this is a Promise so it's an async operation)
var resp = await luneClient.createOrderByMass({ mass: { amount: "123.21", unit: "t" } });
// Handle error or success response
if (resp.ok) {
  var orderByQuantity = resp.val;
  console.log(`OrderByQuantity: ${JSON.stringify(orderByQuantity)}`);
else if (resp.err) {
  console.log(`Error occurred: ${resp.val.description}`);
}

Readme

Keywords

Package Sidebar

Install

npm i @lune-climate/lune

Weekly Downloads

736

Version

2.17.5

License

MIT

Unpacked Size

1.65 MB

Total Files

1693

Last publish

Collaborators

  • stoilstoychev
  • festinajashari
  • troglo9080
  • jstasiak
  • rbruggem