Kind: global class
Properties
Name | Type | Description |
---|---|---|
servers | Array.<Object> |
List of Steam servers. You can set this property to use your own up-to-date list of servers. Remark: This property can be only set before calling init method. |
Main Vapor class.
Instance of this class is never created manually.
Example
var vapor = require('vapor');
var bot = vapor();
Initializes Vapor instance.
This method is chainable.
Config properties:
-
username
- username used for logging in -
password
- password used for logging in -
loginKey
- can be used in place of password, seeloginKey
event -
rememberPassword
- iftrue
,loginKey
event will be emitted -
logonID
- unique number that identifies this login, defaults to0
- Supplying different number for each Vapor client allows you to use the same
account with multiple Vapor instances. Internally, this property maps to
obfustucated_private_ip
when logging in.
- Supplying different number for each Vapor client allows you to use the same
account with multiple Vapor instances. Internally, this property maps to
-
displayName
[1] - this is the name everyone else sees -
state
[1] - initial online state -
admins
[2] - array of SteamID64 strings -
[1] Deprecated: use built-in plugin
presence
-
[2] Deprecated: use built-in plugin
admins
Only username
and password
/loginKey
are required. See 'helper.js' for defaults.
Kind: instance method of Vapor
Param | Type | Description |
---|---|---|
config | Object |
Configuration object. |
Example
var config = {
username: 'myUsername',
password: 'myPassword',
displayName: 'Vapor Bot',
state: 'Online',
admins: [ '7656123456', '7656987654' ]
};
bot.init(config);
Use Vapor plugin.
You can either specify a built-in plugin or use a custom plugin.
This method is chainable.
Kind: instance method of Vapor
Param | Type | Description |
---|---|---|
plugin | Object |
Plugin object. |
data | * |
Extra data passed to VaporAPI. Use object for multiple values. |
Connects Vapor to Steam network.
You can provide optional authentication codes.
Kind: instance method of Vapor
Param | Type | Description |
---|---|---|
codes | Object |
Optional object with authentication codes. |
codes.authCode | string |
Auth code received by e-mail. |
codes.twoFactorCode | string |
Auth code from mobile app. |
Disconnects Vapor from Steam network.
Kind: instance method of Vapor