bananastandio/php_sdk
Composer 安装命令:
composer require bananastandio/php_sdk
包简介
Banana Stand PHP SDK
README 文档
README
This repo is for the PHP SDK for Banana Stand. See https://www.bananastand.io for more information.
Installation
Install with composer using composer require bananastandio/php_sdk or copy the folder to your
project and include all files.
Usage
Setup
require_once('vendor/autoload.php'); use Banana\Client; use Banana\Models\Event; $client = new Client("*your public key*", "* your secret key *"); // Replace with your keys
Fetch events
$events = $client->events(); // Get the first page of events (default sorting is most recently updated first) foreach ($events as $event) { echo $event->id . "|" . $event->visitor_id . "\n"; }
Delete an Event
$event->delete();
Find event
$event = Event::find($client, $events[0]->id); echo "Found: " . $event->id . "|" . $event->visitor_id . "\n";
Get HTML Content for a Product
$html = $client->getProductPageHtml($event->product_id);
Push view event for that product for customer 123
$client->pushViewEvent($event->product_id, null, 123);
Need Help?
Post issues in this github and a developer will respond. Email the support team if you prefer to contact us that way.
TODO
- Add automated tests and hook into travis
Contributing
How to contribute
To contribute to the repository:
- Fork the repository.
- Clone the forked repository locally.
- Create a branch descriptive of your work. For example "my_new_feature_xyz".
- When you're done work, push up that branch to your own forked repository (not the main one).
- Visit https://github.com/bananastandio/php_sdk and you'll see an option to create a pull request from your forked branch to the master. Create a pull request.
- Fill out the pull request template with everything it asks for and assign the pull request to someone to review.
- Set the reviewee as yourself and the requested reviewer as whomever you want to review your PR.
- Once the PR merges into master then it is ready for production and should be treated as such. It will be deployed to staging within minutes.
Getting your PR approved
A few key things to note:
- PRs must be approved by all requested reviewers before you can merge.
- After you implement changes requested from a reviewer then post back with a ♻️ to say something like
:recyle: Ready for you to look again at it please.. Note: If you do not do this then you PR may not ever get re-reviewed after comments are taken into acocunt. - If a PR comment starts with a 🍺 then it is just a suggestion and preference of the reviewer and the comment is NON-blocking. That is, your PR may still be approved with these comments.
- If a PR comment starts with a 💁♂️ then it is just informative and requires no action. It's like a "FYI"
- All other PR comments probably need to be addressed unless otherwise agreed by the reviewer.
- After a PR has been approved then you are free to merge.
- PR reviews will happen ASAP but generally within 24 hours.
Design and Code Standards
General Standards
Configure your IDE or code editor with the following:
- Use 4 spaces - NOT tabs.
- Add new line at the end of every file.
PHP Styles
Follow the PSR-2 Coding Standard.
Other Considerations
- Keep methods and classes small and sweet. Follow SRP.
- If you're adding a lot of comments in your code you pobably should consider whether or not that code should be broken up into multiple methods. This is 95% the case.
bananastandio/php_sdk 适用场景与选型建议
bananastandio/php_sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 24 次下载、GitHub Stars 达 0, 最近一次更新时间为 2017 年 03 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 bananastandio/php_sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bananastandio/php_sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-03-18