frankperez87/php-isdk
Composer 安装命令:
composer require frankperez87/php-isdk
包简介
The Unofficial Infusionsoft API PHP SDK Backup
README 文档
README
This SDK allows developers to easily use the Infusionsoft API with PHP
Install Instructions
This SDK requires at least PHP 5.2
- Clone the repository to your system
git clone https://github.com/infusionsoft/PHP-iSDK.gitalternatively you can install using composer
- Copy the "src" folder (or its contents) to the folder that will hold the SDK
Configuration
There are two ways we can connect to the API.
-
First way is to use the src/conn.cfg.php configuration file
A. You will need your Application Name and Your API Key
You can find your application name in the url you goto to login. eg. https://YOURAPPNAME.infusionsoft.comYou can get your API Key by following this article on the User Guidehttp://ug.infusionsoft.com/article/AA-00442/0/How-do-I-enable-the-Infusionsoft-API-and-generate-an-API-Key.html
B. In src/conn.cfg.php file you will need to replace the following:
connectionName - This can be anything you wantapplicationName - This is just the application name that we got in step 1APIKEYGOESHERE - This is the API Key you got in step 1
-
We can pass in the Application Name and API Key directly into the cfgCon function
A. You will need your Application Name and Your API Key
You can find your application name in the url you goto to login. eg. https://YOURAPPNAME.infusionsoft.comYou can get your API Key by following this article on the User Guidehttp://ug.infusionsoft.com/article/AA-00442/0/How-do-I-enable-the-Infusionsoft-API-and-generate-an-API-Key.html
Making Your First API Call
In the script you want to make the API call in you will need to do the following:
- We need to require the iSDK
require_once('src/isdk.php');
- Next we need to create an object
$app = new iSDK();
- Next we need to create the connection
$app->cfgCon("connectionName");OR$app->cfgCon("applicationName", "APIKEYGOESHERE");
- Next we will make our first API call using the ContactService.findByEmail method. This method returns contact information by an email address we send
$contacts = $app->findByEmail('test@example.com',array('Id', 'FirstName', 'LastName', 'Email'));This will return a contact's Id, First Name, Last Name, and Email that has the email 'test@example.com'
- Finally we want to print the return information to the browser window
print_r($contacts);
How to Use Logging
As of Version 1.8.3 the iSDK has the ability to log API calls to a CSV. By default logging is disabled.
To enable logging do the following:
- In the script you want to log the API Calls of add this after you create the object
$app->enableLogging(1); //0 is off 1 is on
- (Optional) You can set the location of the CSV. By default the csv is created in the same directory as isdk.php
$app->setLog('apilog.csv'); //This is the full path to the file
Misc Functions
- infuDate() - formats your date string for use with the API. Has an optional parameter for doing UK date formats.
infuDate('10/26/2013') will return '20131026T06:00:00'infuDate('10/26/2013','UK') will return '2013-26-10T06:00:00'
frankperez87/php-isdk 适用场景与选型建议
frankperez87/php-isdk 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 05 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「marketing」 「infusionsoft」 「infusionsoft-api」 「infusion」 「php-infusionsoft-api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 frankperez87/php-isdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 frankperez87/php-isdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 frankperez87/php-isdk 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package provides port of the Infusionsoft SDK utilizing Laravel fascades.
The unofficial Infusionsoft API PHP SDK
Laravel Package for accessing the Keap REST API (v1/v2)
A PSR-7 compatible library for making CRUD API endpoints
Historical accounting for contacts
Infusionsoft OAuth 2 Client Provider for The PHP League OAuth2-Client package
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-14