定制 gman98ish/ukfast-simple-php-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gman98ish/ukfast-simple-php-sdk

最新稳定版本:v0.2.1

Composer 安装命令:

composer require gman98ish/ukfast-simple-php-sdk

包简介

A simpler version of the UKFast PHP SDK.

关键字:

README 文档

README

composer require gman98ish/ukfast-simple-php-sdk

This is not intended to replace the UKFast SDK, but is simply a proof of concept of another way we could approach it.

Instead of the SDK being an abstraction over our API's, this offers a thin wrapper.

The client provides methods for hitting the 5 different kinds of endpoints we have

  • Getting a page of items
  • Getting a single item
  • Creating an item
  • Updating an item
  • Deleting an item

You pass the API paths directly to this SDK, using developers.ukfast.io as a reference e.g.

<?php

$ukfast = new \UKFast\SimpleSDK\Client;
$ukfast->auth('my-ukfast-key');

$page = $ukfast->get('/pss/v1/requests'); // returns a Page class

echo $page->getItems()[0]->author->id . "\n";


// can also do concurrent requests
[$requests, $replies] = $ukfast->concurrently(fn ($ukfast) => [
    $ukfast->get('/pss/v1/requests'),
    $ukfast->get('/pss/v1/replies'),
]);

echo $requests->getItems()[0]->author->id . "\n";
echo $replies->getItems()[0]->author->id . "\n";

The advantage of this is that this is all the code we need to interface with our entire API's

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固