revenexx/php
Composer 安装命令:
composer require revenexx/php
包简介
Revenexx PHP SDK.
README 文档
README
This repository is auto-generated by the Revenexx SDK Generator. Do not submit changes directly — they will be overwritten on the next generation run.
Revenexx API — revenexx Revenexx PHP SDK
Revenexx PHP SDK for server-side applications.
Installation
Install the SDK with Composer:
composer require revenexx/php
Getting Started
Init your SDK
Initialize your SDK with your Revenexx API endpoint, your tenant slug and your secret API key.
use RevenexxAPIRevenexx\Client; $client = (new Client()) ->setEndpoint('https://api.revenexx.com') // Your API Endpoint, all paths are versioned (/v1/...) ->setTenant('<TENANT_SLUG>') // Your tenant slug ->setApiKeyAuth('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ;
Make Your First Request
Once your SDK object is set, create any of the Revenexx service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the API References section.
$products = new Products($client); $result = $products->productsList();
Full Example
use RevenexxAPIRevenexx\Client; use RevenexxAPIRevenexx\Services\Products; $client = (new Client()) ->setEndpoint('https://api.revenexx.com') // Your API Endpoint, all paths are versioned (/v1/...) ->setTenant('<TENANT_SLUG>') // Your tenant slug ->setApiKeyAuth('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; $products = new Products($client); $result = $products->productsList(); $product = $products->productsGet( id: '<PRODUCT_ID>' );
Error Handling
The Revenexx PHP SDK raises a RevenexxAPIRevenexxException with message, code and response properties. You can handle any errors by catching RevenexxAPIRevenexxException and present the message to the user or handle it yourself based on the provided error information. Below is an example.
use RevenexxAPIRevenexx\RevenexxAPIRevenexxException; $products = new Products($client); try { $product = $products->productsGet( id: '<PRODUCT_ID>' ); } catch (RevenexxAPIRevenexxException $error) { echo $error->getMessage(); }
Learn more
You can use the following resources to learn more and get help
Contribution
This library is auto-generated by the Revenexx custom SDK Generator. To learn more about how you can help us improve this SDK, please check the contribution guide before sending a pull-request.
License
Please see the MIT license file for more information.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-11