diff --git a/LICENSE b/LICENSE index c2a338b..e85dca7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 CLICKSPORTS GmbH +Copyright (c) 2023 Sysix Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ea5dc36..3ebfcb8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Lexoffice PHP API -![tests](https://github.com/clicksports/lexoffice-php-api/workflows/tests/badge.svg) -[![Latest Stable Version](https://poser.pugx.org/clicksports/lex-office-api/v)](//packagist.org/packages/clicksports/lex-office-api) -[![License](https://poser.pugx.org/clicksports/lex-office-api/license)](//packagist.org/packages/clicksports/lex-office-api) +![tests](https://github.com/sysix/lexoffice-php-api/workflows/tests/badge.svg) +[![Latest Stable Version](https://poser.pugx.org/sysix/lex-office-api/v)](//packagist.org/packages/sysix/lex-office-api) +[![License](https://poser.pugx.org/sysix/lex-office-api/license)](//packagist.org/packages/sysix/lex-office-api) ## Requirements @@ -12,7 +12,7 @@ Extensions: [Composer](https://getcomposer.org/), [PHP-JSON](https://www.php.net ## Install composer: -`composer require clicksports/lex-office-api` +`composer require sysix/lex-office-api` ## Usage @@ -22,14 +22,14 @@ You need an [API Key](https://app.lexoffice.de/addons/public-api) for that. ### Basic ```php $apiKey = getenv('LEX_OFFICE_API_KEY'); // store keys in .env file -$api = new \Clicksports\LexOffice\Api($apiKey); +$api = new \Sysix\LexOffice\Api($apiKey); ``` ### Contact Endpoint ```php // get a page -/** @var \Clicksports\LexOffice\Api $api */ +/** @var \Sysix\LexOffice\Api $api */ $client = $api->contact(); $client->size = 100; @@ -221,7 +221,7 @@ $json = $api->*()->getAsJson($response); ```php try { $api->*->*(); -} catch(\Clicksports\LexOffice\Exceptions\LexOfficeApiException $exception) { +} catch(\Sysix\LexOffice\Exceptions\LexOfficeApiException $exception) { $json = $api->*()->getAsJson($exception->getPrevious()->getResponse()); } ``` diff --git a/UPDATE.md b/UPDATE.md index a0df83c..c88fb47 100644 --- a/UPDATE.md +++ b/UPDATE.md @@ -1,26 +1,32 @@ # Update from Version 0.x to 1.0 -## Functions Removed +## Namespace Changed -- `$api->setCacheInterface()` -- `$api->getCacheResponse()` -- `$api->setCacheResponse()` +All Classses with started with `\Clicksports\Lexoffice` are now under `\Sysix\Lexoffice`. -For settings a Cache Interface check out [guzzle-cache-middleware](https://github.com/Kevinrob/guzzle-cache-middleware). -And implement it with: -`$api = new \Clicksports\LexOffice\Api($apiKey, $guzzleClient);` +## Clients Namespace changed -## Exceptions Removed +In Version `0.x` all Clients had a separate folder/namespace. Now they will all use the namespace +`\Sysix\Lexoffice\Clients` -- `\Clicksports\Lexoffice\Exception\CacheException` -- `\Clicksports\Lexoffice\Exception\BadMethodException` +## Cache removed + +For settings a Cache Interface check out [guzzle-cache-middleware](https://github.com/Kevinrob/guzzle-cache-middleware). +And implement it with: +`$api = new \Sysix\LexOffice\Api($apiKey, $guzzleClient);` ## Clients Method which will throw a BadMethodException We implemented in the `0.x` Version some methods for the future of lexoffice API. At the moment, it doesn't look like the endpoint will be added soon. So we will remove them. -## Clients Namespace changed +## Functions Removed -In Version `0.x` all Clients had a separate folder/namespace. Now they will all use the namespace -`\Clicksports\Lexoffice\Clients` \ No newline at end of file +- `$api->setCacheInterface()` +- `$api->getCacheResponse()` +- `$api->setCacheResponse()` + +## Exceptions Removed + +- `\Sysix\Lexoffice\Exception\CacheException` +- `\Sysix\Lexoffice\Exception\BadMethodException` \ No newline at end of file diff --git a/composer.json b/composer.json index 23588d3..6d4cce8 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "clicksports/lex-office-api", + "name": "sysix/lex-office-api", "type": "library", "description": "Simple API Integration for Lex-Office", "scripts": { @@ -28,12 +28,12 @@ }, "autoload": { "psr-4": { - "Clicksports\\LexOffice\\": "src/" + "Sysix\\LexOffice\\": "src/" } }, "autoload-dev": { "psr-4": { - "Clicksports\\LexOffice\\Tests\\": "tests/" + "Sysix\\LexOffice\\Tests\\": "tests/" } }, "minimum-stability": "dev", diff --git a/composer.lock b/composer.lock index 1240a38..6ace916 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aa25055c94c55b93b571ae0a656a08c5", + "content-hash": "96f02fa62947984831e70f87007efe49", "packages": [ { "name": "guzzlehttp/guzzle", diff --git a/src/Api.php b/src/Api.php index 887a889..607d2ca 100644 --- a/src/Api.php +++ b/src/Api.php @@ -1,24 +1,24 @@