2017 © Pedro PelĂĄez
 

library mtxserv-php

The mTxServ API makes it easy for developers to communicate with your game/voice/hosting products

image

mtxserv/mtxserv-php

The mTxServ API makes it easy for developers to communicate with your game/voice/hosting products

  • Friday, April 17, 2015
  • by sdieunidou
  • Repository
  • 5 Watchers
  • 6 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

mTxServ SDK for PHP

Build Status SensioLabsInsight Scrutinizer Scrutinizer Coverage, (*1)

The mTxServ SDK for PHP enables PHP developers to easily integrate our API into your applications., (*2)

NOTE: This library is under heavy development and a lot of calls haven't been implemented yet. We're looking forward to any of your PR's., (*3)

Installation

We recommend Composer for managing dependencies. Installing is as easy as:, (*4)

$ composer require mtxserv/mtxserv-php

Usage

Authorization with OAuth

<?php

$client = \Mtxserv\Client::factory(array(
    'client_id'     => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'api_key'       => 'YOUR_API_KEY'
));

Get products

<?php

$client = \Mtxserv\Client::factory(array(
    'client_id'     => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'api_key'       => 'YOUR_API_KEY'
));

$products = $client->getProducts(); 
var_dump($products);

Get product

<?php

$client = \Mtxserv\Client::factory(array(
    'client_id'     => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'api_key'       => 'YOUR_API_KEY'
));

$product = $client->getProduct(array(
    'id' => 1337 # required (productId)
)); 
var_dump($product);

Get game viewer

<?php

$client = \Mtxserv\Client::factory(array(
    'client_id'     => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'api_key'       => 'YOUR_API_KEY'
));

$viewer = $client->getGameViewer(array(
    'type' => 'GAME_SERVER_TYPE', # ex: minecraft
    'ip'   => 'GAME_SERVER_IP',
    'port' => GAME_SERVER_PORT
)); 

var_dump($viewer);

Get admins

<?php

$client = \Mtxserv\Client::factory(array(
    'client_id'     => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'api_key'       => 'YOUR_API_KEY'
));

$administrators = $client->getAdmins(array(
    'id' => 1337 # required (productId)
)); 
var_dump($administrators);

The Versions

17/04 2015

dev-master

9999999-dev

The mTxServ API makes it easy for developers to communicate with your game/voice/hosting products

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sébastien DIEUNIDOU

api minecraft mtxserv