Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vaahru/vaah-avito-items-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

API для получение статистики по объявлениям, применения дополнительных услуг, а также просмотр статусов объявлений Авито API для бизнеса предоставляется согласно Условиям использования.

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/vaahru/vaah-avito-items-php.git"
    }
  ],
  "require": {
    "vaahru/vaah-avito-items-php": "*@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');

// Configure OAuth2 access token for authorization: AuthorizationCode
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
// Configure OAuth2 access token for authorization: ClientCredentials
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Swagger\Client\Api\DefaultApi(
    // 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
);
$item_id = 789; // int | Идентификатор объявления на сайте
$body = new \Swagger\Client\Model\UpdatePriceRequest(); // \Swagger\Client\Model\UpdatePriceRequest | Набор параметров в теле запроса.

try {
    $result = $apiInstance->updatePrice($item_id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->updatePrice: ', $e->getMessage(), PHP_EOL;
}
?>

Documentation for API Endpoints

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

Class Method HTTP request Description
DefaultApi updatePrice POST /core/v1/items/{item_id}/update_price Обновление цены объявления
ItemApi applyVas PUT /core/v2/items/{itemId}/vas/ Применение услуг продвижения
ItemApi getItemInfo GET /core/v1/accounts/{user_id}/items/{item_id}/ Получение информации по объявлению
ItemApi getItemsInfo GET /core/v1/items Получение информации по объявлениям
ItemApi itemStatsShallow POST /stats/v1/accounts/{user_id}/items Получение статистики по списку объявлений
ItemApi postCallsStats POST /core/v1/accounts/{user_id}/calls/stats/ Получение статистики по звонкам
ItemApi putItemVas PUT /core/v1/accounts/{user_id}/items/{item_id}/vas Применение дополнительных услуг
ItemApi putItemVasPackageV2 PUT /core/v2/accounts/{user_id}/items/{item_id}/vas_packages Применение пакета дополнительных услуг
ItemApi vasPrices POST /core/v1/accounts/{userId}/vas/prices Получение информации о стоимости услуг продвижения и доступных значках

Documentation For Models

Documentation For Authorization

AuthorizationCode

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://avito.ru/oauth
  • Scopes:
  • autoload:reports: Получение отчетов Автозагрузки
  • items:apply_vas: Применение дополнительных услуг
  • items:info: Получение информации об объявлениях
  • job:applications: Получение информации об откликах на вакансии
  • job:cv: Получение информации резюме
  • job:write: Изменение объявлений вертикали Работа
  • messenger:read: Чтение сообщений в мессенджере Авито
  • messenger:write: Модифицирование сообщений в мессенджере Авито
  • short_term_rent:read: Получение информации об объявлениях краткосрочной аренды
  • short_term_rent:write: Изменение объявлений краткосрочной аренды
  • stats:read: Получение статистики объявлений
  • user:read: Получение информации о пользователе
  • user_balance:read: Получение баланса пользователя
  • user_operations:read: Получение истории операций пользователя

ClientCredentials

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors