创新/toerisme-werkt-api-client

为Toerisme Werkt API提供的PHP客户端

dev-master 2024-08-21 09:03 UTC

This package is not auto-updated.

Last update: 2024-10-03 08:33:12 UTC


README

安装

该库可在packagist上找到。

$ composer require novation/toerisme-werkt-api-client

使用方法

<?php

use GuzzleHttp\Client;
use Novation\ToerismeWerktApiClient\Http\ApiClient;
use Novation\ToerismeWerktApiClient\Request\Tags\ListTagsRequest;
use Novation\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();