advancedideasmechanics/api-client
Composer 安装命令:
composer require advancedideasmechanics/api-client
包简介
API Service to work with DotKernel
README 文档
README
An API client primarily to work with DotKernel API. https://github.com/dotkernel/api
CURRENTLY UNSTABLE
Install
Install via composer
Composer
composer install advancedideasmechanics/apiclient
Call package
Initialize
$apiclient = new ApiClient(baseurl, clientId, clientSecret, grantType, scope, userName, userSecret, tokenLocation, tokenFilename, debug, additionalParams);
See if it works, if api call works it will create a tokenFilename in your chosen location. Create location path if not already in place.
Test
$apiclient->getAccessToken();
Send data to API
$apiclient->makeApiRequest($endpoint, $body, $method = "GET", $additionalHeaders = []);
Initialize Details
Below uses some DotKernel defaults. DO NOT use those values in production.
baseurl = http://localhost:8083
clientId = frontend # DotKernel default
clientSecret = frontend # DotKernel default
grantType = password
scope = api # DotKernel default (you can keep this)
userName = test@dotkernel.com # DotKernel default
userSecret = dotkernel # DotKernel default
tokenLocation = /var/www/data/ # keep outside web folder
tokenFilename = token.json # can be any file name you wish.
debug = false # optional will default to false, this for guzzle debugging to log files.
additionParms = [] # Optional Guzzle parameters.
Send / Retrieve to API
endpoint = /someapiendpoint # start from the root of the baseurl
body = [] # Array of information that will be sent to api as json_encoded() can be just [] if using GET
method = GET # defaults to GET but you can use any HTTP VERB you set if the endpoint accepts it.
additionalHeader = [] # Optional for Guzzle
advancedideasmechanics/api-client 适用场景与选型建议
advancedideasmechanics/api-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 10 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「library」 「dotkernel」 「advancedideasmechanics」 「apiservice」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 advancedideasmechanics/api-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 advancedideasmechanics/api-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 advancedideasmechanics/api-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dotkernel component based on Maxmind's geoip2/geoip2 package, using their free GeoLite2 databases to provide geographical details about an IP address.
A PSR-7 compatible library for making CRUD API endpoints
DotKernel filter component customizing and extending laminas-filter
DotKernel input filter component extending and customizing laminas-inputfilter
Inbox pattern process implementation for your Laravel Applications
Authentication wrapper for social providers
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-02