This repository has been archived by the owner on Jun 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #464 from Arcana/dev
5.0.0 Release
- Loading branch information
Showing
29 changed files
with
3,047 additions
and
1,091 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,19 @@ | ||
files: | ||
- index.js | ||
dir: handlers | ||
- handlers/cache.js | ||
- handlers/chat.js | ||
- handlers/community.js | ||
- handlers/custom.js | ||
- handlers/fantasy.js | ||
- handlers/general.js | ||
- handlers/helper.js | ||
- handlers/inventory.js | ||
- handlers/leagues.js | ||
- handlers/lobbies.js | ||
- handlers/match.js | ||
- handlers/parties.js | ||
- handlers/sourcetv.js | ||
- handlers/team.js | ||
packageJson: package.json | ||
branches: | ||
- doc | ||
- staging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ test | |
sentry | ||
servers | ||
*.log | ||
update_proto.sh | ||
update_proto.sh | ||
*.hbs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "7.2.0" | ||
- "6.9.1" | ||
- "7.6.0" | ||
- "6.10.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Changelog | ||
## General | ||
* examples will no longer be pushed to npm | ||
|
||
## Dependency changes | ||
* Deleted the dependency on bignumber.js and replaced it by Long.js since protobufjs uses it. | ||
|
||
## API changes | ||
### Methods | ||
#### ToSteamID | ||
Now returns a Long value instead of a string. | ||
|
||
#### sendMessage | ||
Order of the parameters has changed to `(message, channel_name, channel_type)`. | ||
|
||
#### rollDice | ||
Order of the parameters has changed to `(min, max, channel_name, channel_type)`. | ||
|
||
#### ServerRegion | ||
This enum used to be defined both on module level and as a member of Dota2Client. | ||
We removed the member definition and only kept the module level one, | ||
in correspondence with all other enums. | ||
|
||
#### setItemPositions | ||
Changed the parameter type from an array of tuples to an array of objects | ||
|
||
#### createPracticeLobby | ||
Changed parameters to `(options, callback)` to reduce confusion. CreateTournamentLobby is now deprecated. | ||
|
||
### Events | ||
#### matchesData | ||
Event parameters are now `(request_id, total_results, results_remaining, matches, series)` | ||
|
||
#### practiceLobbyListData | ||
Removed the null parameter | ||
|
||
#### friendPracticeLobbyListData | ||
Removed the null parameter | ||
|
||
## Deprecation | ||
There's a whole series of functions for which the GC hasn't responded in a long time. | ||
Some of those were already deprecated since the last release, some of them have become deprecated since. | ||
Those who were already deprecated for a long time have been deleted from the API. | ||
Those who have become deprecated since the last release have been tagged deprecated. | ||
|
||
Deprecated methods will no longer figure in the documentation (mainly because they're | ||
now auto-magically generated based on the code comments and I really don't feel | ||
like adding copious amounts of documentation to a bunch of methods who no longer | ||
can be used - shoot me). If they were one day to be re-enabled by Valve, these | ||
will ofcourse be documented again. | ||
|
||
### Deleted methods | ||
* requestProfile | ||
* requestPassportData | ||
* requestTeamProfile | ||
* requestTeamMemberProfile | ||
* requestTeamIDByName | ||
|
||
### Deleted events | ||
* profileData | ||
* passportData | ||
* teamProfile | ||
* teamID | ||
|
||
### Deprecated methods | ||
* requestProTeamList | ||
* requestGuildData | ||
* inviteToGuild | ||
* cancelInviteToGuild | ||
* setGuildAccountRole | ||
|
||
### Deprecated events | ||
* guildOpenPartyData | ||
* guildData | ||
* guildInviteData | ||
* proTeamListData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
node-dota2 | ||
======== | ||
|
||
[![NPM version](https://img.shields.io/npm/v/dota2.svg)](https://npmjs.org/package/dota2 "View this project on NPM") | ||
[![Build Status](https://img.shields.io/travis/Arcana/node-dota2.svg)](https://travis-ci.org/Arcana/node-dota2 "View this project's build information") | ||
[![Dependency Status](https://img.shields.io/david/Arcana/node-dota2.svg)](https://david-dm.org/Arcana/node-dota2 "Check this project's dependencies") | ||
|
||
A node-steam plugin for Dota 2, consider it in alpha state. | ||
|
||
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. | ||
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. | ||
It is now easier to implement new functionality than it was back when this blog was written. | ||
|
||
## Installation and setup | ||
* `npm install` in the repository root | ||
* Copy `config.js.example` to `config.js` and edit appropriately | ||
* Run the example script: `node example.js` | ||
* If you receive Error 63 you need to provide a Steam Guard code by setting the Steam Guard code in `config.js` and launching again. | ||
* Make sure to use at least version 4.4.5 of node js | ||
|
||
## Initializing | ||
Parameters: | ||
* `steamClient` - Pass a SteamClient instance to use to send & receive GC messages. | ||
* `debug` - A boolean noting whether to print information about operations to console. | ||
* `debugMore` - A boolean noting whether to print extended debug information. Activating this will log messages for each proto message exchanged with the GC. | ||
|
||
```js | ||
var Steam = require('steam'), | ||
steamClient = new Steam.SteamClient(), | ||
dota2 = require('dota2'), | ||
Dota2 = new dota2.Dota2Client(steamClient, true, false); | ||
``` | ||
|
||
## Disclaimer | ||
We do not in any way encourage people to use their own accounts when using this library. | ||
This library tries to mimic the behavior of the Dota 2 client to allow people to programmatically interact with the Dota 2 GC, | ||
however we make no efforts to hide this fact and it's pretty easy for Valve to detect clients using this library based on the generated traffic. | ||
While Valve has not yet expressed a dislike regarding reverse engineering projects like this one, | ||
it's not unimaginable that this might one day change and result in VAC bans. | ||
|
||
## Examples | ||
The `examples` directory contains two Dota2 bots as an example. One contains commented-out dota2 methods, the other has boolean activated methods. | ||
Both examples show how to interact with the library. | ||
|
||
## Testing | ||
There is a partial automated test suite for node-dota2, which is located in the test directory. | ||
You need to configure the `STEAM_USERNAME` and `STEAM_PASSWORD` environment variables to be able to run it. | ||
You can launch the tests by running the file with mocha. | ||
|
||
# API | ||
The API doc can be consulted here or at [doclets.io](https://doclets.io/Arcana/node-dota2) | ||
{{>main}} |
Oops, something went wrong.