承接 fourcoders/latch-sdk-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

fourcoders/latch-sdk-php

Composer 安装命令:

composer require fourcoders/latch-sdk-php

包简介

PHP SDK for latch API with composer and guzzle

README 文档

README

SensioLabsInsight

latch-sdk-php

Latch SDK php with Guzzle.

This library is 100% compatible with proyects with the original latch sdk https://github.com/ElevenPaths/latch-sdk-php. The feature of our library is that you can load it with the modern Composer system.

Installation

Install via Composer

{
    "require": {
        "fourcoders/latch-sdk-php": "dev-master"
    }
}

Autoloading

Composer generates a vendor/autoload.php file. You can simply include this file and you will get autoloading for free.

require 'vendor/autoload.php';

Usage

Extract and modify of original php sdk https://github.com/ElevenPaths/latch-sdk-php#using-the-sdk-in-php

Create a Latch object with the "Application ID" and "Secret" previously obtained.

	$api = new \Fourcoders\LatchSdk\Latch(APP_ID, APP_SECRET);

Optional settings:

	$api->setProxy(YOUR_PROXY);

Call to Latch Server. Pairing will return an account id that you should store for future api calls

     $pairResponse = $api->pair("PAIRING_CODE_HERE");
     $statusResponse = $api->status(ACCOUNT_ID_HERE);
     $unpairResponse = $api->unpair(ACCOUNT_ID_HERE);

After every API call, get Latch response data and errors and handle them.

     $pairResponse->getData();
     $pairResponse->getError();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-09