From 283a2a4d7feb7e44565e879548632be9d0a74d40 Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Thu, 9 Dec 2021 14:35:58 +0100 Subject: [PATCH 1/2] Add namespace --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9c427f3..3bc2a1b 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,16 @@ composer require babymarkt/deepl-php-lib Create an instance with your auth key: ```php +use \BabyMarkt\DeepL\DeepL; + $authKey = ''; $deepl = new DeepL($authKey); ``` Use the DeepL API Pro: ```php +use \BabyMarkt\DeepL\DeepL; + $authKey = ''; $deepl = new DeepL($authKey,2,'api.deepl.com'); ``` @@ -110,7 +114,7 @@ You can now check how much you translate, as well as the limit: $usageArray = $deepl->usage(); echo 'You have used '.$usageArray['character_count'].' of '.$usageArray['character_limit'].' in the current billing period.'.PHP_EOL; - + ``` ### Glossary From aca7f4d584b6c49936d9c9e7d17dae41d633c12b Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Mon, 13 Dec 2021 12:41:52 +0100 Subject: [PATCH 2/2] Add namespace (Glossary) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3bc2a1b..8acbca6 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,8 @@ $glossary = $deepl->deleteGlossary($glossaryId); List glossaries ```php +use \BabyMarkt\DeepL\Glossary; + $glossaries = $deepl->listGlossaries(); foreach ($glossaries as $glossary) { var_dump($glossary); @@ -149,6 +151,8 @@ foreach ($glossaries as $glossary) { Get glossary meta information: creation date, is glossary ready to use ... ```php +use \BabyMarkt\DeepL\Glossary; + $glossaryInformation = $deepl->glossaryInformation($glossaryId); var_dump($glossaryInformation); ```