sebastianpozoga/php-allegroapi
Composer 安装命令:
composer require sebastianpozoga/php-allegroapi
包简介
A newest library to communicate with Allegro Api. The library is OOP, good tested and easy to use. Make your job enjoyable. The version is tested with PHP5.5
README 文档
README
A newest library to communicate with Allegro Api. The library is OOP, good tested and easy to use. Make your job enjoyable. The version is tested with PHP5.5
Documentation
In this section I describe a class and methods you should use
Configuration
To run test you must insert you login, password and appkey to Config/config.ini file.
login = "Insert your login here" password = "Insert your password here - never do it in production" apikey = "Insert your apikey here" sandbox = false countryCode = 1
The file is use only by tests.
You can create your access data by http://allegro.pl/myaccount/webapi.php/ page. sandbox is use to switch allegro sandbox and production version. countryCode is used to select current country. Default 1 mean Poland. If you want you can change country to communication with other allegroGroup services like: aukro.cz, molotok.ru, aukro.ua, teszvesz.hu
Security
Never storage your plain password. Your app should always hash it by sha256 (used by allegro)
$hashPassword = base64_encode(hash('sha256', YOUR_ALLEGRO_PASSWORD, true));
Class AllegroApi
AllegroApi is main class. Provide api access interface.
Constructor
Require one object with login, hashPassword (or password - strongly no recomended), apikey, sandbox, countryCode fields. The data is use to init connections.
LoginEnc
Login to allegro (use constructor data)
Run functions
The api use _call to maping functions names to allegro request. You should use short names without "do". Use getCountries (to rum allegro doGetCountries function).
$allegroApi = new AllegroApi($config); $countrisResponse = $allegroApi->getCountries();
#Allegro functions documentation Description of all allegro functions are available on http://allegro.pl/webapi/documentation.php
Quick start
Clone empty project:
git clone https://github.com/SebastianPozoga/PHP-AllegroApi-EmptyProject.git composer install
And run:
php index.php
Tests
Run tests by:
phpunit tests/AllegroApiTest
Older version
It is strong recomended to use new version of PHP Allegro Api Library. If you must use old version is available on https://github.com/SebastianPozoga/Allegro-PHP-API-14
sebastianpozoga/php-allegroapi 适用场景与选型建议
sebastianpozoga/php-allegroapi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.14k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2015 年 06 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「api」 「allegro」 「web-api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sebastianpozoga/php-allegroapi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sebastianpozoga/php-allegroapi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sebastianpozoga/php-allegroapi 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
simple interface for Allegro REST API
Allegro API client
A PSR-7 compatible library for making CRUD API endpoints
Allegro OAuth2 Provider for Laravel Socialite
Alfabank REST API integration
统计信息
- 总下载量: 8.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-17