brandon14/ebay-sdk-php

View on GitHub
src/Buy/Feed/V1/README.md

Summary

Maintainability
Test Coverage
# brandon14/ebay-buy-feed-v1

The Feed API provides the ability to download TSV_GZIP feed files containing eBay items and an hourly snapshot file for a specific category, date, and marketplace.<br /><br />In addition to the API, there is an open-source Feed SDK written in Java that downloads, combines files into a single file when needed, and unzips the entire feed file. It also lets you specify field filters to curate the items in the file.


## Installation & Usage

### Requirements

PHP 7.3 and later.
Should also work with PHP 8.0 but has not been tested.

### Composer

To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:

```json
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/brandon14/ebay-buy-feed-v1.git"
    }
  ],
  "require": {
    "brandon14/ebay-buy-feed-v1": "*@dev"
  }
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
<?php
require_once('/path/to/brandon14/ebay-buy-feed-v1/vendor/autoload.php');
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

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



// Configure OAuth2 access token for authorization: api_auth
$config = TNT\Ebay\Buy\Feed\V1\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new TNT\Ebay\Buy\Feed\V1\Api\AccessApi(
    // 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
);

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

```

## API Endpoints

All URIs are relative to *https://api.ebay.com/buy/feed/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccessApi* | [**getAccess**](docs/Api/AccessApi.md#getaccess) | **GET** /access | 
*FeedTypeApi* | [**getFeedType**](docs/Api/FeedTypeApi.md#getfeedtype) | **GET** /feed_type/{feed_type_id} | 
*FeedTypeApi* | [**getFeedTypes**](docs/Api/FeedTypeApi.md#getfeedtypes) | **GET** /feed_type | 
*FileApi* | [**downloadFile**](docs/Api/FileApi.md#downloadfile) | **GET** /file/{file_id}/download | 
*FileApi* | [**getFile**](docs/Api/FileApi.md#getfile) | **GET** /file/{file_id} | 
*FileApi* | [**getFiles**](docs/Api/FileApi.md#getfiles) | **GET** /file | 

## Models

- [Access](docs/Model/Access.md)
- [ApplicationAccess](docs/Model/ApplicationAccess.md)
- [Constraint](docs/Model/Constraint.md)
- [Dimension](docs/Model/Dimension.md)
- [Error](docs/Model/Error.md)
- [ErrorParameter](docs/Model/ErrorParameter.md)
- [FeedType](docs/Model/FeedType.md)
- [FeedTypeConstraint](docs/Model/FeedTypeConstraint.md)
- [FeedTypeSearchResponse](docs/Model/FeedTypeSearchResponse.md)
- [FileMetadata](docs/Model/FileMetadata.md)
- [FileMetadataSearchResponse](docs/Model/FileMetadataSearchResponse.md)
- [SupportedFeed](docs/Model/SupportedFeed.md)
- [SupportedSchema](docs/Model/SupportedSchema.md)
- [TimeDuration](docs/Model/TimeDuration.md)

## Authorization

### api_auth

- **Type**: `OAuth`
- **Flow**: `application`
- **Authorization URL**: ``
- **Scopes**: 
    - **https://api.ebay.com/oauth/api_scope/buy.item.feed**: View curated feeds of eBay items

## Tests

To run the tests, use:

```bash
composer install
vendor/bin/phpunit
```

## Author



## About this package

This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: `v1.0.2`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`