Skip to content

Commit c47d45b

Browse files
authored
Merge pull request #165 from DeepLcom/client-libraries
Move client libraries to "Getting Started", tweak content Include redirect from old location, update all links
2 parents f2ef79b + c25075f commit c47d45b

File tree

8 files changed

+30
-26
lines changed

8 files changed

+30
-26
lines changed

api-reference/document.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ Content-Type: application/json
301301

302302
The examples on this page show how to translate documents with DeepL using the API directly.
303303

304-
DeepL's [client libraries](/api-reference/client-libraries) simplify API document translation by providing a convenience function to upload the document, check translation status and download the translated document with a single function call.
304+
DeepL's [client libraries](/docs/getting-started/client-libraries) simplify API document translation by providing a convenience function to upload the document, check translation status and download the translated document with a single function call.
305305

306306
### Document format conversions
307307

docs.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"docs/getting-started/intro",
4141
"docs/getting-started/about",
4242
"docs/getting-started/auth",
43+
"docs/getting-started/client-libraries",
4344
"docs/getting-started/managing-api-keys",
4445
"docs/getting-started/your-first-api-request",
4546
"docs/getting-started/test-your-api-requests-with-postman",
@@ -206,10 +207,6 @@
206207
"api-reference/admin-api/organization-usage-analytics",
207208
"api-reference/admin-api/get-usage-analytics"
208209
]
209-
},
210-
{
211-
"group": "Client libraries",
212-
"pages": ["api-reference/client-libraries"]
213210
}
214211
]
215212
}
@@ -372,6 +369,10 @@
372369
"source": "/docs/resources/release-notes",
373370
"destination": "/docs/resources/roadmap-and-release-notes"
374371
},
372+
{
373+
"source": "/api-reference/client-libraries",
374+
"destination": "/docs/getting-started/client-libraries"
375+
},
375376
{
376377
"source": "/docs/resources/release-notes/rss.xml",
377378
"destination": "/docs/resources/roadmap-and-release-notes/rss.xml"

docs/best-practices/cors-requests.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ If you realize your API authentication key has been compromised, log in to your
1111

1212
To safely use the DeepL API on your website or application, you can route your requests through your own backend servers. This keeps your credentials hidden and allows you to specify CORS policies and rate limits as required by your use case.
1313

14-
DeepL's official open-source [client libraries](/api-reference/client-libraries) can help you create these backend implementations.
14+
DeepL's official open-source [client libraries](/docs/getting-started/client-libraries) can help you create these backend implementations.

docs/best-practices/error-handling.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ public: true
55

66
Errors are indicated by [standard HTTP status codes](https://developer.mozilla.org/docs/Web/HTTP/Status). It is important to make sure that your application handles errors in an appropriate way. To that end, please consult the list of expected status code results that are provided with each endpoint's documentation in the API Reference.
77

8-
* **HTTP 429: too many requests.** This is an error that you might receive when sending many API requests in a short period of time. Your application should be configured to resend the requests after some delay. Specifically, we recommend implementing retries with exponential backoff. This is implemented in all of the official, DeepL-supported [client libraries](/api-reference/client-libraries).
8+
* **HTTP 429: too many requests.** This is an error that you might receive when sending many API requests in a short period of time. Your application should be configured to resend the requests after some delay. Specifically, we recommend implementing retries with exponential backoff. This is implemented in all of the official, DeepL-supported [client libraries](/docs/getting-started/client-libraries).
99

1010
* **HTTP 456: quota exceeded** **If you're a Free API user**, you'll receive this error when the monthly 500,000 character limit of your subscription has been reached. You can consider [upgrading your subscription](https://www.deepl.com/pro) if you need more character volume. **If you're a Pro API user**, you'll receive this error when your [Cost Control](/docs/best-practices/cost-control)limit has been reached, and you can increase or remove your Cost Control limit if you need to continue translating. You can also use the [usage endpoint](/api-reference/usage-and-quota) to find out your currently used and available quota.
1111

12-
* **HTTP 500: internal server error** This is an error you'll receive if there are temporary errors in DeepL Services. Your application should be configured to resend the requests after some delay. Specifically, we recommend implementing retries with exponential backoff. This is implemented in all of the official, DeepL-supported [client libraries](/api-reference/client-libraries).
12+
* **HTTP 500: internal server error** This is an error you'll receive if there are temporary errors in DeepL Services. Your application should be configured to resend the requests after some delay. Specifically, we recommend implementing retries with exponential backoff. This is implemented in all of the official, DeepL-supported [client libraries](/docs/getting-started/client-libraries).
1313

1414
The service dynamically adjusts to the load on the system. Please wait to stop receiving errors to send more requests again. As the service adapts, you will be able to send increasingly more requests within a given amount of time without encountering errors.
1515

docs/best-practices/pre-production-checklist.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ public: true
55
---
66
As you prepare to open your DeepL-powered application up to the world, these tips will help you get ready for production.
77

8-
1. **Error handling:** If you receive 429 or 500 errors, use retries with exponential backoff. If you use one of [DeepL's official client libraries](/api-reference/client-libraries), you get this functionality out-of-the-box.
9-
2. **Persistent HTTP connection:** Especially for use cases with low latency requirements, we recommend using a persistent HTTP connection. [DeepL's official client libraries](/api-reference/client-libraries) use [Keep-Alive](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive) by default.
8+
1. **Error handling:** If you receive 429 or 500 errors, use retries with exponential backoff. If you use one of [DeepL's official client libraries](/docs/getting-started/client-libraries), you get this functionality out-of-the-box.
9+
2. **Persistent HTTP connection:** Especially for use cases with low latency requirements, we recommend using a persistent HTTP connection. [DeepL's official client libraries](/docs/getting-started/client-libraries) use [Keep-Alive](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive) by default.
1010
3. **Use the correct content type:** For text translation (the `/translate` endpoint), use form-encoded (`Content-Type: application/x-www-form-urlencoded`) or JSON-encoded (`Content-Type: application/json`) request bodies.
1111
* Uploading a file for document translation requires an HTTP POST request with `Content-Type: multipart/form-data`; this content type should not be used for text translation.
1212
4. **No query parameters:** Please do not make API requests using query parameters. The examples throughout the API reference include properly formed HTTP POST requests. For security reasons, be especially sure not to send your authentication key via query parameters.
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
---
22
title: "Client libraries"
33
public: true
4-
sidebarTitle: "Overview"
54
---
5+
## Official client libraries
66

7-
Client library features include but are not limited to:
8-
9-
* Out-of-the-box retries with exponential backoff for correct handling of 429 and 500 errors
10-
* Persistent HTTP connection (keep-alive) enabled by default
11-
* All document translation steps (upload, check status, and download) consolidated into a single convenience function
12-
13-
All officially supported client libraries, which you can find in the [DeepL Github Organization](https://github.com/DeepLcom/), are open source under the MIT License.
14-
15-
Please note that the Ruby client library is still under development and is not yet fully supported by DeepL. We will update this page when development work is complete!
16-
17-
We welcome feedback in the form of issues and pull requests!
7+
DeepL develops and supports client libraries for six popular languages:
188

199
<CardGroup cols={2}>
2010
<Card title="DeepL .NET Library" horizontal href="https://www.github.com/deeplcom/deepl-dotnet">
@@ -35,4 +25,17 @@ We welcome feedback in the form of issues and pull requests!
3525
<Card title="DeepL Java Library" horizontal href="https://www.github.com/deeplcom/deepl-java">
3626
deeplcom\deepl-java
3727
</Card>
38-
</CardGroup>
28+
</CardGroup>
29+
30+
Features include:
31+
32+
* Out-of-the-box retries with exponential backoff for correct handling of 429 and 500 errors
33+
* Persistent HTTP connection (keep-alive) enabled by default
34+
* All document translation steps (upload, check status, and download) consolidated into a single convenience function
35+
36+
All officially supported client libraries are open-source under the MIT License. We welcome feedback in the form of issues and pull requests!
37+
38+
## Community-created client libraries
39+
40+
The DeepL community [maintains client libraries](https://github.com/DeepLcom/awesome-deepl?tab=readme-ov-file#community-libraries--sdks) for other languages, including [Dart](https://github.com/komape/deepl_dart), [Go](https://github.com/candy12t/go-deepl), [Rust](https://github.com/Avimitin/deepl-rs), and [Kotlin](https://github.com/SimplyMika/DeeplKt).
41+

docs/getting-started/intro.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ New user? Follow these quick steps to get started with the DeepL API.
2323
Find your API key [here](https://www.deepl.com/your-account/keys).
2424
Then try making a simple translation request in one of these ways:
2525
* cURL or an HTTP request
26-
* with [our client libraries](/api-reference/client-libraries) for [Python](https://www.github.com/deeplcom/deepl-python), [JavaScript](https://www.github.com/deeplcom/deepl-node), [PHP](https://www.github.com/deeplcom/deepl-php), [.NET](https://www.github.com/deeplcom/deepl-dotnet), [Java](https://www.github.com/deeplcom/deepl-java), or [Ruby](https://www.github.com/deeplcom/deepl-rb)
26+
* with [our client libraries](/docs/getting-started/client-libraries) for [Python](https://www.github.com/deeplcom/deepl-python), [JavaScript](https://www.github.com/deeplcom/deepl-node), [PHP](https://www.github.com/deeplcom/deepl-php), [.NET](https://www.github.com/deeplcom/deepl-dotnet), [Java](https://www.github.com/deeplcom/deepl-java), or [Ruby](https://www.github.com/deeplcom/deepl-rb)
2727
* [in our playground](https://developers.deepl.com/api-reference/translate/request-translation?playground=open)
2828
* [in Postman](/docs/getting-started/test-your-api-requests-with-postman)
2929

@@ -239,7 +239,7 @@ New user? Follow these quick steps to get started with the DeepL API.
239239
</Tabs>
240240
</Step>
241241
<Step title="Step 3: Keep building with our client libraries and how-to guides" titleSize="h3">
242-
[Our official client libraries](/api-reference/client-libraries) let you use the API with six popular programming languages - [Python](https://www.github.com/deeplcom/deepl-python), [JavaScript](https://www.github.com/deeplcom/deepl-node), [PHP](https://www.github.com/deeplcom/deepl-php), [.NET](https://www.github.com/deeplcom/deepl-dotnet), [Java](https://www.github.com/deeplcom/deepl-java), or [Ruby](https://www.github.com/deeplcom/deepl-rb). The DeepL community has [contributed client libraries](https://github.com/DeepLcom/awesome-deepl?tab=readme-ov-file#community-libraries--sdks) for other languages, including [Dart](https://github.com/komape/deepl_dart), [Go](https://github.com/candy12t/go-deepl), and [Rust](https://github.com/Avimitin/deepl-rs). You may also wish to check out [these examples and guides](/docs/learning-how-tos/examples-and-guides).
242+
[Our official client libraries](/docs/getting-started/client-libraries) let you use the API with six popular programming languages - [Python](https://www.github.com/deeplcom/deepl-python), [JavaScript](https://www.github.com/deeplcom/deepl-node), [PHP](https://www.github.com/deeplcom/deepl-php), [.NET](https://www.github.com/deeplcom/deepl-dotnet), [Java](https://www.github.com/deeplcom/deepl-java), or [Ruby](https://www.github.com/deeplcom/deepl-rb). The DeepL community has [contributed client libraries](https://github.com/DeepLcom/awesome-deepl?tab=readme-ov-file#community-libraries--sdks) for other languages, including [Dart](https://github.com/komape/deepl_dart), [Go](https://github.com/candy12t/go-deepl), and [Rust](https://github.com/Avimitin/deepl-rs). You may also wish to check out [these examples and guides](/docs/learning-how-tos/examples-and-guides).
243243
</Step>
244244
</Steps>
245245

docs/getting-started/your-first-api-request.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Once you've created a DeepL API account and located your authentication key, you
1111

1212
To [translate text](/api-reference/translate), you can use the `/translate` endpoint, which also supports translation of [XML and HTML content](/api-reference/translate#in-text-markup).
1313

14-
We included text translation examples for our [client libraries](/api-reference/client-libraries), too, just to give you an idea of what they look like.
14+
We included text translation examples for our [client libraries](/docs/getting-started/client-libraries), too, just to give you an idea of what they look like.
1515

1616
<Tabs>
1717
<Tab title="HTTP Request">

0 commit comments

Comments
 (0)