professio/budgetmailer-php-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

professio/budgetmailer-php-api

Composer 安装命令:

composer require professio/budgetmailer-php-api

包简介

Professio BudgetMailer API Client for PHP

README 文档

README

This Repository contains PHP BudgetMailer API Client. To use this client, you must have a BudgetMailer Account.

Requirements

Installation

Composer

Client can be easily installed using Composer. The Package name is: professio/budgetmailer-php-api.

Installation using composer: composer require "professio/budgetmailer-php-api:1.0.*"

Example of composer.json:

{
    "require": {
        "professio/budgetmailer-php-api": "1.0.*"
    }
}

Single file distribution

You can find single file distribution with concatenated classes in build/dist/budgetmailer-php-api.php file, which you can include to your project easily without using composer or autoloading.

Caching

If you want to use file cache, please make sure cache directory is writable by user of the code / web server. Also don't forget cache directory MUST NOT be accessible by web users.

Configuration

Configuration is associative array of configuration directives as follows:

$config = array(
    // enable or disable cache
    'cache' => true,
    // cache directory (must be writeable, must end with /)
    'cacheDir' => '/tmp/',
    // api endpoint, please do not change this value, unless instructed to
    'endPoint' => 'https://api.budgetmailer.com/',
    // your API key
    'key' => 'INSERTAPIKEY',
    // name of the budgetmailer list you want to use as a default
    'list' => 'INSERTLISTNAME',
    // your API secret
    'secret' => 'INSERTAPISECRET',
    // advanced: socket timeout
    'timeOutSocket' => 10,
    // advanced: socket stream read timeout
    'timeOutStream' => 10,
    // cache time to live in seconds (3600 sec = 1 hour)
    'ttl' => 3600,
);

Running

Install the client by Composer or include/require it as single file distribution version. Use the configuration example, and set following required keys:

  • key: API key
  • secret: API secret
  • list: Default list ID or Name

Then pass the configuration to the client:

<?php

use BudgetMailer\Api\Client;

try {
  $config = array(/* See configuration example */);
  $client = Client::getInstance($config);

  print $client->isConnected() ? 'Huray!' : 'Yay...';
} catch (\Throwable $e) {
  print 'Something went wrong: ' . $e->getMessage();
}

Examples

You can find more examples covering most of the use cases in: build/examples/example.php.

Files Overview

  • build/: Build Files
  • build/dist/: Single File Distribution
  • build/docs/: PHPDoc related Files
  • build/examples/: Additional Examples
  • build/tests/: PHPUnit related Files
  • src/: all PHP Classes
  • src/BudgetMailer/Api/: all PHP API Client Classes
  • src/BudgetMailer/Test/: all PHPUnit Test Classes
  • .gitignore: Gitignore File
  • LICENSE: Full Text of MIT License
  • README.md: This File
  • composer.json: Composer Package Definition

Copyright

MIT License

Contact Information

Changelog

  • 1.0.3 (2017-01-19):
    • Added missing test for bulk delete contacts
    • Fixed cache path in config example + changed comment
    • Fixed paths in *.xml.dist files
  • 1.0.2 (2016-12-13):
    • Added build/docs/phpdoc.xml.dist for phpdocumentor
    • Added http headers reading methods to \BudgetMailer\Api\Client\Http
    • Added new bulk methods: \BudgetMailer\Api\Client::deleteContacts(), \BudgetMailer\Api\Client::postContactsBulk(), \BudgetMailer\Api\Client::postContactsUnsubscribe(),
    • Added some missing methods and properties comments
    • Changed files headers to reflect license change
    • Changed license from GPL2 to MIT
    • Changed tests to reflect the code changes
    • Client's \BudgetMailer\Api\Client::deleteTag() now handling missing tag
    • Composer.json patched (missing PHP modules requirements and wrong license)
    • Improved build/*.php build scripts (build docs, single file distribution, do tests)
    • Moved all distribution, documentation, examples and tests to build/ directory
    • Quality assurance changes (various code quality improvements)
  • 1.0.1 (2016-04-08):
    • Added \BudgetMailer\Api\Client::$defaultConfig and \BudgetMailer\Api\Client::getInstance() to make usage easier
    • Added dist/config.php to .gitignore and added dist/config.php.dist file
    • Added missing trailing slash to cacheDir configuration directive
    • Added tests to reflect the changes
    • Fixed caching issue (was always disabled)
    • Improved build script dist/build.php
    • Renamed composer package from professio/php-budgetmailer to professio/budgetmailer-php-api
  • 1.0.0 (2015-09-24):
    • Initial Version

professio/budgetmailer-php-api 适用场景与选型建议

professio/budgetmailer-php-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.23k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 12 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「http」 「api」 「newsletter」 「client」 「rest-json」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 7.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-22