brightwrite/brightwrite-php-sdk

1.0.13 2018-03-26 00:24 UTC

This package is not auto-updated.

Last update: 2024-09-29 03:20:44 UTC


README

BrightWrite API

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

  • API版本:0.1.7
  • 包版本:1.0.13
  • 构建日期:2018-03-26T00:20:23.932Z
  • 构建包:class io.swagger.codegen.languages.PhpClientCodegen

需求

PHP 5.4.0 及以上版本

安装与使用

Composer

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

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

然后运行 composer install

手动安装

下载文件并包含 autoload.php

    require_once('/path/to/BrightWrite/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit lib/Tests

入门指南

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

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

// Configure API key authorization: apiKeyHeader
BrightWrite\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// BrightWrite\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'BEARER');

$api_instance = new BrightWrite\Api\DefaultApi();

try {
    $api_instance->brightwriteControllerStatus();
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->brightwriteControllerStatus: ', $e->getMessage(), "\n";
}

?>

API端点文档

所有URI都是相对于 https://api.brightwrite.com/api/v1

模型文档

授权文档

apiKeyHeader

  • 类型:API密钥
  • API密钥参数名:x-api-key
  • 位置:HTTP头

作者