library php-pubg
PUBG API wrapper written in PHP 7.1
lifeformwp/php-pubg
PUBG API wrapper written in PHP 7.1
- Thursday, July 12, 2018
- by Lifeformwp
- Repository
- 1 Watchers
- 5 Stars
- 63 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 2 Forks
- 0 Open issues
- 10 Versions
- 97 % Grown
PHPPUBG - wrapper for PUBG Developer API
, (*1)
Wrapper for PUBG API with DTO (Matches, Player/Players, Status, Telemetry, Samples), full test coverage, PHP 7.1, etc., (*2)
Requirements
Installation
- run
composer require lifeformwp/php-pubg
Basic usage
$client = new GuzzleHttp\Client();
$class = new \Lifeformwp\PHPPUBG\PUBGManager($client, 'token');
$data = $class->getMatch('pc-eu', 'abe08f7e-3add-4fd6-9bcd-4aff88fc7adf'); //returns array
$matchObject = $class->hydrate($data, \Lifeformwp\PHPPUBG\PUBGManager::HYDRATE_MATCH); //returns Lifeformwp\PHPPUBG\DTO\Match object
Available methods
- getMatch([string, required]shard, [string, required]matchId) - returns array of data about match
- getPlayers([string, required]shard, [array, not required]playerNames, [array, not required]playerIds) - returns array of data about players
- getPlayer([string, required]shard, [string, required]playerId) - returns array of data about player
- getTelemetry([string, required]shard, [string, required]matchId) - returns array of telemetry data from the match
- getStatus() - returns array of data about API status
- getSamples([string, required]shard) - returns array of sample data
- getSeasons([string, required]shard) - returns array of seasons data
- getSeasonDataForPlayer([string, required]shard, [string, required]playerId, [string, required]seasonId) - returns array of season data for player
- getTournaments() - returns array of data about tournaments
- getTournament([string, required]tournamentId) - returns array of data about tournament
-
getLeaderboard([string, required]shard, [string, required]gameMode) - returns array of data about leaderboard, (*3)
-
getMatches([string, required]shard, [array, required]matchesIds) - returns array of arrays about matches, (*4)
- getTelemetryByMatch([string, required]telemetryUrl) - returns array of data according to given telemetry url
- setClient([ClientInterface, required]client)
-
setToken([string, required]token), (*5)
-
hydrate([array, required]data, [string, required]type) - returns object from given array, possible values for type parameter are: HYDRATE_MATCH, HYDRATE_PLAYERS, HYDRATE_PLAYER, HYDRATE_STATUS, HYDRATE_TELEMETRY and HYDRATE_SAMPLES, (*6)
WIP
- Documentation
- More flexible behaviour
dev-master
9999999-dev
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.6.0
1.6.0.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
dev-dev-1.6.0
dev-dev-1.6.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
dev-dev
dev-dev
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.5.0
1.5.0.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.4.0
1.4.0.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.3.0
1.3.0.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.2.1
1.2.1.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.2.0
1.2.0.0
PUBG API wrapper written in PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
wrapper
php7
pubg
1.1.0
1.1.0.0
PUBG API facade written with PHP 7.1
Sources
Download
MIT
The Requires
The Development Requires
by
Serhii Kondratiuk
facade
pubg