covox/avito_api2

dev-master 2019-09-16 16:36 UTC

This package is auto-updated.

Last update: 2024-09-13 13:36:29 UTC


README

Общая информация Описание API произведено в формате Swagger 3.0. Вы можете использовать данный файл для ознакомления с методами API, а также для генерации базового кода для работы с API на удобном для вас языке программирования с помощью утилиты Swagger Codegen или online сервиса Swagger Editor. Авито API для бизнеса предоставляется согласно Условиям использования. По всем вопросам работы с API необходимо обращаться в Службу Поддержки профессиональных инструментов:
  • телефон: +7 495 777-10-66
  • email: <a href="mailto:supportautoload@avito.ru">supportautoload@avito.ru
  • This PHP package is automatically generated by the Swagger Codegen project:

    • API version: 1
    • Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen

    Requirements

    PHP 5.5 and later

    Installation & Usage

    Composer

    To install the bindings via Composer, add the following to composer.json:

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

    Then run composer install

    Manual Installation

    Download the files and include autoload.php:

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

    Tests

    To run the unit tests:

    composer install
    ./vendor/bin/phpunit
    

    Getting Started

    Please follow the installation procedure and then run the following:

    <?php
    require_once(__DIR__ . '/vendor/autoload.php');
    
    $apiInstance = new Swagger\Client\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()
    );
    $grant_type = "grant_type_example"; // string | Тип OAuth flow. В данный момент поддерживается только client_credentials
    $client_id = "client_id_example"; // string | 
    $client_secret = "client_secret_example"; // string | 
    
    try {
        $result = $apiInstance->getAccessToken($grant_type, $client_id, $client_secret);
        print_r($result);
    } catch (Exception $e) {
        echo 'Exception when calling AccessApi->getAccessToken: ', $e->getMessage(), PHP_EOL;
    }
    ?>

    Documentation for API Endpoints

    All URIs are relative to https://api.avito.ru/

    Documentation For Models

    Documentation For Authorization

    All endpoints do not require authorization.

    Author

    supportautoload@avito.ru