metatavu/pakkasmarja-client-php

此包已被 放弃 并不再维护。未建议替代包。

0.0.26 2018-10-14 16:59 UTC

README

Pakkasmarja 的 REST API

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

  • API 版本:0.0.3
  • 包版本:0.0.26
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

需求

PHP 5.5 及以上版本

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/metatavu/pakkasmarja-client-php.git"
    }
  ],
  "require": {
    "metatavu/pakkasmarja-client-php": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php

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

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

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

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

// Configure API key authorization: bearer
Metatavu\Pakkasmarja\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Metatavu\Pakkasmarja\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Metatavu\Pakkasmarja\Api\ChatThreadsApi();
$threadId = 789; // int | chat thread id
$type = "type_example"; // string | report type. Accepted values summaryReport
$accept = "accept_example"; // string | Expected response format. Accepted values application/vnd.openxmlformats for Excel response

try {
    $result = $api_instance->getChatThreadReport($threadId, $type, $accept);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ChatThreadsApi->getChatThreadReport: ', $e->getMessage(), PHP_EOL;
}

?>

API 端点文档

所有 URI 都相对于 https:///rest/v1

模型文档

授权文档

bearer

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

作者