承接 gruentee/flowfact-api-php 相关项目开发

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

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

gruentee/flowfact-api-php

Composer 安装命令:

composer require gruentee/flowfact-api-php

包简介

A simple wrapper around the FLOWFACT API, featuring a fluent interface

README 文档

README

#flowfact-api-php

A simple wrapper around the FLOWFACT API.

  • Uses Guzzle for HTTP requests.
  • Features a fluent interface for building HTTP queries: build any resource path via dynamic method calls
  • Returns HTTP responses according to PSR-7

##Usage example Building resource paths (ie. /users/<UUID>/contacs/<UUID>) through chaining method calls with the name of the desired resource prefixed by either for or get. Single resources can be specified by passing the identifier as an argument to the call denoting the resource, same goes for adding query parameters.

The request is finally made by calling an HTTP method at the end of the chain.

// install via Composer
composer require gruentee/flowfact-api-php

// initialize client
$client = new Client('USERNAME', 'PASSWORD', 'CUSTOMER_ID', 'https://api.baseurl.tld/');

// build URL: prefix the desired resource with "get" or "for"
// /users/68ed219e-5755-11e6-8b77-86f30ca893d3/contacts
$client->getUsers("68ed219e-5755-11e6-8b77-86f30ca893d3")
    ->getContacts();
// submit request
$response = $client->get();
 
// POST /users/68ed219e-5755-11e6-8b77-86f30ca893d3/contacts
$data = [
    'name' => ['lastname' => 'TestUser']
];

$resp = $client->forUsers('AAC94B33-01F8-3783-B597-AE7456DF1B78')
    ->forContacts()
    ->post($data);

##TODO

  • Map XML and JSON responses to PHP classes corresponding to response models

###Thanks Idea of intercepting method calls borrowed from [sendgrid/php-http-client](https://github .com/sendgrid/php-http-client/). 👍

#About FLOWFACT logo ProfessionalCenter Logo

This project was built during an educational cooperation project by the Professional Center of the University of Cologne and the FLOWFACT GmbH.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固