zsgf/client

1.0.25 2025-05-15 06:10 UTC

This package is auto-updated.

Last update: 2025-05-15 06:14:38 UTC


README

Packagist Version

安装与使用

要求

PHP 7.4 及更高版本。 也应适用于 PHP 8.0。

Composer

确保已安装 Composer,如果尚未安装 Composer,请先按照以下步骤进行安装:

下载 Composer:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"

全局安装 Composer​(可选):

mv composer.phar /usr/local/bin/composer

创建或导航到项目目录

如果你还没有项目目录,可以创建一个新的目录并进入该目录:

mkdir my-project
cd my-project

初始化 Composer(可选)

composer init

按照提示填写项目信息。如果你只是想快速安装一个库,也可以手动创建 composer.json 文件,或者直接使用下面的命令安装库,Composer 会自动创建或更新 composer.json 和 composer.lock 文件。

使用 Composer 安装 zsgf/client 包

在终端或命令提示符中,导航到你的项目目录后,运行以下命令来安装 zsgf/client 包:

composer require zsgf/client

这条命令的作用包括:

  • 将 zsgf/client 添加到你的 composer.json 文件的 require 部分。
  • 下载 zsgf/client 包及其依赖项。
  • 生成或更新 composer.lock 文件,锁定依赖包的版本以确保一致性。

使用安装的包

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// 配置 Bearer 授权:Bearer
$config = ZSGF\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new ZSGF\Client\Api\AccessTokenApi(
    // 如果你想使用自定义的 HTTP 客户端,请传入实现了 GuzzleHttp\ClientInterface 的客户端。
    // 这是可选的,GuzzleHttp\Client 将作为默认客户端使用。
    new GuzzleHttp\Client(),
    $config
);
$id = 56; // int | 
$app_key = 'app_key_example'; // string

