Download the PHP package axt-team/uapi-sdk-php without Composer

On this page you can find all versions of the php package axt-team/uapi-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package uapi-sdk-php

uapi-sdk-php

Banner

PHP Docs

[!NOTE] 所有接口的 PHP 示例都可以在 UApi 的接口文档页面,向下滚动至 快速启动 区块后直接复制。

快速开始

特性

现在你不再需要反反复复的查阅文档了。

只需在 IDE 中键入 $client->,所有核心模块——如 social()、game()、image()——即刻同步展现。进一步输入即可直接定位到 getSocialQqUserinfo 这样的具体方法,其名称与文档的 operationId 严格保持一致,确保了开发过程的直观与高效。

所有方法签名只接受真实且必需的参数。当你在构建请求时,IDE 会即时提示 qq、username 等键名,这彻底杜绝了在关联数组中因键名拼写错误而导致的运行时错误。

针对 401、404、429 等标准 HTTP 响应,SDK 已将其统一映射为具名的异常类型。这些异常均附带 code、status、details 等关键上下文信息,确保你在日志中能第一时间准确、快速地诊断问题。

HTTP 层基于 Guzzle,构造函数会自动设置 Base URL、追加 Authorization 头并关闭 http_errors,方便你直接读取 JSON/字节响应;需要更细致的超时或代理策略时,可以按需扩展这段初始化逻辑。

如果你需要查看字段细节或内部逻辑,仓库中的 ./internal 目录同步保留了由 openapi-generator 生成的完整结构体,随时可供参考。

错误模型概览

HTTP 状态码 SDK 错误类型 附加信息
401/403 UnauthorizedError code、status
404 NotFoundError / NoMatchError code、status
400 InvalidParameterError / InvalidParamsError code、status、details
429 ServiceBusyError code、status、retry_after_seconds
5xx InternalServerErrorError / ApiErrorError code、status、details
其他 4xx UapiError code、status、details

其他 SDK

语言 仓库地址
Go https://github.com/AxT-Team/uapi-sdk-go
Python https://github.com/AxT-Team/uapi-sdk-python
TypeScript https://github.com/AxT-Team/uapi-sdk-typescript
Browser (TypeScript/JavaScript) https://github.com/AxT-Team/uapi-browser-sdk
Java https://github.com/AxT-Team/uapi-sdk-java
PHP(当前) https://github.com/AxT-Team/uapi-sdk-php
C# https://github.com/AxT-Team/uapi-sdk-csharp
C++ https://github.com/AxT-Team/uapi-sdk-cpp
Rust https://github.com/AxT-Team/uapi-sdk-rust

文档

访问 UApi文档首页 并选择任意接口,向下滚动到 快速启动 区块即可看到最新的 PHP 示例代码。


All versions of uapi-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package axt-team/uapi-sdk-php contains the following files

Loading the files please wait ...