Methods
connect(opts, callback)
Create a session with LineRate
Parameters:
Name |
Type |
Description |
opts |
Object
|
The connection options object. Supported object properties:
Properties
Name |
Type |
Description |
host |
string
|
Hostname or IP address |
port |
integer
|
Port number |
username |
string
|
Username |
password |
string
|
Password |
|
callback |
function
|
|
- Source:
Example
connect({
host: '127.0.0.1',
port: 8443,
username: 'admin',
password: 'changeme'
}, function() {
// code here
});
get(opts, callback)
Initiate a GET request
Parameters:
Name |
Type |
Description |
opts |
Object
|
The connection options object. Supported object properties:
Properties
Name |
Type |
Description |
host |
string
|
Hostname or IP address |
port |
integer
|
Port number |
username |
string
|
Username |
password |
string
|
Password |
|
callback |
function
|
|
- Source:
Example
connect({
host: '127.0.0.1',
port: 8443,
username: 'admin',
password: 'changeme'
}, function() {
// code here
});