Skip to content
This repository was archived by the owner on Mar 31, 2021. It is now read-only.

v1.0.0

Compare
Choose a tag to compare
@seishun seishun released this 17 Jul 17:17
· 37 commits to master since this release

node-steam is now modular, which allows third parties to provide modules with extra functionality. As a result, most of the API has been moved to handler classes which have to be instantiated separately from SteamClient.

Breaking changes

_Protobufs_

  • Protobuf fields are no longer converted to camelCase (e.g. playerName is now player_name).
  • IP addresses are no longer converted to strings. You could use ip.fromLong instead.
  • Timestamps are no longer converted to Date objects.

_Properties_

  • users moved to SteamFriends as personaStates.
  • chatRooms, friends and groups moved to SteamFriends as-is.

_Methods_

  • logOn reworked: you must now call SteamClient#connect, wait for 'connected', and then call SteamUser#logOn.
  • logOff renamed to disconnect.
  • webLogOn removed since Web API calls are outside of node-steam's scope. See #182 for a sample implementation.
  • gamesPlayed moved to SteamUser with reworked semantics.
  • setPersonaName, setPersonaState, sendMessage, addFriend, removeFriend, joinChat, leaveChat, lockChat, setModerated, kick, ban, unban, chatInvite, getSteamLevel, requestFriendData moved to SteamFriends.
  • trade, respondToTrade, cancelTrade moved to SteamTrading.
  • toGC moved to SteamGameCoordinator as send with reworked semantics. It no longer takes an appID argument and instead uses the AppID SteamGameCoordinator was instantiated with. Instead of a "type", it takes a header object (use {msg: type} instead of type, and {msg: type, proto: {}} instead of type | protoMask). Instead of extra arguments, it takes a callback, which will be called with any response instead of emitting 'message'.

_Events_

  • 'error' is now emitted whenever the connection is closed by Steam if the encryption handshake is complete. Use 'logOnResponse' to handle failed logon attempts and 'loggedOff' to handle bad logoffs.
  • 'loggedOn' removed and replaced with 'logOnResponse', which is emitted on any logon result.
  • 'webSessionID' removed because it was misleading and based on wrong assumptions. The "sessionid" cookie is just a CSRF token and can be an arbitrary string as long as it matches the session ID argument.
  • 'sentry' moved to SteamUser as 'updateMachineAuth'. It passes the whole protobuf (containing the full sentry file) rather than just a hash and no longer sends a response automatically. To accept it, SHA1 the sentry and call the provided callback with {sha_file: sha}.
  • 'loggedOff' is now emitted regardless of the logoff reason and is no longer emitted on disconnections. node-steam no longer reconnects you automatically – you have to reconnect yourself. It also doesn't disconnect you on logoff – you can either disconnect yourself, or wait for Steam to disconnect you (see 'error').
  • 'chatInvite', 'relationships', 'friend', 'group', 'friendMsg', 'chatMsg', 'mesage', 'chatEnter', 'chatStateChange' moved to SteamFriends.
  • 'user' moved to SteamFriends as 'personaState'.
  • 'richPresence' removed.
  • 'tradeOffers' moved to SteamUser.
  • 'tradeProposed', 'tradeResult', 'sessionStart' moved to SteamTrading.
  • 'announcements' removed, see 'clanState'.
  • 'fromGC' moved to SteamGameCoordinator as 'message' with reworked semantics. It no longer provides an appID argument, but is only emitted when the AppID matches the one SteamGameCoordinator was instantiated with. Instead of type, it provides a header object: header.msg is the "type" without protomask, header.proto is truthy if it's a proto message. It's no longer emitted if it's a response, instead the callback provided to send is called.

Fixes

  • Anonymous chats are now correctly stored in chatRooms.

Additions