svilborg/guzzle-encoding-com

Encoding.com XML API 的 PHP 库

v0.3.0 2013-08-21 09:03 UTC

This package is auto-updated.

Last update: 2024-08-29 04:25:22 UTC


README

Build Status Latest Stable Version Latest Unstable Version

A Guzzle 客户端用于 Encoding.com 的 XML API . (注意:非官方)

安装

使用 composer 安装

{
    "require" : "svilborg/guzzle-encoding-com"
}

要求

用法

use Gencoding\Guzzle\Encoding\EncodingClient;

$client = EncodingClient::factory(array(
	'userid' => '12345',
	'userkey' => 'X1Y2Z3A4B5C6'));

$command = $client->getCommand('GetMediaInfo', array(
	"mediaid" => 8888888888
));

try {
    $result = $command->getResult();

	$resultObject = $result->getXmlElement();

} catch (\Exception $e) {
	// Catch Errors
}

运行测试

首先,使用 composer.phar install --dev 安装 PHPUnit,然后运行 ./vendor/bin/phpunit.