form-synergy/php-api 问题修复 & 功能扩展

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

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

form-synergy/php-api

Composer 安装命令:

composer require form-synergy/php-api

包简介

API client written in PHP to manage Form Synergy services.

README 文档

README

A PHP library to manage Form Synergy services.

Install using composer

composer require form-synergy/php-api

Include the library

require '/vendor/autoload.php';

Enable session management

\FormSynergy\Session::enable();

Import the Form Synergy class

use \FormSynergy\Fs as FS;

You will need to retrieve your credentials in the Form Synergy console.

Form Synergy Website: https://formsynergy.com/

  • $profileid = '';
  • $apikey = '';
  • $apisecret = '';

If you are a reseller

  • $resellerid = '';

Configuration

FS::Config([
    'version' => 'v1',
    'protocol' => 'https',
    'endpoint' => 'api.formsynergy.com',
    'apikey' => $apikey,
    'secretkey' => $secretkey,
    'max_auth_count' => 15,
]);

local storage

Enable local storage to store downloads and responses.

FS::Storage( '/', 'local-storage' );

Load account

Load and start managing an account.

$api = FS::Api()->Load($profileid);

Add a domain

$api->Create('website')
    ->Attributes([
        'name' => 'MyWebsite',
        'domain' => 'example.website.ltd',
        'proto' => 'https://'
    ])
    ->As('website');

Meta tag

Add the site id meta tag as follow

<meta name="fs:siteid" content="<?php echo $api->_website('siteid');?>">

Verify

$api->Get('website')
    ->Where([
        'siteid' => $api->_website('siteid')
    ])
    ->verify();

Create a strategy

A strategy is composed of modules and objectives.

$api->Create('strategy')
    ->Attributes([
        'name' => 'Default strategy',
        'siteid' => $api->_website('siteid')
    ])
    ->As('defaultStrategy');

Creating modules

Modules are bundles composed of a subject, body and form inputs. Each module can be customized to handle events and responses individually. Modules can be chain linked together to create contiuous interactions. API documentation

Create an objective

An objective allows you to define notification methods, and goals based on obtained information. API documentation

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-04-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固