tjournal/reviewer
最新稳定版本:0.2.1
Composer 安装命令:
composer require tjournal/reviewer
包简介
Reviewer — PHP library for track App Store reviews with Slack
README 文档
README
Simple library to track App Store reviews with Slack.
Installing via Composer
composer.phar require tjournal/reviewer
Next require Composer's autoloader:
require 'vendor/autoload.php';
Simple usage
You should use external database to store already sent reviews. We advice Redis with Predis library. Library should implement sismember, sadd, exists and set methods.
You need to create new Incoming webhook in Slack and change {APPID} with the real app id:
try { $storage = new Predis\Client(); $reviewer = new TJ\Reviewer({APPID}); $reviewer->setStorage($storage); $reviewer->setSlackSettings(['endpoint' => 'https://hooks.slack.com/services/ABCDE/QWERTY', 'channel' => '#reviews']); $reviewer->start(); } catch (Exception $e) { // handle errors }
Then add your script to crontab:
sudo crontab -e */15 * * * * php crontab.php
Monolog integration
If you want to track internal library errors you can use Monolog. Here is the easiest way:
use Monolog\Logger; use Monolog\Handler\StreamHandler; $monolog = new Logger('Reviewer'); $monolog->pushHandler(new StreamHandler('/tmp/reviewer.log', Logger::DEBUG)); $reviewer->setLogger($monolog);
Countries
There is a way to change set of countries from whence Reviewer is getting fresh app's reviews.
try { $reviewer = new TJ\Reviewer({APPID}); ... $reviewer->countries = ['ru' => 'Russia', 'us' => 'US', 'fi' => 'Finland', 'fr' => 'France']; $reviewer->start(); } catch (Exception $e) { // handle errors }
tjournal/reviewer 适用场景与选型建议
tjournal/reviewer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 384 次下载、GitHub Stars 达 7, 最近一次更新时间为 2015 年 05 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「app」 「appstore」 「slack」 「reviews」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 tjournal/reviewer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tjournal/reviewer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 tjournal/reviewer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Highly Opinionated Symfony3/4 Deployer Recipe
A library that implements the App Store API (Server API and Connect API) and facilitates App Store Server Notifications V2
This bundle provides integration with the Slack API library, allowing you to interact with the Slack API from within your Symfony projects
Make your bundle an application
Control Apple AppStores and price transformers in apple system
App Version Utility for CakePHP 2.x Applications
统计信息
- 总下载量: 384
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-08