Giter Club home page Giter Club logo

avito-php-api-auth's Introduction

SwaggerClient-php

Получение и обновление авторизационных токенов для персональной авторизации и авторизации приложений Авито 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/darkvovich/avito-php-api-auth.git"
    }
  ],
  "require": {
    "darkvovich/avito-php-api-auth": "*@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()
);
$client_id = "client_id_example"; // string | 
$client_secret = "client_secret_example"; // string | 
$grant_type = "grant_type_example"; // string | 

try {
    $result = $apiInstance->getAccessToken($client_id, $client_secret, $grant_type);
    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/

Class Method HTTP request Description
AccessApi getAccessToken POST /token Получение access token
ApplicationAccessApi getAccessTokenAuthorizationCode POST /token‎ Получение access token
ApplicationAccessApi refreshAccessTokenAuthorizationCode POST /token‎‎ Обновление access token

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:cv: Получение информации резюме
  • job:negotiations: Получение информации об откликах на вакансии
  • job:vacancy: Работа с вакансиями
  • 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]

avito-php-api-auth's People

Contributors

darkvovich avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.