You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a tiny node.js module which allows user to extend [node-steam](https://github.com/seishun/node-steam)to support group functions. This module therefore fully depends on [node-steam](https://github.com/seishun/node-steam).
6
+
This is a tiny node.js module which provides custom [node-steam](https://github.com/seishun/node-steam)handler for group functions.
7
7
8
8
# Installation
9
9
@@ -13,54 +13,59 @@ npm install steam-groups
13
13
14
14
# Usage
15
15
16
-
Firstly, require `steam` module ...
16
+
Firstly, require `steam`as well as `steam-groups`module ...
17
17
18
18
```js
19
19
var Steam =require('steam');
20
+
var SteamGroups =require('steam-groups');
20
21
```
21
22
22
-
After that, simply extend `Steam` variable with `steam-groups` ...
23
+
After that, instantiate SteamGroups by providing the Steam client instance as a constructor parameter ...
23
24
24
25
```js
25
-
require('steam-groups')(Steam);
26
+
var client =newSteam.SteamClient();
27
+
var steamGroups =newSteamGroups(client);
26
28
```
27
29
28
30
That's it. You can now use additional group functions.
Decline group invite. This can be used in conjunction with `node-steam`'s `group` event.
42
+
Accept or decline an invite to join group `steamIdGroup`. `response` is a `boolean` value. This can be used in conjunction with `node-steam`'s `group` event.
45
43
46
44
# Example
47
45
48
46
```js
49
-
// Require node-steam first
47
+
// Require node-steam and node-steam-groups first
50
48
var Steam =require('steam');
49
+
var SteamGroups =require('steam-groups');
51
50
52
-
// Extend node-steam with group functions
53
-
require('steam-groups')(Steam);
54
-
55
-
// Create new SteamClient object
51
+
// Create new SteamClient object and pass it as a constructor param
0 commit comments