定制 freezbi/freezbi-php-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

freezbi/freezbi-php-sdk

Composer 安装命令:

composer require freezbi/freezbi-php-sdk

包简介

SDK PHP for Freezbi Notification System

README 文档

README

Freezbi SDK is a PHP client library to work with Freezbi Notification System.

Installation

SDK has been written in PHP 5.4 and has no dependencies on external packages. You only have to ensure that curl and openssl extensions (that are part of standard PHP distribution) are enabled in your PHP installation.

The project attempts to comply with PSR-4 specification for autoloading classes from file paths. As a namespace prefix is 'Freezbi' with base directory '{your-installation-dir}/'.

But if not using PSR-4 the installation is as easy as downloading the package and storing it under any location that will be available for including by

require_once '{your-installation-dir}/Freezbi/Autoloader.php';

Installation with Composer

You can use Freezbi SDK library as a dependency in your project with Composer. A composer.json file is available in the repository and it has been referenced on packagist.

The installation with Composer is easy, reliable : Step 1 - Add the Freezbi SDK as a dependency in your composer.json file as follow :

"require": {
    ...
    "freezbi/freezbi-php-sdk": "dev-master"
},

Step 2 - Update your dependencies with Composer

you@yourhost:/path/to/project$ php composer.phar update freezbi/freezbi-php-sdk

The Library has been added into your dependencies and ready to be used.

License

Freezbi SDK is distributed under MIT license, see LICENSE file.

Contacts

Report bugs or suggest features using Freezbi Contact Page.

Examples

3 examples are available on examples directory

  • 1 Example without any http call
  • 1 Example with an http call on freezbi website (get the last post)
  • 1 Example with an http call but with parameters (1 call for each parameter) => Youtube channel subscription

Sample usage

    // Init the Freezbi Api
    $freezbiApi = new Freezbi\FreezbiApi();
    $freezbiApi->TemporaryFolder = 'temp/';
    $freezbiApi->Delay = 3600 * 24; // Each remote check will be separated by 24 hours
    
    // Create a new Notification with its name, url, and body type
    $notification = new \Freezbi\Notification\SingleStreamNotification('freezbiblog');
    
    // Prepare the api for that SingleStreamNotification
    $freezbiApi->prepare($notification);
    
    $notification->Action = function() use ($freezbiApi) {
    
        // Prepare a response
        $response = new Response();
    
        $datetime = new \DateTime();
    
        if ($datetime->format('m-d') == '06-23') {
            $response->SendNotification = true;
            $response->Title = 'Birthday';
            $response->Message = 'This is Alan Turing\'s birthday';
            $response->Data = 'https://fr.wikipedia.org/wiki/Alan_Turing';
        }
    
        return $response;
    };
    
    // Your script must return the output of the execute method
    echo $freezbiApi->execute();

freezbi/freezbi-php-sdk 适用场景与选型建议

freezbi/freezbi-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 06 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 freezbi/freezbi-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 freezbi/freezbi-php-sdk 我们能提供哪些服务?
定制开发 / 二次开发

基于 freezbi/freezbi-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 35
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 22
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-22