verdigado/gruene-api-client

PHP client library for gruene api

0.2.0 2024-04-26 12:15 UTC

This package is auto-updated.

Last update: 2024-04-26 12:16:45 UTC


README

The API documentation can be found at https://api.gruene.de/api

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

Use with composer

composer require verdigado/gruene-api-client

Getting Started

<?php
require_once 'vendor/autoload.php';

use Verdigado\GrueneApiClient\apis\UsersApi;
use Verdigado\GrueneApiClient\Configuration;

$config = new Configuration();
$config->setApiKey('x-api-key', 'api_key');

$usersApi = new UsersApi(null, $config);

try {
    $user = $usersApi->getUser('10005');
    print_r($user->getUsername());
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}