Giter Club home page Giter Club logo

pubg-php-api's Introduction

pubg-php-api

Latest Stable Version Total Downloads License

PlayerUnknown's Battlegrounds Php Api

Installing

Via composer

$ composer require samiaraboglu/pubg-php-api

Config

$config = new Pubg\Config();
$config->setApiKey('{API_KEY}');
$config->setPlatform('{PLATFORM}');

$api = new Pubg\Api($config);

Platform: kakao, psn, steam, tournament, xbox

Platform Region: pc-as, pc-eu, pc-jp, pc-kakao, pc-krjp, pc-na, pc-oc, pc-ru, pc-sa, pc-sea, pc-tournament, psn-as, psn-eu, psn-na, psn-oc, xbox-as, xbox-eu, xbox-na, xbox-oc, xbox-sa

Players

Use the player service.

$playerService = new Pubg\Player($api);

Get a single player by name or accound ID.

// by player name
$player = $playerService->get('{PLAYER_NAME}');

// by account id
$player = $playerService->get('{ACCOUNT_ID}');

Get a collection of up to 6 players by names or account IDs.

// by players names
$players = $playerService->getAll(['{PLAYER_NAME_1}', '{PLAYER_NAME_2}']);

// by accounts ids
$players = $playerService->getAll(['{ACCOUNT_ID_1}', '{ACCOUNT_ID_2}']);

Season Stats

Use the season service.

$seasonService = new Pubg\Season($api);

Get the list of available seasons.

$seasons = $seasonService->getAll();

Get season information for a single player.

$season = $seasonService->get('{ACCOUNT_ID}', '{SEASON_ID}');

Lifetime Stats

Use the lifetime service.

$lifetimeService = new Pubg\Lifetime($api);

Get lifetime stats for a single player.

$lifetime = $lifetimeService->get('{ACCOUNT_ID}');

Matches

Use the match service.

$matchService = new Pubg\Match($api);

Get a single match.

$match = $matchService->get('{MATCH_ID}');

Leaderboards

Use the leaderboard service.

$leaderboardService = new Pubg\Leaderboard($api);

Get the leaderboard for a game mode.

$leaderboards = $leaderboardService->get('{GAME_MODE}', {PAGE_NUMBER});

Game modes: duo, duo-fpp, solo, solo-fpp, squad, squad-fpp

Page numbers: 0, 1

Tournaments

Use the tournament service.

$tournamentService = new Pubg\Tournament($api);

Get the list of available tournaments.

$tournaments = $tournamentService->getAll();

Get information for a single tournament.

$tournament = $tournamentService->get('{TOURNAMENT_ID}');

Samples

Use the samples service.

$sampleService = new Pubg\Sample($api);

Get a list of sample matches.

$samples = $sampleService->get();

// date filter
$samples = $sampleService->get('2019-03-29T00:00:00Z');

pubg-php-api's People

Contributors

ncla avatar samiaraboglu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pubg-php-api's Issues

Match Keyword Conflict

Parse error: syntax error, unexpected token "match", expecting identifier in F:\xampp\htdocs\wordpress\wp-content\plugins\pubg-api\vendor\samiaraboglu\pubg-php-api\src\Match.php on line 8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.