maartenstaa/gameanalytics-php 问题修复 & 功能扩展

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

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

maartenstaa/gameanalytics-php

最新稳定版本:v2.0

Composer 安装命令:

composer require maartenstaa/gameanalytics-php

包简介

PHP wrapper for the GameAnalytics REST API.

README 文档

README

PHP wrapper for the GameAnalytics REST API.

Build Status Scrutinizer Code Quality Code Coverage

Installation

Using Composer, add the package to your require section.

{
	"require": {
		"maartenstaa/gameanalytics-php": "~2"
	}
}

This package requires you to select an HTTP client to be used. For more information, read the documentation.

Usage

First, create a client using the game key and associated secret key. The third parameter is the HTTP client you want to use. If you do not provide it, the package will try to auto-detect which one is available. The fourth and final parameter is the HTTP message factory you wish to use. Again, if you do not provide it, the package will try to auto-detect which is available.

use MaartenStaa\GameAnalytics\Client;

$client = new Client($gameKey, $secretKey);

Next, you can use the "init" and "event" functions on the client to get a message instance. Use the set() function to configure the required parameters (refer to the official documentation) and use send() to send the message. You will receive a PSR-7 response object.

$client->init()->set(array(...))->send();

$message = $client->event('user');
$message->set('foo', 'bar')
	->set('baz', 'bax')
	->send();

Contributing

Coding standard

All code is to follow the PSR-2 coding standard.

Unit tests

If you find a bug, feel free to send a pull request to fix it, but make sure to always include a regression test.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-10-09