Skip to content

tutu-ru/service-legal-suggester-swg-php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwaggerClient-php

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • 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": "composer",
      "url": "https://stash.tutu.ru/rest/composer/latest/"
    }
  ],
  "require": {
    "tutu-ru/lib-legalsuggesterclient": "*@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 TutuRu\LegalSuggesterClient\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()
);
$query = "query_example"; // string | Запрос, для которого нужно получить подсказки
$count = "count_example"; // string | Максимальное кол-во найденных совпадений

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

Using environment variables

It is available to use the environment variables to configure your client. Just like in go-lang clients.

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

$apiInstance = TutuRu\LegalSuggesterClient\Api\DefaultApi::fromEnv();

EnvConfiguration supports these variables:

  • LEGALSUGGESTER_HOST - the service's host, without a scheme.
  • LEGALSUGGESTER_HOST_SCHEME - the preferred scheme, if isn't specified, http will be used.
  • LEGALSUGGESTER_READ_TIMEOUT - how long the client will wait the response from the server. In the golang's time interval format, eg. 5s, 300ms, etc.
  • LEGALSUGGESTER_CONNECT_TIMEOUT - how long the client will wait the connection to be established. In the golang's time interval format too.
  • DEBUG - is the debugging enabled.

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
DefaultApi legalSuggesterServiceSuggestionsSearchGet GET /legal_suggester_service/suggestions/search Поиск юр. лиц

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages