unialteri/sellsy-client
最新稳定版本:3.0.31
Composer 安装命令:
composer require unialteri/sellsy-client
包简介
PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
README 文档
README
PHP library to connect your applications to your Sellsy account account using the Sellsy API and build your websites and your platforms on the Sellsy technology.
Simple Example
<?php
use GuzzleHttp\Client;
use Teknoo\Sellsy\Guzzle6\Transport\Guzzle6;
use Teknoo\Sellsy\Sellsy;
include 'vendor/autoload.php';
//Create the HTTP client
$guzzleClient = new Client();
//Create the transport bridge
$transportBridge = new Guzzle6($guzzleClient);
//Create the front object
$sellsy = new Sellsy(
'https://apifeed.sellsy.com/0/',
$userToken,
$userSecret,
$consumerKey,
$consumerSecret
);
$sellsy->setTransport($transportBridge);
//Example of request, follow the API documentation of Sellsy API.
print $sellsy->infos()->getInfos()->getResponse()['consumerdatas']['id'];
//Show your ConsumerDatas id, like 9001
print $sellsy->Infos()->getInfos()->consumerdatas->id;
//Show again your ConsumerDatas id, like 9001
$sellsy->Infos()->async()->getInfos()->then(function (\Teknoo\Sellsy\Client\ResultInterface $result) {
print $result->consumerdatas->id.PHP_EOL;
})->wait();
//Show again your ConsumerDatas id, like 9001
print $sellsy->AccountPrefs()->getCorpInfos()->getResponse()['email'];
//Show your email, like contact@teknoo.software
print $sellsy->AccountPrefs()->getCorpInfos()->email;
//Show your email, like contact@teknoo.software
$sellsy->AccountPrefs()->async()->getCorpInfos()->then(function (\Teknoo\Sellsy\Client\ResultInterface $result) {
print $result->email.PHP_EOL;
})->wait();
//Show your email, like contact@teknoo.software
$sellsy->AccountDatas()->deleteTaxe();
//Thrown an exception : Teknoo\Sellsy\Client\Exception\ParameterMissingException: id is missing
How-to
Quick How-to to learn how use this library : Startup. Manage Sellsy Rate Limiting : Rate Limiting.
Support this project
This project is free and will remain free. It is fully supported by the activities of the EIRL. If you like it and help me maintain it and evolve it, don't hesitate to support me on Patreon or Github.
Thanks :) Richard.
Credits
EIRL Richard Déloge - https://deloge.io - Lead developer. SASU Teknoo Software - https://teknoo.software
About Teknoo Software
Teknoo Software is a PHP software editor, founded by Richard Déloge, as part of EIRL Richard Déloge. Teknoo Software's goals : Provide to our partners and to the community a set of high quality services or software, sharing knowledge and skills.
License
Space is licensed under the 3-Clause BSD License - see the licenses folder for details.
Installation & Requirements
To install this library with composer, run this command :
composer require teknoo/sellsy-client
To use the embedded Guzzle transport
composer require guzzlehttp/guzzle
This library requires :
* PHP 8.1+ (7.4 and 8.0 can works, but there are not supported)
* A PHP autoloader (Composer is recommended)
* Teknoo/Immutable.
* A PSR-7 implementation
News from Teknoo Sellsy Client 3.0
This library requires PHP 7.4 or newer. Some change causes bc breaks :
- PHP 7.4 is the minimum required
- Improve errors management from returns of API. All errors and exceptions thrown by the API are now mapped to an explicit PHP exception
- Improve result management: key/values are directly accessible, as object's property from the result object, thanks to voku/arrayy
- Improve result object, error message is now accessible from dedicated getter.
- Add Asynchronous requests capabilities
- Switch to typed properties
- Remove some PHP useless DockBlocks
- Replace array_merge by "..." operators
- Most methods have been updated to include type hints where applicable. Please check your extension points to make sure the function signatures are correct. _ All files use strict typing. Please make sure to not rely on type coercion.
- Switch to PHPStan in QA Tools and disable PHPMd
Special Thanks
Julien Herr julien@herr.fr : RateLimitTransport and documentation about Sellsy's rate limit in its API.
Contribute :)
You are welcome to contribute to this project. Fork it on Github
unialteri/sellsy-client 适用场景与选型建议
unialteri/sellsy-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.85k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2015 年 02 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「client」 「library」 「sellsy」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 unialteri/sellsy-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 unialteri/sellsy-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 unialteri/sellsy-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Inbox pattern process implementation for your Laravel Applications
Mock PSR-18 HTTP client
Asynchronous MQTT client built on React
Core library that defines common interfaces used by the rest of the intahwebz..
Amqp classes
统计信息
- 总下载量: 3.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-02-05