l0rd59/smartfocus-api-php-client

Smartfocus API 的 PHP 客户端

dev-master 2016-05-02 14:56 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:04:06 UTC


README

使用 Guzzle 和 Guzzle 服务描述使用 Smartfocus API 的 PHP 客户端 GuzzleGuzzle Service Description

使用方法

<?php

require_once 'vendor/autoload.php';

$smartfocusClient = new \L0rD59\Smartfocus\Client();

$openConnection = $smartfocusClient->openConnection([
  'username' => 'YOUR_SMARTFOCUS_USERNAME',
  'password' => 'YOUR_SMARTFOCUS_PASSWORD',
  'apiKey' => 'YOUR_SMARTFOCUS_APIKEY',
]);

$members = $smartfocusClient->getMembers([
  'memberUID' => 'EMAIL:member@mail.com',
  'token' => $openConnection['result'],
]);

$updateMember = $smartfocusClient->updateMember([
  'memberUID' => 'EMAIL:member@mail.com',
  'token' => $openConnection['result'],
  'dynContent' => [['key' => 'TITLE','value' => 'Mr.']]
]);

有关可用的操作和参数,请参阅 smartfocus-api-description.php 文件中的 "操作" 部分。