6by6/freeagent-php
Composer 安装命令:
composer require 6by6/freeagent-php
包简介
A wrapper for the freeagent API
README 文档
README
This is a PHP library that provides a comprehensive wrapper for the Freeagent v2 API.
Installation
You can install this library via Composer:
composer require 6by6/freeagent-php
Compatibility
We are currently testing against the following PHP versions:
- '5.6'
- '7.0'
- hhvm
- nightly
Unit Tests
Phpunit tests are provided with the library, however, we would strongly recommend NOT executing these against your live account. The tests require a clean account and part of the process involves deleting any data before starting i.e. everything about your business.
The test suite will attempt to ensure you are not using a live account before executing tests, however, we will not be held responsible for any loss of data.
If you're just getting started we would recommend using a sandbox account (obtainable via the Freeagent API Quickstart Guide).
Getting Started
Get a list of invoices
use SixBySix\Freeagent\OAuth\Api;
use SixBySix\Freeagent\Entity\EntityCollection;
use SixBySix\Freeagent\Entity\Invoice;
/** @var Api $api */
$api = new Api(
$clientId = getenv('API_CLIENT_ID'),
$clientSecret = getenv('API_CLIENT_SECRET'),
$refreshToken = getenv('API_REFRESH_TOKEN'),
$sandbox = true
);
/** @var EntityCollection $invoiceCollection */
$invoiceCollection = $api->invoice()->query([
'view' => 'last_3_months',
]);
/** @var Invoice $invoice */
foreach ($invoiceCollection as $invoice) {
echo "{$invoice->getReference()}\n";
}
Bug Reports
Please use the Github Issue Tracker for support.
6by6/freeagent-php 适用场景与选型建议
6by6/freeagent-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 669 次下载、GitHub Stars 达 5, 最近一次更新时间为 2016 年 06 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 6by6/freeagent-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 6by6/freeagent-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 669
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-19