loader.io api wrapper for nodejs. If you interested in this npm package, take a look at the npm package perst.
$ npm install loaderio
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const applications = await loaderIO.applications.list();
console.log(applications);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const application = await loaderIO.applications.create('xxx.xxx.de');
console.log(application);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const application = await loaderIO.applications.get('fd929d9f1211a7721233c297e804406b');
console.log(application);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const application = await loaderIO.applications.get('fd929d9f1211a7721233c297e804406b');
const result = await application.delete();
console.log(result);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const application = await loaderIO.applications.get('fd929d9f1211a7721233c297e804406b');
const result = await application.verify();
console.log(result);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const tests = await loaderIO.tests.list();
console.log(tests);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
import Test from './src/Tests/Test.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const test = await loaderIO.tests.create({
name: 'NPM Loader IO Test',
type: Test.TYPE.CLIENTS_PER_TEST,
duration: 60,
initial: 1,
total: 15,
callback_email: 'xxx@xxx.de',
urls: [{url: 'https://xxx.xxx.xx/api/v1/xxx'}]
});
console.log(test);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const test = await loaderIO.tests.get('9723cfd4ec75e536c3da09c52278a9eb');
console.log(test);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const test = await loaderIO.tests.get('9723cfd4ec75e536c3da09c52278a9eb');
const result = await test.run();
console.log(result);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const test = await loaderIO.tests.get('9723cfd4ec75e536c3da09c52278a9eb');
const result = await test.stop();
console.log(result);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const test = await loaderIO.tests.get('9723cfd4ec75e536c3da09c52278a9eb');
const results = await loaderIO.tests.results.list();
console.log(results);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const test = await loaderIO.tests.get('9723cfd4ec75e536c3da09c52278a9eb');
const result = await loaderIO.tests.results.get('e2844894902937962f506c23ef60860c');
console.log(result);
}
catch (error) {
console.error(error.message);
}
import LoaderIO from './src/index.js';
try {
const loaderIO = new LoaderIO('bb7cabe565ec0059b4fecbfa846b31ee');
const servers = await loaderIO.servers.list();
console.log(servers);
}
catch (error) {
console.error(error.message);
}