Giter VIP home page Giter VIP logo

abcpapiclient's Introduction

php клиент для abcp api

Установка

Установка с использованием composer и командной строки:

php composer.phar require nodasoft/abcp_api_client:1.2

Установка через конфигурационный файл composer.json:

  "require": {
    "nodasoft/abcp_api_client": "3.4"
  }

Установка через git:

скопировать репозиторий в проект и включить автозагрузчик:

require_once '__autoload.php';

Использование

Перед началом использования клиента необходимо получить данные для авторизации у менеджера платформы abcp

Ключ пользователя (userKey), e-mail для которого активирована услуга и пароль для доступа к службе.

Инициализация клиента:

$tecDocRestClient = new \NS\ABCPApi\RestApiClients\TecDoc();
$tecDocRestClient->setUserKey('your_userKey)
    ->setUserLogin('your_email')
    ->setUserPsw('your_password');

Установка произвольного адреса:

$tecDocRestClient->setHost

Получение списка производителей:

//$carType - тип автомобиля. 0 - все, 1 - легковые, 2- грузовые, 3-малотонажные
//$motorcyclesFilter - фильтрация по мотоциклам. 0 - все, 1 - только автомобили, 2 - только мотоциклы
$manufacturers = $tecDocRestClient->getManufacturers($carType, $motorcyclesFilter);

Получение списка моделей:

//$manufacturerId - идентификатор производителя
$models = $tecDocRestClient->getModels($manufacturerId);

Получение списка модификаций:

//$manufacturerId - идентификатор производителя
//$modelId - идентификатор модели
$modifications = $tecDocRestClient->getModifications($manufacturerId, $modelId);

Получение дерева групп деталей:

//$modificationId - идентификатор модификации
$tree = $tecDocRestClient->getModelVariant($modificationId);

Получение списка деталей по группе:

//$modificationId - идентификатор модификации
//$categoryId - идентификатор категории
$articles = $tecDocRestClient->getArticles($modificationId, $categoryId);

Получение списка деталей по группе, упрощенный:

//$modificationId - идентификатор модификации
//$categoryId - идентификатор категории
$articles = $tecDocRestClient->getArticlesSimplified($modificationId, $categoryId);

Получение детализированной информации по детали:

//$articleId - идентификатор детали
$article = $tecDocRestClient->getArticle($articleId);

Получение списка деталей по применимости:

//$articleId - идентификатор детали
$adaptability = $tecDocRestClient->getAdaptability($articleId);

Получение списка деталей аналогов:

//$articleId - идентификатор детали
//$analogType - тип аналогов, описан классом \NS\TecDocSite\Common\AnalogTypes
$analogs = $tecDocRestClient->getAnalogs($number, $analogType);

abcpapiclient's People

Contributors

antflk avatar rusart avatar veloriba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

eclipseauto

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.