定制 werkspot/kvk-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

werkspot/kvk-api

Composer 安装命令:

composer require werkspot/kvk-api

包简介

PHP KVK API client

README 文档

README

This package provides a simple integration of the Official KVK Api for your PHP project.

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

Installation

With composer, add:

$ composer require werkspot/kvk-api

ROOT CERTIFICATE

On October 28, 2020, the KVK started signing the SSL connection with a self signed certificate from the dutch government. To prevent this package from breaking current implementations; SSL verification will be disabled by default. If you would like to enable the verification of the SSL certificates you can implement the path to the certificate (included) as the 3rd parameter of the factory. When failing to do so a deprecation error wil be triggered (E_USER_DEPRECATED).

Usage

profile query

use Werkspot\KvkApi\Http\Endpoint\Production;
use Werkspot\KvkApi\Http\Search\ProfileQuery;
use Werkspot\KvkApi\KvkClientFactory;

$client = KvkClientFactory::create('<YOUR_API_KEY>', new Production(), '/path/to/dutch-government-certificate.pem');

$profileQuery = new ProfileQuery();
$profileQuery->setKvkNumber('18079951');

$kvkPaginator = $client->getProfile($profileQuery);

foreach ($kvkPaginator->getItems() as $company) {
    // {your code}
}

// get next set of data
$kvkPaginator = $client->getNextPage($kvkPaginator);

Search query

use Werkspot\KvkApi\Http\Endpoint\Production;
use Werkspot\KvkApi\Http\Search\SearchQuery;
use Werkspot\KvkApi\KvkClientFactory;

$client = KvkClientFactory::create('<YOUR_API_KEY>', new Production());


$searchQuery = new SearchQuery();
$searchQuery->setStreet('ABEBE Bikilalaan');
$kvkPaginator = $client->fetchSearch($searchQuery);

// get next set of data
$kvkPaginator = $client->getNextPage($kvkPaginator);

Tests

To run the tests you can use the make commands in the projects root.

$ make test-cs
$ make test-unit
$ make test-integration

You can also automatically fix the coding standards with:

$ make fix-cs

Author

KVK API has been created by LauLaman and is currently maintained by the developers at Werkspot.

统计信息

  • 总下载量: 14.53k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 25
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固