承接 mtxserv/mtxserv-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

mtxserv/mtxserv-php

最新稳定版本:v1.0.2

Composer 安装命令:

composer require mtxserv/mtxserv-php

包简介

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

README 文档

README

Build Status SensioLabsInsight Scrutinizer Scrutinizer Coverage

The mTxServ SDK for PHP enables PHP developers to easily integrate our API into your applications.

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.

Installation

We recommend Composer for managing dependencies. Installing is as easy as:

$ 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);

统计信息

  • 总下载量: 44
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 6
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-17