42videobricks/php-client

42videobricks是一个视频平台即服务(VPaaS)

1.4.0 2024-07-31 09:20 UTC

This package is not auto-updated.

Last update: 2024-09-27 17:55:52 UTC


README

42videobricks是一个视频平台即服务(VPaaS)

安装与使用

要求

PHP 7.4及更高版本。也应适用于PHP 8.0。

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/Package\Subpackage/vendor/autoload.php');

入门指南

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

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



// Configure API key authorization: gw-42vb-authorizer
$config = Api42Vb\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Api42Vb\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new Api42Vb\Client\Api\DataApi(
    // 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
);
$limit = 56; // int | Number of elements to return (default=10)
$offset = 56; // int | offset for pagination
$start_date = {{starDate}}; // string | Start date for the period
$end_date = {{endDate}}; // string | End date for the period

try {
    $result = $apiInstance->getDataVideoAnalytics($limit, $offset, $start_date, $end_date);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DataApi->getDataVideoAnalytics: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI相对于https://api-sbx.42videobricks.com

模型

授权

API定义的认证方案

api_key

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

gw-42vb-authorizer

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

测试

要运行测试,使用

composer install
vendor/bin/phpunit

作者

关于此包

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

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