jalismrs/stalactite-data-client

未提供描述(由Openapi Generator生成 https://github.com/openapitools/openapi-generator)

1.5.0 2023-08-03 07:50 UTC

This package is auto-updated.

Last update: 2024-09-03 10:02:54 UTC


README

未提供描述(由Openapi Generator生成 https://github.com/openapitools/openapi-generator)

安装与使用

要求

PHP 7.4 及以上版本。也应适用于 PHP 8.0。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/jalismrs/stalactite-data-client.git"
    }
  ],
  "require": {
    "jalismrs/stalactite-data-client": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门

请按照安装过程进行操作,然后运行以下命令

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



// Configure API key authorization: StalactiteToken
$config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKey('X-API-TOKEN', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Jalismrs\Stalactite\Client\Data\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-TOKEN', 'Bearer');


$apiInstance = new Jalismrs\Stalactite\Client\Data\Api\CustomersApi(
    // 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(),
    $config
);
$create_customer_request = new \Jalismrs\Stalactite\Client\Data\Model\CreateCustomerRequest(); // \Jalismrs\Stalactite\Client\Data\Model\CreateCustomerRequest

try {
    $result = $apiInstance->createCustomer($create_customer_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->createCustomer: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI都是相对于 https://stalactite.jalis.pro/data

模型

授权

API定义的认证方案

StalactiteToken

  • 类型: API密钥
  • API密钥参数名: X-API-TOKEN
  • 位置: HTTP头部

HealthToken

  • 类型: API密钥
  • API密钥参数名: X-HEALTH-TOKEN
  • 位置: HTTP头部

测试

要运行测试,使用

composer install
vendor/bin/phpunit

作者

关于此包

此PHP包由OpenAPI Generator项目自动生成

  • API版本: 1.5.0
    • 包版本: 1.5.0
  • 构建包: org.openapitools.codegen.languages.PhpClientCodegen