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
{{ message }}
This repository was archived by the owner on Jun 11, 2022. It is now read-only.
Copy file name to clipboardexpand all lines: README.md
+100-24
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@ node-dota2
2
2
========
3
3
4
4
[](https://npmjs.org/package/dota2"View this project on NPM")
5
-
[](https://travis-ci.org/RJacksonm1/node-dota2"View this project's build information")
6
-
[](https://david-dm.org/RJacksonm1/node-dota2"Check this project's dependencies")
5
+
[](https://travis-ci.org/Arcana/node-dota2"View this project's build information")
6
+
[](https://david-dm.org/Arcana/node-dota2"Check this project's dependencies")
7
7
8
8
A node-steam plugin for Dota 2, consider it in alpha state.
9
9
10
-
Check out my blog post (my only blog post), [Extending node-dota2](https://blog.rjackson.me/extending-node-dota2/), for a rough overview of adding new functionality to the library.
10
+
Check out RJackson1's blog post (his only blog post), [Extending node-dota2](https://blog.rjackson.me/extending-node-dota2/), for a rough overview of adding new functionality to the library.
11
11
A fair warning, while the way you search for new functionality is still the same, quite a lot has changed (and been simplified) implementation wise.
12
12
It is now easier to implement new functionality than it was back when this blog was written.
13
13
14
14
## Upgrade guide
15
15
16
-
### `3.*.*` to `4.0.0`
16
+
### `3.*.*` to `4.*.0`
17
17
18
18
A few backwards incompatible API changes were included with version 4.0.0.
Requests the given player's match history. The responses are paginated, but you can use the `start_at_match_id` and `matches_requested` options to loop through them.
@@ -267,6 +283,13 @@ Sends a message to the Game Coordinator requesting one or multiple `account_ids`
267
283
268
284
Sends a message to the Game Coordinator requesting `account_id`'s trophy data. Provide a callback or listen for `trophyListData` event for Game Coordinator's response. Requires the GC to be ready (listen for the `ready` event before calling). Notably, this data contains the `profile_name` field, which is the user's name displayed on their profile page in dota.
269
285
286
+
#### requestPlayerStats(account_id, [callback])
287
+
*`account_id` - Account ID (lower 32-bits of a 64-bit Steam ID) of the user whose player stats you wish to view.
Sends a message to the Game Coordinator requesting `account_id`'s player stats. Provide a callback or listen for `playerStatsData` event for Game Coordinator's response. Requires the GC to be ready (listen for the `ready` event before calling). This data contains all stats shown on a player's profile page.
291
+
292
+
270
293
### Matches
271
294
#### requestMatches(criteria, [callback])
272
295
*`[criteria]` - The options available for searching matches:
@@ -311,9 +334,10 @@ Sends a message to the Game Coordinator requesting the top matches of your frien
311
334
312
335
### Parties
313
336
314
-
### respondPartyInvite(id, accept)
315
-
*`[id]` - Number, party ID.
316
-
*`[accept]` - Accept or decline the invite.
337
+
### respondPartyInvite(id, accept, [ping_data])
338
+
*`id` - Number, party ID.
339
+
*`accept` - Accept or decline the invite.
340
+
*`[ping_data]` - Optional argument to be provided when accepting a party invite. For contents see `CMsgClientPingData`.
317
341
318
342
Responds to an incoming party invite. The `PartyInvite` property is cleared after the response has been sent.
319
343
@@ -336,6 +360,12 @@ Kicks a player from the party. This will create a new party if you aren't in one
336
360
Set the bot's status as a coach.
337
361
338
362
363
+
### setPartyLeader(id)
364
+
*`[id]` - The steam ID of new party leader.
365
+
366
+
Set the new party leader.
367
+
368
+
339
369
### leaveParty()
340
370
341
371
Leaves the current party. See the `Party` property.
@@ -511,6 +541,11 @@ Emitted when the GC is ready to receive messages. Be careful not to declare ano
511
541
### `unready`
512
542
Emitted when the connection status to the GC changes, and renders the library unavailable to interact. You should clear any event handlers set in the `ready` event here, otherwise you'll have multiple handlers for each message every time a new `ready` event is sent.
513
543
544
+
### `popup` (`type`, `popup`)
545
+
*`type` - The type of the popup. See `CMsgDOTAPopup.PopupID`
546
+
*`popup` - The raw popup data
547
+
548
+
Generic popup, can be produced for a plethora of reasons.
@@ -680,6 +715,31 @@ Emitted when GC responds to the `requestPassportData` method.
680
715
681
716
See the [protobuf schema](https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/dota/dota_gcmessages_client_fantasy.proto#L961) for `passportData`'s object structure.
*`featuredPlayers` - Array of featured players for that week. `[{ account_id, heroId, averageScaledMetric, numGames }]`
@@ -714,7 +774,7 @@ See the [protobuf schema](https://github.com/SteamRE/SteamKit/blob/5acc8bb72bb7f
714
774
*`matchmakingStatsResponse` - Raw response object.
715
775
716
776
Emitted when te GC response to the `requestMatchmakingStats` method. The array order dictates which matchmaking groups the figure belongs to.
717
-
The groups are discoverable through `regions.txt` in Dota 2's game files. We maintain an indicative list *without guarantees* in this README.
777
+
The groups are discoverable through [regions.txt](https://github.com/SteamDatabase/GameTracking/blob/master/dota/game/dota/pak01_dir/scripts/regions.txt) in Dota 2's game files. We maintain an indicative list *without guarantees* in this README.
718
778
This list is manually updated only when changes are detected by community members, so it can be out of date.
719
779
Here are the groups at the time of this sentence being written (with unecessary data trimmed out):
720
780
@@ -738,7 +798,8 @@ Here are the groups at the time of this sentence being written (with unecessary
*`DOTA_GAMEMODE_ARDM: 20` - All Random Death Match
1023
+
*`DOTA_GAMEMODE_1V1MID: 21` - 1v1 Mid
1024
+
*`DOTA_GAMEMODE_ALL_DRAFT: 22` - All Draft a.k.a. ranked all pick
1025
+
1026
+
Use this to pass valid game mode data to `createPracticeLobby`. This enum is built-in the protobuf schema and can be referenced by `Dota2.DOTA_GameMode`.
0 commit comments