jpvdw86/abby-vantage

1.0.0 2022-07-11 07:49 UTC

This package is auto-updated.

Last update: 2024-09-11 12:27:00 UTC


README

环境:生产
产品版本:1.0.0-0.37.11-20220624.1

要求

PHP 5.5 及以上

安装与使用

Composer

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

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/jpvdw86/abby-vantage.git"
    }
  ],
  "require": {
    "jpvdw86/abby-vantage": "*@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 OAuth2 access token for authorization: OAuth2Security
$config = jpvdw86\AbbyVantage\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new jpvdw86\AbbyVantage\Api\CatalogRecordsApi(
    // 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
);
$catalog_id = "catalog_id_example"; // string | Catalog identifier. You can find it in the list of all catalogs.
$body = array(new \jpvdw86\AbbyVantage\Model\AbbyyVantagePublicApiContractCatalogsRequestsRecordModel()); // \jpvdw86\AbbyVantage\Model\AbbyyVantagePublicApiContractCatalogsRequestsRecordModel[] | Records to add

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

// Configure OAuth2 access token for authorization: OAuth2Security
$config = jpvdw86\AbbyVantage\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new jpvdw86\AbbyVantage\Api\CatalogRecordsApi(
    // 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
);
$catalog_id = "catalog_id_example"; // string | Catalog identifier. You can find it in the list of all catalogs.
$body = array("body_example"); // string[] | An array of record identifiers to delete

try {
    $apiInstance->deleteRecords($catalog_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling CatalogRecordsApi->deleteRecords: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: OAuth2Security
$config = jpvdw86\AbbyVantage\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new jpvdw86\AbbyVantage\Api\CatalogRecordsApi(
    // 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
);
$catalog_id = "catalog_id_example"; // string | Catalog identifier. You can find it in the list of all catalogs.
$record_id = "record_id_example"; // string | Record identifier. You can find it in the list of records.

try {
    $result = $apiInstance->getRecord($catalog_id, $record_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogRecordsApi->getRecord: ', $e->getMessage(), PHP_EOL;
}

// Configure OAuth2 access token for authorization: OAuth2Security
$config = jpvdw86\AbbyVantage\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new jpvdw86\AbbyVantage\Api\CatalogRecordsApi(
    // 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
);
$catalog_id = "catalog_id_example"; // string | Catalog identifier. You can find it in the list of all catalogs.
$offset = 0; // int | Pagination offset
$limit = 1000; // int | Maximum number of items to return

try {
    $result = $apiInstance->getRecords($catalog_id, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CatalogRecordsApi->getRecords: ', $e->getMessage(), PHP_EOL;
}
?>

API 端点文档

所有 URI 都相对于 /

模型文档

授权文档

OAuth2 安全

作者

Jean-Paul van der Wegen 由 swagger-codegen 生成

swagger-codegen generate -l php -i https://vantage-eu.abbyy.com/api/swagger/publicapi/v1 --git-repo-id abby-vantage --git-user-id jpvdw86 --invoker-package "jpvdw86\abby-vantage" -o /Volumes/Development/AbbyVantage