planviewer/api-client-php

API Client library to access Planviewer API's

1.0.4 2020-08-25 06:07 UTC

README

Composer Installation

By far the easiest way to install the api-client is to require it with Composer.

$ composer require "planviewer/api-client-php:^1.0.0"

{
    "require": {
        "planviewer/api-client-php": "^1.0.0"
    }
}

Manual Installation

If you're not familiar with using composer we've added a ZIP file to the releases containing the API client. Download the api-client-php from the releases page.

Basic Authentication

You'll need a Client & Secret in order to use Planviewer API's Log into https://www.planviewer.nl and go to your applications: https://www.planviewer.nl/my_api/applications/

Generate a random Client & Secret.

Add the Client & Secret to /config/config.php or to your configuration file.

return [
    'api-key' => '86c****7b',
    'api-secret' => '3783******6b3ab4c87fef3ffc*****bb058a72c****cbef2d',
];

Class integration

Add the use to your class or script. create an instance of the Planviewer object.

use Planviewer/Planviewer;

$planviewer = new Planviewer($config);

The Planviewer object contains all our API's. You can access the calls as follows:

/** Access Maps API  */
$planviewer->mapsApi>listViewers();

/** Access Data API  */
$planviewer->dataApi->getdataList();

/** Access Product API  */
$planviewer->productApi->getProducts();