@pascaljp/soracom
v1.0.5
Published
Soracom API with TypeScript support, auto-generated from OpenAPI yaml file.
Downloads
9
Maintainers
Readme
@pascaljp/soracom
A library to provide TypeScript / JavaScript API to access Soracom APIs. Most of the code is auto generated from the openapi YAML file, so all APIs are supported. If there is any bug or if there is any API that is not supported by this library, please report the problem on GitHub.
Install
npm i -S @pascaljp/soracom
Usage example
import * as Soracom from "@pascaljp/soracom";
async function main() {
const configuration: Soracom.Configuration = await Soracom.GetSoracomConfiguration({
email: process.env.SORACOM_EMAIL,
password: process.env.SORACOM_PASSWORD,
});
try {
const simApi = new Soracom.SimApi(configuration);
const sims: Soracom.Sim[] = (await simApi.listSims()).data;
console.log(sims);
} catch (err) {
console.error(err);
}
}
main();