ddd90/hapi

Harvest API 的 PHP 封装库

0.1 2015-01-13 21:22 UTC

This package is auto-updated.

Last update: 2024-09-25 02:08:12 UTC


README

Harvest API 的 PHP 封装库。

使用方法

<?php
require __DIR__ . '/vendor/autoload.php';

$api = new Harvest\HarvestApi();
$api->setUser('your@email.com');
$api->setPassword('password');
$api->setAccount('account');

$result = $api->getClient(12345);

运行测试

默认情况下,测试包括一些实时的 API 调用。为了使其工作,您需要创建本地副本 harvest_api_config.json,方法是将提供的 harvest_api_config.json.dist 进行复制,并提供自己的 Harvest 账户凭据。

为了排除需要有效 Harvest 账户和网络连接的测试,请按以下方式调用测试运行器

phpunit --exclude-group=internet

许可证

Hapi 在 GPL-3 许可证下授权 - 详细信息请参阅 LICENSE 文件

致谢

本库的版本是使用 composer 和适当的 PSR-0 标准进行自动加载的重写。原始版本由 Matthew John Denton 编写,可以从 http://labs.mdbitz.com/harvest-api 下载

提交错误报告和功能请求

由于这是一个重写,库的某些部分可能尚未或不再工作。错误报告和功能请求在 GitHub 上跟踪