Git Product home page Git Product logo

dadata's People

Contributors

alexmorbo avatar andreyprokofyev avatar camaxtly avatar kstkn avatar nyholm avatar vitaly-grechkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dadata's Issues

Не все возвращаемые поля есть в классе Address

В документации есть https://dadata.ru/api/clean/, а в абстрактном классе Address нет полей:

public $region_fias_id;
public $region_kladr_id;
public $region_with_type;
public $area_fias_id;
public $area_kladr_id;
public $area_with_type;
public $city_fias_id;
public $city_kladr_id;
public $city_with_type;
public $city_area;
public $city_district_fias_id;
public $city_district_kladr_id;
public $city_district_with_type;
public $city_district_type;
public $city_district_type_full;
public $settlement_fias_id;
public $settlement_kladr_id;
public $settlement_with_type;
public $street_fias_id;
public $street_kladr_id;
public $street_with_type;
public $house_fias_id;
public $house_kladr_id;

Особенно расстраивает отсутствие city_area

Update dependencies

I have laravel project and some deps is already uset recent version of doctrine/inflector.
When i try to install your lib, got error:

composer require kstkn/dadata
Using version ^1.2 for kstkn/dadata
./composer.json has been updated
Running composer update kstkn/dadata
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires kstkn/dadata ^1.2 -> satisfiable by kstkn/dadata[v1.2.0].
    - kstkn/dadata v1.2.0 requires doctrine/inflector ^1.2 -> found doctrine/inflector[v1.2.0, ..., 1.4.x-dev] but the package is fixed to 2.0.3 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Некорректно отдается number в стандартизации номера телефона

Наткнулся на проблему при стандартизации номера телефона.
Если смотреть, что отдает стандартизация от дадаты по номеру телефона, то получаю следующее:

array:12 [
  "source" => "79920073931"
  "type" => "Мобильный"
  "phone" => "+7 992 007-39-31"
  "country_code" => "7"
  "city_code" => "992"
  "number" => "0073931"
  "extension" => null
  "provider" => "ООО "Т2 Мобайл""
  "region" => "Свердловская область"
  "timezone" => "UTC+5"
  "qc_conflict" => 0
  "qc" => 0
]

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

Dadata\Response\Phone {#83
  +source: "79920073931"
  +type: "Мобильный"
  +phone: "+7 992 007-39-31"
  +country_code: 7
  +city_code: 992
  +number: 73931
  +extension: null
  +provider: "ООО "Т2 Мобайл""
  +region: "Свердловская область"
  +timezone: "UTC+5"
  +qc_conflict: 0
  +qc: 0
}

Как видно, поле number - имеет int'овое значение, нули обрезаются и если обращаться к этому полю, то финальный номер будет некорректен.

Лечится, если привести это поле к string типу

populateParty: ошибка в правовой форме

Неверно разбирается массив правой формы. Дадата отдает 4 элемента массива, а в коде list() присваивает только три значения:

list($code, $full, $short) = array_values($response['data']['opf']);

Client::populate() must be of the type array, null given

Hi, I'm trying to get data about Party (eg 7736050003)


Warning: array_values() expects parameter 1 to be array, null given in
/......./vendor/gietos/dadata/src/Client.php on line
314

Catchable fatal error: Argument 2 passed to Dadata\Client::populate() must be of the type array, null given, called in /....../vendor/gietos/dadata/src/Client.php on line 329 and defined in
/......./vendor/gietos/dadata/src/Client.php on line
289

вопрос по интеграции

Добрый день. пытаюсь понять как применить этот модуль в моем проекте. Насколько я понимаю он внедряется в контроллер (мне нужно при сохрании формы с данными о человеке автоматически исправлять в ФИО, телефоне и т.д. ошибки и сохранять в базу уже корректный вариант. Верно ли это и можно ли попросить помочь?

Пропал Client.php

Привет! В примере использования указан new Dadata\Client, данного класса нет, new \GuzzleHttp\Client() а GuzzleHttp нету даже в зависимостях

Argument 1 passed to Dadata\Client in Laravel

Во время выполнения composer install получаю следующую ошибку:

Illuminate\Foundation\ComposerScripts::postAutoloadDump
>@php artisan package:discover --ansi

In Client.php line 78:

  Argument 1 passed to Dadata\Client::__construct() must be an instance of Gu  
  zzleHttp\ClientInterface, instance of Illuminate\Foundation\Application giv  
  en, called in /home/domain.com/api/www/vendor/laravel/framework/src/Illumina  
  te/Foundation/ProviderRepository.php on line 208     

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

php artisan package:discover --ansi

Argument 1 passed to Dadata\Client::__construct() must be an instance of GuzzleHttp\ClientInterface, instance of Illuminate\Foundation\Application given, called in   
  /home/domain.com/api/www/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 208   

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.