Skip to content

Releases: martinsileno/pubg-typescript-api

v1.6.0: support for PUBG API at v7.7.0

09 Dec 10:52
Compare
Choose a tag to compare

Thanks again to @Tdortiz for his PR, this release brings parity with PUBG API v7.7.0.

For details, read PR #16

v1.5.1: Add typing for seasonState attribute

05 Oct 16:09
298ae4a
Compare
Choose a tag to compare

Add typing for seasonState attribute

v1.5.0: Support for PUBG API version 6.0.0

02 Oct 21:15
40265bf
Compare
Choose a tag to compare

This version brings support for PUBG API version 6.0.0, due to be released in a few hours.

👍 All credits go to @Tdortiz for his PR #13.


For a full changelog please visit PUBG docs.

The most important thing to note is that if you previously were using killPoints, killPointsDelta, winPoints, winPointsDelta, these will now be undefined on PC.

PC will now switch to rank-based attributes, such as: bestRankPoints, dailyWins, rankPoints, weeklyWins.

v1.4.1: Fix telemetry parsing crash

09 Aug 19:47
a39b854
Compare
Choose a tag to compare

Fix two possible crashes when parsing telemetry data due to unexpectedly undefined values in some events (see issue #9).

v1.4.0: support for PUBG API @ v1.5.0

01 Jul 09:24
5354300
Compare
Choose a tag to compare

This release brings the library up to date with the latest changes on PUBG API (v1.5.0).

New data

  • New telemetry event LogSwimStart
  • New telemetry event LogSwimEnd
  • New telemetry event LogArmorDestroy
  • New telemetry event LogPlayerMakeGroggy
  • New telemetry event LogPlayerRevive
  • New telemetry event LogWheelDestroy
  • Add swimDistance to participants
  • Add rideDistance and seatIndex to LogVehicleLeave telemetry event
  • Add seatIndex to LogVehicleRide telemetry event
  • Add isCustomMatch to match attributes
  • Add isCustomGame and isEventMode to LogMatchStart telemetry event

Removed data

This may be a breaking change if you used these fields...

  • Remove _V from telemetry events
  • Remove mapName and matchId from telemetry events (they are still available in LogMatchStart and LogMatchDefinition telemetry events)

v1.3.1

23 May 19:10
9aefc35
Compare
Choose a tag to compare

When initializing PubgAPI, the useGzip flag (third argument) now defaults to false.

This is because browsers must NOT set that flag to true as it is handled automatically.

See #6 for more details.

Player Season Stats

01 May 21:02
e5d8513
Compare
Choose a tag to compare

This release adds support for the new aggregated player stats by season.

Season

Retrieve season IDs using the Season.list static method, the argument is, as always, the PubgAPI instance.

const seasonsList = await Season.list(api);

Once you have a season ID, you can use it to query player stats.

PlayerSeason

Use PlayerSeason.get(api, PLAYER_ID, SEASON_ID) to retrieve stats for a player in a season.

Returned object will contain:

  • solo FPP stats
  • solo FPP list of match IDs
  • solo TPP stats
  • solo TPP list of match IDs
  • duo FPP stats
  • duo FPP list of match IDs
  • duo TPP stats
  • duo TPP list of match IDs
  • squad FPP stats
  • squad FPP list of match IDs
  • squad TPP stats
  • squad TPP list of match IDs

Stats objects contain stats like kills, assists, revives and many more. For a complete list, see the GameModeStats class.

Telemetry support

29 Apr 12:30
3c59f03
Compare
Choose a tag to compare

Added support for parsing telemetry data.

Changed

Match

  • [feature] add .getTelemetry(api) to return the corresponding Telemetry object
  • [fix] .asset cannot be undefined

New

TelemetryPubgAPI

Used to make telemetry requests to the API. Should not be used directly, as telemetry objects for a Match can be returned using getTelemetry.

Telemetry

This object contains one list for each possible telemetry event, such as:

  • care package landing and spawn
  • item attach, detach, drop, equip, pickup, unequip, use
  • match definition, end, start
  • player attack, create, kill, login, logout, position, take damage
  • vehicle destroy, leave, ride

See each class in /src/entities/telemetry/events for details on their content.

v1.1.0

26 Apr 21:48
fd7b606
Compare
Choose a tag to compare
  • Add support for Samples endpoint

To use it, just call the static method get() on the new Sample class. The method accepts an optional date as first argument.

const sample = await Sample.get(api);
const matchIds = sample.matchIds;
  • Add getWinners() method to match objects to, obviously, return winner(s) of the match

v1.0.0 release

25 Apr 10:37
c4ae112
Compare
Choose a tag to compare

v1.0.0: first stable release

Usage has (almost) completely changed: everything is now based on Entities, classes that roughly correspond to the API resources (like Player, Match, etc.).

Entities

Entities are instantiated by calling their static methods, such as Match.get(...) to get a Match entity by ID or Player.filterByName(...) to get a list of Players by name.

They contain most attributes from the API as their fields, in addition to other helpful fields (like .totalDistance = this._walkDistance + this._rideDistance).

Entity instances are related to each other, for example a Match has .participants and .rosters, lists of other Entities (Participant and Roster). This makes it easier to navigate a Match object, searching for Participants inside it etc.