{"id":16315138,"url":"https://github.com/glendemon/dadata-suggestions","last_synced_at":"2025-10-25T17:30:21.142Z","repository":{"id":62511257,"uuid":"58721722","full_name":"glendemon/dadata-suggestions","owner":"glendemon","description":"Integration with Dadata suggestions API.","archived":false,"fork":false,"pushed_at":"2020-05-26T14:38:16.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T09:22:20.657Z","etag":null,"topics":["dadata","dadata-suggestions","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glendemon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-13T09:09:23.000Z","updated_at":"2021-01-13T12:13:20.000Z","dependencies_parsed_at":"2022-11-02T10:17:09.604Z","dependency_job_id":null,"html_url":"https://github.com/glendemon/dadata-suggestions","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glendemon%2Fdadata-suggestions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glendemon%2Fdadata-suggestions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glendemon%2Fdadata-suggestions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glendemon%2Fdadata-suggestions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glendemon","download_url":"https://codeload.github.com/glendemon/dadata-suggestions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238183513,"owners_count":19430133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dadata","dadata-suggestions","php"],"created_at":"2024-10-10T21:56:14.994Z","updated_at":"2025-10-25T17:30:20.840Z","avatar_url":"https://github.com/glendemon.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"DadataSuggestions\n=================\n\nIntegration with Dadata suggestions API.\n\n[![Latest Stable Version](https://poser.pugx.org/glendemon/dadata-suggestions/v/stable)](https://packagist.org/packages/glendemon/dadata-suggestions)\n[![Total Downloads](https://poser.pugx.org/glendemon/dadata-suggestions/downloads)](https://packagist.org/packages/glendemon/dadata-suggestions)\n[![Latest Unstable Version](https://poser.pugx.org/glendemon/dadata-suggestions/v/unstable)](https://packagist.org/packages/glendemon/dadata-suggestions)\n[![License](https://poser.pugx.org/glendemon/dadata-suggestions/license)](https://packagist.org/packages/glendemon/dadata-suggestions)\n\nInstallation\n-------------\n\nThis extension is available at packagist.org and can be installed via composer by following command:\n\n`composer require glendemon/dadata-suggestions`\n\nConfiguration\n---------\n\nYou can customize debug panel behavior with this options:\n\n- `token` - private api token [required].\n- `url` - path to suggestions api [optional].\n- `client` - GuzzleHttp\\Client [optional].\n\nExample:\n\n```php\n$service = new \\DadataSuggestions\\DadataSuggestionsService();\n$service-\u003esetUrl('https://suggestions.dadata.ru/suggestions/api/4_1/rs/suggest/');\n$service-\u003esetToken('...');\n```\n\n```php\n    public function testSuggestAddressFlat()\n    {\n        $service = $this-\u003egetService();\n        $response = $service-\u003esuggestAddress('мск балтийская 6к1 5');\n        foreach ($response-\u003egetSuggestions() as $suggestion) {\n            $this-\u003eassertEquals('г Москва, ул Балтийская, д 6 к 1, кв 5', $suggestion-\u003egetValue());\n            $this-\u003eassertEquals('г Москва, ул Балтийская, д 6 к 1, кв 5', $suggestion-\u003egetUnrestrictedValue());\n            $data = $suggestion-\u003egetData();\n            $this-\u003eassertInstanceOf(\\DadataSuggestions\\Data\\Address::class, $data);\n            $this-\u003eassertEquals('Россия', $data-\u003ecountry);\n            $this-\u003eassertEquals('Москва', $data-\u003ecity);\n            $this-\u003eassertEquals('ул Балтийская', $data-\u003estreet_with_type);\n            $this-\u003eassertEquals('6', $data-\u003ehouse);\n            $this-\u003eassertEquals('1', $data-\u003eblock);\n            $this-\u003eassertEquals('5', $data-\u003eflat);\n        }\n    }\n    \n    /**\n     * @return \\DadataSuggestions\\DadataSuggestionsService\n     */\n    protected function getService()\n    {\n        $service = new \\DadataSuggestions\\DadataSuggestionsService();\n        $service-\u003esetToken('...');\n        return $service;\n    }\n```\n\nLinks\n------\n[API documentation](https://dadata.ru/api/suggest/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglendemon%2Fdadata-suggestions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglendemon%2Fdadata-suggestions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglendemon%2Fdadata-suggestions/lists"}