girni/faceit-php

A PHP client library for accessing Faceit API

dev-master 2019-12-23 23:34 UTC

This package is auto-updated.

Last update: 2024-09-19 22:26:24 UTC


README

A PHP client library for accessing Faceit API

Installation by Composer

Run

composer require girni/faceit-php

in console to install this library.

Usage

First, you need to initialize the Credentials and Client objects.

Load library and set up credentials

use Girni\Faceit\Faceit;
use Girni\Faceit\Config\Credentials;
use GuzzleHttp\Client;

$client = new Faceit(new Client(), new Credentials('api-key'));

Get Player By Nickname

$player = $client->getPlayerByNickname('neo');

Params

  • nickname

Return

Girni\Faceit\Model\Player instance;

Get Player Stats

$player = $client->getPlayerStats('d683100c-1452-47cc-af4a-b66efea476b0');

Params

  • player id

Return

Girni\Faceit\Model\PlayerStats instance;

Get Player Matches

$player = $client->getPlayerMatches('d683100c-1452-47cc-af4a-b66efea476b0', 30);

Params

  • player id
  • limit (default 30)

Return

Girni\Faceit\Model\PlayerMatches instance;

Authors

  • Adrian Affek - in

License

This project is licensed under the MIT License.