e-monsite/wuro-php-client

dev-master 2023-10-06 08:14 UTC

This package is auto-updated.

Last update: 2024-09-15 13:59:21 UTC


README

API de votre espace Wuro, connectez-vous sur https://wuro.pro,在企业设置“开发者(API)”中,创建一个具有特定范围的应用程序,用您的凭证请求访问令牌(GET accessToken)

此 PHP 包是由 Swagger Codegen 项目自动生成的

  • API 版本: 1.0.0
  • 打包包: io.swagger.codegen.v3.generators.php.PhpClientCodegen

要求

PHP 5.5 及更高版本

安装与使用

Composer

要通过 Composer 安装绑定,请将以下内容添加到 composer.json

{
  "repositories": [
    {
      "type": "git",
      "url": "http://github.com/e-monsite/wuro-php-client.git"
    }
  ],
  "require": {
    "e-monsite/wuro-php-client": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请遵循 安装过程,然后运行以下命令

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

$apiInstance = new Wuro\Api\Wuro\AuthApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$app_id = "app_id_example"; // string | Application ID
$app_secret = "app_secret_example"; // string | Application secret key

try {
    $result = $apiInstance->accessTokenGet($app_id, $app_secret);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthApi->accessTokenGet: ', $e->getMessage(), PHP_EOL;
}
?>

API 端点文档

所有 URI 都相对于 https://wuro.pro/api/v1

模型文档

授权文档

ApiKeyAuth

  • 类型: API 密钥
  • API 密钥参数名: Authorization
  • 位置: HTTP 头部

作者