try {
    $result = $apiInstance->accessTokenDelete($id, $app_key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccessTokenApi->accessTokenDelete: ', $e->getMessage(), PHP_EOL;
}

API 文档

Class Method HTTP request Description
AccessTokenApi accessTokenDelete DELETE /AccessToken/{appKey}/{id} 删除令牌
AccessTokenApi accessTokenPost POST /AccessToken/{appKey} 创建令牌
AccessTokenApi accessTokenPut PUT /AccessToken/{appKey}/{id} 更新令牌
AccessTokenApi accessTokens GET /AccessToken/{appKey} 令牌列表
AlipayApi alipayCreateOrder POST /Alipay/{appKey}/CreateOrder 创建订单 - 当面付
AlipayApi alipayCreateOrderPagePay POST /Alipay/{appKey}/CreateOrderPagePay 创建订单 - PC支付
AlipayApi alipayCreateOrderWapPay POST /Alipay/{appKey}/CreateOrderWapPay 创建订单 - WAP支付
AlipayApi alipayOrderDetail GET /Alipay/{appKey}/OrderDetail 订单详情
AlipayApi alipayOrderRefund POST /Alipay/{appKey}/OrderRefund 订单退款
AlipayApi alipayReturnPageNotify POST /Alipay/{appKey}/ReturnPageNotify 支付成功同步通知
AppApi app GET /App/{appKey} 应用详情
AppApi app2FA GET /App/{appKey}/2FA 双因素验证 获取
AppApi app2FACheck GET /App/{appKey}/2FACheck 双因素验证 验证
AppApi appCheckVersion GET /App/{appKey}/CheckVersion 更新应用数据库
AppApi appDelete DELETE /App/{appKey} 删除应用
AppApi appInfo GET /App/{appKey}/Info 应用详情
AppApi appPost POST /App 创建应用
AppApi appPut PUT /App/{appKey} 更新应用
AppApi appTransfer GET /App/{appKey}/Transfer 转移应用
AppApi apps GET /App 应用列表
AppSettingApi appServiceSettingGroup GET /AppSetting/{appKey}/Groups/{id} 获取服务分组详情
AppSettingApi appServiceSettingGroupDelete DELETE /AppSetting/{appKey}/Groups/{id} 删除服务分组
AppSettingApi appServiceSettingGroupPost POST /AppSetting/{appKey}/Groups 添加服务分组
AppSettingApi appServiceSettingGroupPut PUT /AppSetting/{appKey}/Groups/{id} 更新服务分组
AppSettingApi appServiceSettingGroups GET /AppSetting/{appKey}/Groups 获取服务分组列表
AppSettingApi appServiceSettingItem GET /AppSetting/{appKey}/Items/{id} 服务配置项详情
AppSettingApi appServiceSettingItemDelete DELETE /AppSetting/{appKey}/Items/{id} 删除服务配置项
AppSettingApi appServiceSettingItemPost POST /AppSetting/{appKey}/Items 添加服务配置项
AppSettingApi appServiceSettingItemPut PUT /AppSetting/{appKey}/Items/{id} 更新服务配置项
AppSettingApi appServiceSettingItems GET /AppSetting/{appKey}/Items 服务配置项列表
AppSettingApi appServiceSettingProvider GET /AppSetting/{appKey}/Providers/{id} 获取服务商详情
AppSettingApi appServiceSettingProviderDelete DELETE /AppSetting/{appKey}/Providers/{id} 删除服务商
AppSettingApi appServiceSettingProviderPost POST /AppSetting/{appKey}/Providers 添加服务商
AppSettingApi appServiceSettingProviderPut PUT /AppSetting/{appKey}/Providers/{id} 更新服务商
AppSettingApi appServiceSettingProviders GET /AppSetting/{appKey}/Providers 获取服务商列表
AppSettingApi appSetting GET /AppSetting/{appKey}/{id} 配置详情
AppSettingApi appSettingDelete DELETE /AppSetting/{appKey}/{id} 删除配置
AppSettingApi appSettingPost POST /AppSetting/{appKey} 增加配置
AppSettingApi appSettingPut PUT /AppSetting/{appKey}/{id} 更新配置
AppSettingApi appSettings GET /AppSetting/{appKey} 配置列表
AuthorizePolicyApi authorizePolicies GET /AuthorizePolicy/{appKey} 获取鉴权策略列表
AuthorizePolicyApi authorizePolicy GET /AuthorizePolicy/{appKey}/{id} 获取鉴权策略详情
AuthorizePolicyApi authorizePolicyDelete DELETE /AuthorizePolicy/{appKey}/{id} 删除鉴权策略
AuthorizePolicyApi authorizePolicyPost POST /AuthorizePolicy/{appKey} 添加鉴权策略
AuthorizePolicyApi authorizePolicyPut PUT /AuthorizePolicy/{appKey}/{id} 更新鉴权策略
CurrencyApi currencies GET /Currency/{appKey} 获取货币列表
CurrencyApi currency GET /Currency/{appKey}/{id} 获取货币详情
CurrencyApi currencyDelete DELETE /Currency/{appKey}/{id} 删除货币
CurrencyApi currencyExchangeRateDelete DELETE /Currency/{appKey}/ExchangeRates/{id} 删除汇率
CurrencyApi currencyExchangeRatePut PUT /Currency/{appKey}/ExchangeRates/{code} 更新汇率
CurrencyApi currencyExchangeRates GET /Currency/{appKey}/ExchangeRates/{code} 获取汇率列表
CurrencyApi currencyPost POST /Currency/{appKey} 创建新货币
CurrencyApi currencyPut PUT /Currency/{appKey}/{id} 更新货币信息
CurrencyApi currencyTransactions GET /Currency/{appKey}/Transactions 获取货币交易记录
DingTalkApi dingTalkUserInfo GET /DingTalk/{appKey}/UserInfo 获取用户资料
FileApi fileCreateFolder POST /File/{appKey}/CreateFolder 创建文件夹
FileApi fileDelete DELETE /File/{appKey} 删除文件或文件夹
FileApi fileRename POST /File/{appKey}/Rename 重命名文件或文件夹
FileApi fileUpload POST /File/{appKey}/Upload 上传文件
FileApi files GET /File/{appKey} 获取文件列表
OAuthApi oAuthAuthorize POST /OAuth/{appKey}/Authorize 获取access_token
OAuthApi oAuthConsents GET /OAuth/{appKey}/Consents 授权记录
OAuthApi oAuthDeleteConsent DELETE /OAuth/{appKey}/Consents/{id} 删除授权记录
OAuthApi oAuthGrantCode POST /OAuth/{appKey}/GrantCode 申请授权码
OAuthApi oAuthProfile GET /OAuth/{appKey}/Profile 获取个人资料
OrderApi order GET /Order/{appKey}/{id} 获取订单详情
OrderApi orderCreate POST /Order/{appKey}/Create 创建订单
OrderApi orders GET /Order/{appKey} 获取订单列表
ProjectApi project GET /Project/{id} 项目详情
ProjectApi projectDelete DELETE /Project/{id} 删除项目
ProjectApi projectPost POST /Project 创建项目
ProjectApi projectPut PUT /Project/{id} 更新项目
ProjectApi projects GET /Project 项目列表
ServiceSettingApi serviceSetting GET /ServiceSetting/{id} 获取配置详情
ServiceSettingApi serviceSettingDelete DELETE /ServiceSetting/{id} 删除配置
ServiceSettingApi serviceSettingGroup GET /ServiceSetting/Groups/{id} 获取服务分组详情
ServiceSettingApi serviceSettingGroupDelete DELETE /ServiceSetting/Groups/{id} 删除服务分组
ServiceSettingApi serviceSettingGroupPost POST /ServiceSetting/Groups 添加服务分组
ServiceSettingApi serviceSettingGroupPut PUT /ServiceSetting/Groups/{id} 更新服务分组
ServiceSettingApi serviceSettingGroups GET /ServiceSetting/Groups 获取服务分组列表
ServiceSettingApi serviceSettingItem GET /ServiceSetting/Items/{id} 服务配置详情
ServiceSettingApi serviceSettingItemDelete DELETE /ServiceSetting/Items/{id} 删除服务配置
ServiceSettingApi serviceSettingItemPost POST /ServiceSetting/Items 添加服务配置
ServiceSettingApi serviceSettingItemPut PUT /ServiceSetting/Items/{id} 更新服务配置
ServiceSettingApi serviceSettingItems GET /ServiceSetting/Items 服务配置列表
ServiceSettingApi serviceSettingPost POST /ServiceSetting 增加配置
ServiceSettingApi serviceSettingProvider GET /ServiceSetting/Providers/{id} 获取服务商详情
ServiceSettingApi serviceSettingProviderDelete DELETE /ServiceSetting/Providers/{id} 删除服务商
ServiceSettingApi serviceSettingProviderPost POST /ServiceSetting/Providers 添加服务商
ServiceSettingApi serviceSettingProviderPut PUT /ServiceSetting/Providers/{id} 更新服务商
ServiceSettingApi serviceSettingProviders GET /ServiceSetting/Providers 获取服务商列表
ServiceSettingApi serviceSettingPut PUT /ServiceSetting/{id} 更新配置
ServiceSettingApi serviceSettings GET /ServiceSetting 获取配置列表
StorageApi storageAggregate GET /Storage/{appKey}/{table}/Aggregate 聚合查询
StorageApi storageClear DELETE /Storage/{appKey}/{table}/Clear 清空表数据
StorageApi storageDelete DELETE /Storage/{appKey}/{table}/{id} 删除数据
StorageApi storageDeleteIndex DELETE /Storage/{appKey}/{table}/indexes 删除索引
StorageApi storageDetail GET /Storage/{appKey}/{table}/{id} 数据详情
StorageApi storageExecuteFunction GET /Storage/{appKey}/ExecuteFunction 执行函数
StorageApi storageExport GET /Storage/{appKey}/{table}/Export 导出数据
StorageApi storageImport POST /Storage/{appKey}/{table}/Import 导入数据
StorageApi storageIndexes GET /Storage/{appKey}/{table}/Indexes 获取索引
StorageApi storageList GET /Storage/{appKey}/{table} 查询数据
StorageApi storagePost POST /Storage/{appKey}/{table} 添加数据
StorageApi storagePostIndex POST /Storage/{appKey}/{table}/indexes 添加索引
StorageApi storagePut PUT /Storage/{appKey}/{table}/{id} 更新数据
StorageApi storageRemove DELETE /Storage/{appKey}/{table}/Remove 删除表
StorageApi storageStats GET /Storage/{appKey}/{table}/Stats 数据表统计
StorageApi storageTables GET /Storage/{appKey}/Tables 获取数据表
SystemFileApi systemFileCreateFolder POST /SystemFile/CreateFolder 创建文件夹
SystemFileApi systemFileDelete DELETE /SystemFile 删除文件
SystemFileApi systemFileRename POST /SystemFile/Rename 重命名文件
SystemFileApi systemFileUpload POST /SystemFile 上传文件
SystemFileApi systemFiles GET /SystemFile 获取文件列表
TeamApi teamDelete DELETE /Team/{id} 删除团队
TeamApi teamPost POST /Team 创建团队
TeamApi teamPut PUT /Team/{id} 更新团队信息
TeamApi teams GET /Team 获取团队列表
UserApi user GET /User/{appKey}/{id} 获取用户详情
UserApi userClear DELETE /User/{appKey}/Clear 清空用户数据
UserApi userCommonInterests GET /User/{appKey}/Friends/CommonInterests 有共同爱好的用户推荐
UserApi userDelete DELETE /User/{appKey}/{id} 删除用户
UserApi userEmailSignIn POST /User/{appKey}/EmailSignIn 邮箱登录
UserApi userEmailSignUp POST /User/{appKey}/EmailSignUp 邮箱注册
UserApi userExport GET /User/{appKey}/Export 导出用户数据
UserApi userFollowUser POST /User/{appKey}/Follower/{userId} 关注用户
UserApi userFollowerPut PUT /User/{appKey}/Follower/{id} 更新粉丝
UserApi userFollowers GET /User/{appKey}/Followers 获取我的粉丝列表
UserApi userFollowing GET /User/{appKey}/Following 获取我的关注列表
UserApi userFriendsNearBy GET /User/{appKey}/Friends/NearBy 附近的用户推荐
UserApi userImport POST /User/{appKey}/Import 导入用户数据
UserApi userLocation GET /User/{appKey}/Location/{id} 获取位置详情
UserApi userLocationDelete DELETE /User/{appKey}/Location/{id} 删除位置
UserApi userLocationPost POST /User/{appKey}/Location 添加位置
UserApi userLocationPut PUT /User/{appKey}/Location/{id} 更新位置
UserApi userLocations GET /User/{appKey}/Locations 获取位置列表
UserApi userMutualFollowers GET /User/{appKey}/Friends/MutualFollowers 有共同粉丝的用户推荐
UserApi userMutualFollowings GET /User/{appKey}/Friends/MutualFollowings 有共同关注的用户推荐
UserApi userOAuthAccountBind POST /User/{appKey}/OAuthAccountBind 外部账号 绑定
UserApi userOAuthAccountSignIn POST /User/{appKey}/OAuthAccountSignIn 外部账号 登录
UserApi userOAuthAccounts GET /User/{appKey}/OAuthAccounts 外部账号 绑定列表
UserApi userOAuthAccountsPutBind PUT /User/{appKey}/OAuthAccounts/{id} 外部账号 更新绑定
UserApi userOAuthAccountsUnBind DELETE /User/{appKey}/OAuthAccounts/{id} 外部账号 删除绑定
UserApi userPhoneSignIn POST /User/{appKey}/PhoneSignIn 手机登录
UserApi userPhoneSignUp POST /User/{appKey}/PhoneSignUp 手机注册
UserApi userProfile GET /User/{appKey}/Profile 获取个人资料
UserApi userPut PUT /User/{appKey}/{id} 更新用户信息
UserApi userQRCodePreSignIn POST /User/{appKey}/QRCodePreSignIn 微信小程序 - 预登陆
UserApi userQRCodeScan POST /User/{appKey}/QRCodeScan 微信小程序 - 扫码
UserApi userQRCodeSignIn POST /User/{appKey}/QRCodeSignIn 微信小程序 - 网页登录
UserApi userQRCodeSignUp POST /User/{appKey}/QRCodeSignUp 微信小程序 - 注册
UserApi userResetPwd POST /User/{appKey}/ResetPwd 重置密码
UserApi userSendEmailCode POST /User/{appKey}/SendEmailCode 发送邮箱验证码
UserApi userSendSMSCode POST /User/{appKey}/SendSMSCode 发送手机验证码
UserApi userSignIn POST /User/{appKey}/SignIn 账号密码 登录
UserApi userSignUp POST /User/{appKey}/SignUp 账号密码 注册
UserApi userTwoFactorAuth GET /User/{appKey}/TwoFactorAuth 双因素验证
UserApi userUnfollowUser DELETE /User/{appKey}/Follower/{userId} 取消关注
UserApi userUnionIDSignIn POST /User/{appKey}/UnionIDSignIn UnionID登录
UserApi userUnionIDSignUp POST /User/{appKey}/UnionIDSignUp UnionID注册
UserApi userUpdateProfile PUT /User/{appKey}/Profile 更新个人资料
UserApi users GET /User/{appKey} 获取用户列表
UserCurrencyApi userCurrencies GET /UserCurrency/{appKey}/{id} 获取用户资产
UserCurrencyApi userCurrencyConsume POST /UserCurrency/{appKey}/CurrencyConsume 消费虚拟币
UserCurrencyApi userCurrencyExchange POST /UserCurrency/{appKey}/CurrencyExchange 兑换虚拟币
UserCurrencyApi userCurrencyRecharge POST /UserCurrency/{appKey}/CurrencyRecharge 充值虚拟币
UserCurrencyApi userCurrencyTransactions GET /UserCurrency/{appKey}/CurrencyTransactions 虚拟币交易记录
UserSettingApi userSetting GET /UserSetting/{appKey}/{id} 获取用户配置项详情
UserSettingApi userSettingDelete DELETE /UserSetting/{appKey}/{id} 删除用户配置项
UserSettingApi userSettingPost POST /UserSetting/{appKey} 添加用户配置项
UserSettingApi userSettingPut PUT /UserSetting/{appKey}/{id} 更新用户配置项
UserSettingApi userSettings GET /UserSetting/{appKey} 获取用户配置列表
WechatApi wechatDecrypt GET /Wechat/{appKey}/Decrypt 小程序-解密数据
WechatApi wechatGenerateScheme POST /Wechat/{appKey}/GenerateScheme 小程序-生成scheme码(该接口用于获取小程序 scheme 码,适用于短信、邮件、外部网页、微信内等拉起小程序的业务场景)
WechatApi wechatJSCode2Session GET /Wechat/{appKey}/JSCode2Session 小程序-登录凭证校验
WechatApi wechatJSConfig GET /Wechat/{appKey}/JSConfig 公众号H5-JS SDK Config
WechatApi wechatSubscribeMSG POST /Wechat/{appKey}/SubscribeMSG 公众号H5-发送一次性订阅消息
WechatApi wechatSubscribeSend POST /Wechat/{appKey}/SubscribeSend 小程序-发送订阅消息
WechatApi wechatUrlLinkGenerate POST /Wechat/{appKey}/UrlLinkGenerate 小程序-生成网页跳转地址(获取小程序 URL Link,适用于短信、邮件、网页、微信内等拉起小程序的业务场景)
WechatApi wechatUserInfo GET /Wechat/{appKey}/UserInfo 公众号H5-获取用户UnionID
WechatApi wechatWXACodeGet POST /Wechat/{appKey}/WXACodeGet 小程序-获取小程序码
WechatApi wechatWXACodeGetUnlimited POST /Wechat/{appKey}/WXACodeGetUnlimited 小程序-获取小程序码(无限制)

数据结构