lifeformwp/php-pubg 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lifeformwp/php-pubg

Composer 安装命令:

composer require lifeformwp/php-pubg

包简介

PUBG API wrapper written in PHP 7.1

README 文档

README

Total Downloads

Wrapper for PUBG API with DTO (Matches, Player/Players, Status, Telemetry, Samples), full test coverage, PHP 7.1, etc.

Requirements

  • PHP >= 7.1

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

  • getMatches([string, required]shard, [array, required]matchesIds) - returns array of arrays about matches

  • getTelemetryByMatch([string, required]telemetryUrl) - returns array of data according to given telemetry url

  • setClient([ClientInterface, required]client)

  • setToken([string, required]token)

  • 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

WIP

  • Documentation
  • More flexible behaviour

统计信息

  • 总下载量: 2.36k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固