nascom / toerisme-werkt-api-client
适用于 Toerisme Werkt API 的 PHP 客户端
0.1.0
2017-12-29 15:35 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpspec/phpspec: ^4.3
- symfony/var-dumper: ^4.0
This package is auto-updated.
Last update: 2024-08-29 05:06:06 UTC
README
安装
该库可在 packagist 上找到。
$ composer require nascom/toerisme-werkt-api-client
使用方法
<?php use GuzzleHttp\Client; use Nascom\ToerismeWerktApiClient\Http\ApiClient; use Nascom\ToerismeWerktApiClient\Request\Tags\ListTagsRequest; use Nascom\ToerismeWerktApiClient\Response\Tags\ListTagsResponse; // Instantiate the API client using your credentials and // a HTTP client. $client = new ApiClient( new Client(), 'https://api.toerismewerkt.be', 'your-api-key' ); // Perform requests by passing a request object to the client. $request = new ListTagsRequest(); /** @var ListTagsResponse $response */ $response = $client->handle($request); $tags = $response->getTags();
查看所有可用请求的列表,请参阅 Request 命名空间