@random-guys/lux
TypeScript icon, indicating that this package has built-in type declarations

4.2.0 • Public • Published

lux

Calling methods using node-soap could be something sometimes, so we replace it will classes and methods

How to install

yarn add @random-guys/lux

How does it work

Assume a service request

<House>
  <Tools>
    <Electric>
      <Longitude>32.3</Longitude>
      <Latitude>6.3</Latitude>
    </Electric>
  </Tools>
</House>

With this response

<ElectricResult>
  <response> 00 | Open successful</response>
</ElectricResult>
interface Position {
  long: number;
  lat: number;
}

class MyService extends AutoService {
  openMyFridge(pos: Position) {
    return this.callFormatted(
      false,
      {
        Longitude: pos.long,
        Latitude: pos.lat
      },
      "House",
      "Tools",
      "Electric"
    );
  }
}
  • Method callEmbedded doesn't try to check for a status/error code
  • Method call returns the method without parsing anything

/@random-guys/lux/

    Package Sidebar

    Install

    npm i @random-guys/lux

    Weekly Downloads

    1

    Version

    4.2.0

    License

    ISC

    Unpacked Size

    27.3 kB

    Total Files

    22

    Last publish

    Collaborators

    • random-guys