kinoheld/generic-provider-client

1.3.1 2020-11-11 11:44 UTC

This package is auto-updated.

Last update: 2024-09-11 20:07:40 UTC


README

电影院电影

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

  • API版本:1.0.0
  • 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen

要求

PHP 5.5及以后版本

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/kinoheld/generic-provider-client.git"
    }
  ],
  "require": {
    "kinoheld/generic-provider-client": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

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

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

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

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

// Configure API key authorization: ApiKeyAuth
$config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$apiInstance = new kinoheld\GenericProviderClient\Api\BasicApi(
    // 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
);
$chainId = 56; // int | chain/company ID
$cinemaId = 56; // int | Pass a cinema id to retrieve the associated auditoriums.

try {
    $result = $apiInstance->getAuditoriums($chainId, $cinemaId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BasicApi->getAuditoriums: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: ApiKeyAuth
$config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$apiInstance = new kinoheld\GenericProviderClient\Api\BasicApi(
    // 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
);
$id = 56; // int | Pass an optional chain id to retrieve just the chain details of the given chain.

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

// Configure API key authorization: ApiKeyAuth
$config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$apiInstance = new kinoheld\GenericProviderClient\Api\BasicApi(
    // 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
);
$chainId = 56; // int | chain/company ID
$id = 56; // int | Pass an optional cinema id to retrieve just the cinema details of the given cinema.

try {
    $result = $apiInstance->getCinemas($chainId, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BasicApi->getCinemas: ', $e->getMessage(), PHP_EOL;
}

// Configure API key authorization: ApiKeyAuth
$config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = kinoheld\GenericProviderClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

$apiInstance = new kinoheld\GenericProviderClient\Api\BasicApi(
    // 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
);
$chainId = 56; // int | chain/company ID
$cinemaId = 56; // int | Pass a cinema id to retrieve the associated products.

try {
    $result = $apiInstance->getProducts($chainId, $cinemaId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BasicApi->getProducts: ', $e->getMessage(), PHP_EOL;
}
?>

API端点文档

所有URI均相对于https://virtserver.swaggerhub.com/mezmer/kinoheld/1.0.0

模型文档

授权文档

ApiKeyAuth

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

作者

sm@kinoheld.de