Pubj
A Java wrapper for the TRN PUBG REST API.
Install / Use
/learn @thatscloud/PubjREADME
pubj
A Java wrapper for the TRN PUBG REST API.
Prerequisites
This API requires a key. Visit the TRN PUBG REST API page to generate a key.
Obtaining the Library
The library is currently available on jcenter and Maven Central.
Gradle
compile 'org.thatscloud:pubj:0.1.0'
Maven
<dependency>
<groupId>org.thatscloud</groupId>
<artifactId>pubj</artifactId>
<version>0.1.0</version>
<type>pom</type>
</dependency>
Sample Code
Lookup a player
import org.thatscloud.pubj.Pubg;
import org.thatscloud.pubj.rest.model.Player;
...
final String apiKey = "MY-TRN-API-KEY";
try( final Pubg pubg = new Pubg( apiKey ) )
{
final Player player = pubg.getPlayer( playerName );
}
Get match statistics
import static org.thatscloud.pubj.rest.model.constant.Mode.SOLO;
import static org.thatscloud.pubj.rest.model.constant.Region.AGGREGATE;
import static org.thatscloud.pubj.rest.model.constant.StatField.KILLS;
import org.thatscloud.pubj.rest.model.RegionSeasonModeStatsKey;
...
final Player player = ...
final long kills =
player.getStats()
.get( new RegionSeasonModeStatsKey( AGGREGATE, "2017-pre5", SOLO ) )
.getStats()
.get( KILLS )
.getValueInt();
Rate limiting
Use no more than one org.thatscloud.pubj.Pubg instance per application. This will ensure that
the rate limiting imposed by TRN is respected.
Building
To build the library, execute the following command in the root directory in *nix:
./gradlew build
In Windows:
gradlew.bat build
The output is located under the build/libs directory.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
