i-doit / api-client-php

Easy-to-use, but feature-rich client library for i-doit's JSON-RPC API
GNU Affero General Public License v3.0
15 stars 12 forks source link

Installation instructions don't work #34

Open michael-schumann opened 1 year ago

michael-schumann commented 1 year ago

Hello everyone,

The standard installation does not work according to the instructions. Error message occurs on a Linux with Apache2 and PHP 8.2

Fatal error: Uncaught Error: Class "Idoit\APIClient\API" not found in /var/www/test/idoit-api/api.php:12 Stack trace: #0 {main} thrown in /var/www/test/idoit-api/api.php on line 12

My Code `use Idoit\APIClient\API; use Idoit\APIClient\Idoit;

require_once 'vendor/autoload.php';

$api = new API([ API::URL => 'https://demo.i-doit.com/src/jsonrpc.php', API::KEY => 'c1ia5q', API::USERNAME => 'admin', API::PASSWORD => 'admin' ]);

$request = new Idoit($api); $info = $request->readVersion();

var_dump($info);`

My environment: Debian 12, Apache 2.4.57-2 , PHP 8.2.7-1~deb12u1