In-progress. Actively updated
This project started because I wanted to know how many bots were in the Pubg games I played. Upon seeing what the telemetry data looked like, I realized there were a lot of other statistics I could learn about, too.
As of July 2025, the PubgAPI-Java project has the following primary functionalities:
WHAT | HOW | WHERE | EXAMPLE OUTPUT |
---|---|---|---|
0: countBotsAndPeople | Manually | BotCounts.java | Screenshot |
1: calculateKillCounts | Manually | KillCounts.java | Screenshot |
2: printPlayersByTeam | JSON | MatchPlayers.java | Screenshot |
3: winnerWeapons | JSON | MatchWeapons.java | Screenshot |
4: ranking (of a specific person) | JSON | MatchRanking.java | Screenshot |
5: calculateKillCountsJSON | JSON | KillCountsJSON.java | Screenshot |
6: printMapsPlayed | JSON | MapManager.java, MatchManager.java | Screenshot |
- 0: None
- 1: "killCounts" - ambiguity in API's definition
- 2: Need to update calculation of team size
- 3: None
- 4: None
- 5: "killCounts" - ambiguity in API's definition
- 6: None
- Clone PubgAPI-Java/main to local device.
- Open project in Visual Studio Code (VSC).
- Go to the Pubg Developer Portal.
- Make an account.
- Request a free API key.
- Open project in VSC.
- In terminal, navigate to PubgAPI-Java.
- Create a local .env file.
- In the .env file, type "API_KEY = ", then paste the API key.
- In the .gitignore file, confirm ".env" is present.
- In terminal, type "./gradlew build" to build the build.gradle file.
- Close and reopen the project.
Prerequisite: Complete the "Prepare API Key" section.
To acquire new match data, run Main_API.java as follows:
- Open Main_API.java.
- See “API request = new API_Request(player, matchLimit)”. EX: (CoorsLatte, 15).
- Replace the player name if desired. Use an existing player.
- Replace the matchLimit if desired (recommended range: 1-15).
- In build.sh, uncomment “mainClass = ‘Main_API’. Comment out “mainClass = ‘Main’.
- In terminal, navigate to PubgAPI-Java.
- Type “./gradle clean build"
- Type “./gradlew run”
A "BUILD SUCCESSFUL" message means data collection is complete.
Data should be stored at requestsDir/< player >/< timestamp >/matches.
Example: requestsDir/Shrimzy/timestamp_1750557892980/matches
To analyze match data collected, run Main.java as follows:
- In build.sh, uncomment “mainClass = ‘Main’. Comment out “mainClass = ‘Main_API’.
- In terminal, navigate to PubgAPI-Java.
- Type “./gradle clean build"
- Type “./gradlew run”
- When prompted, enter the data storage location of the directory with files to analyze.
EX: "requestsDir/Shrimzy/timestamp_1750557892980/matches" - Choose a functionality to analyze the data with. EX: To countBotsAndPeople, type 0 and press enter.
- Wait for data collection to complete.
- To continue, type 'y' when prompted with "Any other requests? (y/n)".
- To exit, type 'n' when prompted with "Any other requests? (y/n)".
- The requestHistory.txt file should update to include recent analysis requests.
- How do I make an API request?
- What file(s) should I modify?
- What does it mean when a file is “ugly”, “pretty”, or becomes “prettified”?
- API.java //getAPIkey(), getAPIplatform()
- API_Request.java //getPlayer(), getConnection(), getTimestamp(), connectToAPI(URL url), storeResponseToSpecifiedFileLocation(String dstPath)
- Main_API.java //main. As of 17 Nov 2022, program runs from Main_API.java.
- FileManager.java //makePretty, storeFileAsString, getFile, writeToFileAndConsole
- JSONManager.java //getJSONObject, returnObject, returnMultipleObjects
- MapManager.java //printMapNames (and getMapName, dashed out because present in MatchManager.java)
- MatchManager.java //printMatchInfo, getMatchID, getPlayerPerspective, getMatchType,
- BotCounts.java //countBotsAndPeople(File prettyFile)
- KillCounts.java //printKillCountsToHistoryAndConsole, printKillCounts, calculateKillCounts
- KillCountsJSON.java //printKillCountsJSON, calculateKillCountsJSON
- Main.java //main, pseudoMain, getInfo, printOptionsToChooseFrom, initiateFunctionalities, getInput, getRequestType, getTeamSizeForOfficialMatch, weaponFrequencies, winnerWeapons, printPlayersByTeam, getMapName
- Ranking.java //ranking
- MapManager.java and MatchManager.java //printMapNames; MatchManager methods being reworked
- Request.java //getRequest, getTypes, getScopes, getRequest_type, getRequest_scope -- removed
- Efficient memory usage/storage
- Readability / simplicity
- Removal of unneeded code and/or comments
- Clarity with naming
- Brevity / clarity of commit messages
- Inclusion of dates when making updates
- Consistent organization of classes
- API request process
- Ease of API request --> project request transference (currently is unclear and likely labor-intensive for outside viewer)
- Current state of API requests is very limited in how the request can vary
- Comprehensiveness and speed of testcases
- Inclusion of more example files (with explanations for how to install/run the program, step-by-step)
- Inclusion of sample description of end-user personas
Note: Bob, you were very persistent. Resistance was futile. I'm sorry. 235e88c