2017 © Pedro Peláez
 

library gameye-sdk-php

Gameye SDK for PHP.

image

gameye/gameye-sdk-php

Gameye SDK for PHP.

  • Wednesday, March 28, 2018
  • by Smashmint
  • Repository
  • 3 Watchers
  • 1 Stars
  • 85 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 3 Open issues
  • 11 Versions
  • 8 % Grown

The README.md

Gameye SDK for PHP

Latest Stable Version Total Downloads License, (*1)

Create eSport and competitive matches for Counter-Strike: Global Offensive, Team Fortress 2, Left 4 Dead 2, Killing Floor 2, Insurgency and Day of Infamy for your platform without fixed monthly costs or any need for your own server infrastructure. Simply implement the Gameye API to kick off online matches when you need the, - you will even be able to implement the scores/statistics directly on your website. How cool is that!, (*2)

Requirements

To use the Gameye SDK, the following prerequisites need to be fulfilled:, (*3)

  • Obtain a free Gameye API key, please send us an email
  • Composer
  • PHP 5.6.4+ or newer
  • PHP cURL extension

Installation

The easiest way to install the Gameye SDK is to require it with Composer., (*4)

$ composer require gameye/gameye-sdk-php

{
    "require": {
        "gameye/gameye-sdk-php": "2.*"
    }
}

You may also git checkout or download all the files, and include the Gameye SDK client manually., (*5)

Getting started

  1. Use the Gameye SDK to create a match with your desired game-specific options. It's important to specify an unique ID in order to be able to retrieve the details when the match has been created., (*6)

  2. After the match has ended we will fire a GET request to your webhook to let you know the match is done., (*7)

Initialize the Gameye API client and set your API key., (*8)

$gameye = new \Gameye\SDK\GameyeClient([
            'AccessToken' => 'yourgameyeapitoken',
            'ApiEndpoint' => 'https://api.gameye.com',
        ]);

Create a match., (*9)

$gameye->commandStartMatch([
    'matchKey'     => 'yourmatchid',
    'locationKeys' => ['amsterdam'],
    'gameKey'      => 'csgo',
    'templateKey'  => 'esl1on1',
    'config'       => [
        'steamToken'  => 'yoursteamgameservertoken',
        'maxPlayers'  => 12,
        'maxRounds'   => 15,
        'tickRate'    => 128,
        'map'         => 'de_dust2',
        'mapgroup'     => 'mg_active',
        'teamNameOne' => 'Counter Terrorists',
        'teamNameTwo' => 'Terrorists'
    ],
    'endCallbackUrl' => 'https://platform.com/match?id=yourmatchid'
]);

After creating the match, the server details will be available via the queryMatch function. When the match has been ended we will make a GET request to your callback url so you can fetch the match results., (*10)

Create a match with a custom (Steam Workshop) map.
Remove the map parameter from the config array and add the following two parameters., (*11)

'config' => [
    'workshopMap' => 'workshopid',
    'authkey'     => 'yoursteamwebapikey'
],

You can find the id of a custom map at the end of a Steam Workshop URL., (*12)

Get a detailed list of all your active matches., (*13)

$gameye->queryMatch();

Stop a match., (*14)

$gameye->commandStopMatch([
    'matchKey' => $matchKey,
]);

Match results

When the match has been ended you can fetch the game scores and other statistics. You can pass a webhook URL when to create a match to get a notification when a match is done., (*15)

The following statistics are currently available for CS:GO, (*16)

Match statistics: - time started - time ended - rounds played, (*17)

Team statistics: - name - score - players, (*18)

Player statistics: - nickname - steam id - kills - assists - deaths, (*19)

First, import the Gameye Selector class., (*20)

use \Gameye\SDK\GameyeSelector;

Get the statistic state of a match., (*21)

$match = $gameye->queryStatistic($matchKey);

Get the teams that participated in a match., (*22)

GameyeSelector::selectTeamList($match);

Get a single team., (*23)

GameyeSelector::selectTeamItem($match, $teamKey);

Get all the players that participated in a match., (*24)

GameyeSelector::selectPlayerList($match);

Note: we only show players that were connected to the match when it ended. For example if a player leaves in the last round of a match, he won't included in the statistics., (*25)

Get all players from a team., (*26)

GameyeSelector::selectPlayerListForTeam($match, $teamKey);

Create a Steam Server Login Token

We made a helper function to make it easier for you to create a GSLT (Game Server Login Token) via the Steam WEB API. It is strongly recommended to create a fresh token for every match and delete the token after the match has ended. This is advisable because every Steam account is limited to a maximum of 1000 tokens. Passing a GSLT when starting a match is currently only required for CS:GO. For more information see the Steam website., (*27)

$steam = new \Gameye\SDK\SteamClient([
            'WebToken' => 'webtoken',
        ]);

$steam->GameServersService->CreateAccountV1($appid, $memo);

You can create a Steam Web API key on the Steam website., (*28)

The APP id that you should include for CS:GO is 730, (*29)

Contributing

We encourage everyone to help us improve our public packages. If you want to contribute please submit a pull request., (*30)

License

BSD (Berkeley Software Distribution) License. 2017 Gameye B.V., (*31)

Support

Contact: gameye.com — support@gameye.com, (*32)

The Versions

28/03 2018

dev-master

9999999-dev https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

27/03 2018

v2.1.0

2.1.0.0 https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

14/02 2018

dev-analysis-z3Dyv9

dev-analysis-z3Dyv9 https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

13/02 2018

dev-analysis-z9DZJm

dev-analysis-z9DZJm https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

13/02 2018

dev-analysis-zRZjkx

dev-analysis-zRZjkx https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

13/02 2018

v2.0.1

2.0.1.0 https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

13/02 2018

dev-develop

dev-develop https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

13/02 2018

dev-analysis-8bBLYM

dev-analysis-8bBLYM https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

13/02 2018

v2.0.0

2.0.0.0 https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

02/11 2017

dev-analysis-X02kEM

dev-analysis-X02kEM https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv

09/09 2017

v1.0.0

1.0.0.0 https://github.com/gameye/gameye-sdk-php

Gameye SDK for PHP.

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

by Gameye B.V.

api docker csgo tournaments gaming tf2 esport gameye counterstrike l4d2 kf2 gotv