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

Commit e2902ed

Browse files
committed
Change api.deepl.com' to api-free.deepl.com for next Major release
1 parent 2e9eee0 commit e2902ed

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# deepl-php-lib -
1+
# deepl-php-lib
22
***
33
## Deprecated Library !
44

@@ -54,7 +54,7 @@ Use the DeepL API Pro:
5454
use \BabyMarkt\DeepL\DeepL;
5555

5656
$authKey = '<AUTH KEY>';
57-
$deepl = new DeepL($authKey,2,'api.deepl.com');
57+
$deepl = new DeepL($authKey,2,'api-free.deepl.com');
5858
```
5959

6060
### Translate

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ final class Client implements ClientInterface
7171
* @param integer $apiVersion
7272
* @param string $host
7373
*/
74-
public function __construct($authKey, $apiVersion = 2, $host = 'api.deepl.com')
74+
public function __construct($authKey, $apiVersion = 2, $host = 'api-free.deepl.com')
7575
{
7676
$this->authKey = $authKey;
7777
$this->apiVersion = $apiVersion;

src/DeepL.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
/**
88
* DeepL API client library
9-
*
10-
* @package BabyMarkt\DeepL
119
*/
1210
class DeepL
1311
{
@@ -26,7 +24,7 @@ class DeepL
2624
*/
2725
private $client;
2826

29-
public function __construct($authKey, $apiVersion = 2, $host = 'api.deepl.com', ClientInterface $client = null)
27+
public function __construct($authKey, $apiVersion = 2, $host = 'api-free.deepl.com', ClientInterface $client = null)
3028
{
3129
$this->client = $client ?? new Client($authKey, $apiVersion, $host);
3230
}

src/Glossary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Glossary
2626
* @param string $host
2727
* @param ClientInterface|null $client
2828
*/
29-
public function __construct($authKey, $apiVersion = 2, $host = 'api.deepl.com', ClientInterface $client = null)
29+
public function __construct($authKey, $apiVersion = 2, $host = 'api-free.deepl.com', ClientInterface $client = null)
3030
{
3131
$this->client = $client ?? new Client($authKey, $apiVersion, $host);
3232
}

tests/integration/DeepLApiTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static function setUpBeforeClass(): void
4848
parent::setUpBeforeClass();
4949

5050
$authKey = getenv('DEEPL_AUTH_KEY');
51-
$apiHost = getenv('DEEPL_HOST') ?: 'api.deepl.com';
51+
$apiHost = getenv('DEEPL_HOST') ?: 'api-free.deepl.com';
5252
$proxy = getenv('HTTP_PROXY');
5353
$proxyCredentials = getenv('HTTP_PROXY_CREDENTIALS');
5454

tests/integration/GlossaryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static function setUpBeforeClass(): void
3030
parent::setUpBeforeClass();
3131

3232
$authKey = getenv('DEEPL_AUTH_KEY');
33-
$apiHost = getenv('DEEPL_HOST') ?: 'api.deepl.com';
33+
$apiHost = getenv('DEEPL_HOST') ?: 'api-free.deepl.com';
3434

3535
if ($authKey === false) {
3636
self::markTestSkipped('DeepL Auth Key (DEEPL_AUTH_KEY) is not configured.');

0 commit comments

Comments
 (0)