Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e2ff8b3

Browse files
authored
Merge pull request #32 from grandeljay/improve-readme
Add namespace
2 parents e3dddc9 + aca7f4d commit e2ff8b3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@ composer require babymarkt/deepl-php-lib
2828
Create an instance with your auth key:
2929

3030
```php
31+
use \BabyMarkt\DeepL\DeepL;
32+
3133
$authKey = '<AUTH KEY>';
3234
$deepl = new DeepL($authKey);
3335
```
3436

3537
Use the DeepL API Pro:
3638
```php
39+
use \BabyMarkt\DeepL\DeepL;
40+
3741
$authKey = '<AUTH KEY>';
3842
$deepl = new DeepL($authKey,2,'api.deepl.com');
3943
```
@@ -110,7 +114,7 @@ You can now check how much you translate, as well as the limit:
110114
$usageArray = $deepl->usage();
111115

112116
echo 'You have used '.$usageArray['character_count'].' of '.$usageArray['character_limit'].' in the current billing period.'.PHP_EOL;
113-
117+
114118
```
115119

116120
### Glossary
@@ -137,6 +141,8 @@ $glossary = $deepl->deleteGlossary($glossaryId);
137141

138142
List glossaries
139143
```php
144+
use \BabyMarkt\DeepL\Glossary;
145+
140146
$glossaries = $deepl->listGlossaries();
141147
foreach ($glossaries as $glossary) {
142148
var_dump($glossary);
@@ -145,6 +151,8 @@ foreach ($glossaries as $glossary) {
145151

146152
Get glossary meta information: creation date, is glossary ready to use ...
147153
```php
154+
use \BabyMarkt\DeepL\Glossary;
155+
148156
$glossaryInformation = $deepl->glossaryInformation($glossaryId);
149157
var_dump($glossaryInformation);
150158
```

0 commit comments

Comments
 (0)