-
Notifications
You must be signed in to change notification settings - Fork 0
client
hannsolo edited this page May 6, 2020
·
2 revisions
This is the top-level class providing access to the promise based API and allows you to create an instance of the queue class to use the queue API.
const client = new FSIServerClient( host:string );
- host: protocol and host name to access FSI Server, e.g. "https://fsi.yourDomain.tld"
const FSIServerClient = require("@neptunelabs/fsi-server-api-client").FSIServerClient;
const client = new FSIServerClient('https://my.fsi-server.tld');
client.login("user", "password")
.then( () => {
client.logout()
.catch(console.error);
})
.catch(console.error);
Example: Using the Queue API
const FSIServerClient = require("@neptunelabs/fsi-server-api-client").FSIServerClient;
const client = new FSIServerClient('https://my.fsi-server.tld');
client.setLogLevel(FSIServerClient.LogLevel.info)
const queue = client.createQueue({continueOnError:false});
queue.login("user", "password");
queue.logout();
// the following line actually starts the execution
queue.runWithResult();
Documentation
-
Interfaces