giansalex/sufel-client

Sufel 公司的 PHP 客户端

v1.0.0 2018-04-24 15:42 UTC

This package is auto-updated.

Last update: 2024-09-13 04:40:15 UTC


README

Sufel 公司的 API。

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

要求

PHP 5.5 及更高版本

安装与使用

Composer

要通过 Composer 安装绑定

composer require giansalex/sufel-client

入门

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

<?php
require_once(__DIR__ . '/vendor/autoload.php');
$config = Sufel\Client\Configuration::getDefaultConfiguration();
// Configure your host
$config->setHost('http://domain.com/api');
// Configure API key authorization: Bearer
$config->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Sufel\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Sufel\Client\Api\CompanyApi(
    // 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
);
$body = new \Sufel\Client\Model\FilesDocument(); // \Sufel\Client\Model\FilesDocument | Archivos del documento electrónico.

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

?>

API 端点文档

所有 URI 都是相对于 http://sufel.net/api

模型文档

授权文档

AdminToken

  • 类型: API 密钥
  • API 密钥参数名: token
  • 位置: URL 查询字符串

Bearer

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

作者

Giancarlos Salas
giansalex@gmail.com