PHP code example of nascom / toerisme-werkt-api-client

1. Go to this page and download the library: Download nascom/toerisme-werkt-api-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nascom / toerisme-werkt-api-client example snippets




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();