2017 © Pedro Peláez
 

library pubgapi

A PUBG Developer API Wrapper for PHP and Laravel

image

rkmaier/pubgapi

A PUBG Developer API Wrapper for PHP and Laravel

  • Saturday, June 23, 2018
  • by rkmaier
  • Repository
  • 1 Watchers
  • 5 Stars
  • 53 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 83 % Grown

The README.md

A PHP Wrapper for the Official PUBG Dev API

Total Downloads License, (*1)

Installation

composer require rkmaier/pubgapi, (*2)

Laravel 5.5+ Integration

Laravel Pacakage discovery should take care of it, (*3)

Laravel 5.* Integration

Add the service provider to your config/app.php file:, (*4)


'providers' => array( //... Rkmaier\Pubgapi\PubgApiService::class, ),

Add the facade to your config/app.php file:, (*5)


'aliases' => array( //... 'PubgApi' => Rkmaier\Pubgapi\Facades\PubgApi::class, ),

Publish config file

php artisan vendor:publish, (*6)

Edit config file


return [ 'api_url'=>'https://api.playbattlegrounds.com/shards/', 'region' => 'pc-eu', 'access_token' =>'', ];

Laravel

Get API Status
PubgApi::status()
Set Region
PubgApi::region('pc-na')
Filter by Player Names
PubgApi::region('pc-na')->players('shroud')->get();
Get Player Info
PubgApi::region('pc-eu')->player('<PLAYER_ID>')->get();

```php PubgApi::region('pc-eu')->player('<PLAYER_NAME')->get();, (*7)

###### Get Seasons

```php
PubgApi::region('pc-eu')->seasons()->get();
Get Player Stats
PubgApi::region('pc-eu')->playerStats('<PLAYER_NAME')->get;
PubgApi::region('pc-eu')->playerStats('<PLAYER_NAME')->get(); // Current Season by default 
PubgApi::region('pc-eu')->playerStats('<PLAYER_NAME','SEASON_ID')->get;
PubgApi::region('pc-eu')->playerStats('<PLAYER_NAME')->stat('duo-fpp');
PubgApi::region('pc-eu')->playerStats('<PLAYER_NAME','<SEASON_ID>')->stat('duo-fpp');
Get Player Match IDs
PubgApi::region('pc-eu')->player('<PLAYER_NAME')->matches();
Filter by Match ID
PubgApi::region('pc-eu')->match('<MATCH_ID>')->get();
Pagination
PubgApi::region('pc-eu')->players('<PLAYER_ID1>','<PLAYER_ID2>','<PLAYER_ID3>')->limit(1)->offset(2)->get();

PHP without Laravel


require_once 'vendor/autoload.php'; $data['access_token'] = '<YOUR PUBG DEV ACCESS TOKEN>'; $pubgAPi = new \Rkmaier\Pubgapi\PubgApiService($data); $pubgAPi->region('pc-eu')->players('rkmaier,molnarz,Istvan92,zuuup,Aigialeusz')->get());

License

Pubgapi is licensed under the MIT License., (*8)

Copyright 2018 Erik Maier, (*9)

The Versions

23/06 2018

dev-dev

dev-dev

A PUBG Developer API Wrapper for PHP and Laravel

  Sources   Download

MIT

The Requires

 

by Erik Maier

23/06 2018

dev-master

9999999-dev

A PUBG Developer API Wrapper for PHP and Laravel

  Sources   Download

MIT

The Requires

 

by Erik Maier

23/06 2018

0.2.6

0.2.6.0

A PUBG Developer API Wrapper for PHP and Laravel

  Sources   Download

MIT

The Requires

 

by Erik Maier

10/04 2018

0.2.3

0.2.3.0

A PUBG Developer API Wrapper for PHP and Laravel

  Sources   Download

MIT

The Requires

 

by Erik Maier

10/04 2018

0.2.2

0.2.2.0

A PUBG Developer API Wrapper for PHP and Laravel

  Sources   Download

MIT

The Requires

 

by Erik Maier

10/04 2018

0.2.1

0.2.1.0

A PUBG Developer API Wrapper for PHP and Laravel

  Sources   Download

MIT

The Requires

 

by Erik Maier