Skip to content

Commit

Permalink
Document locale_ids param
Browse files Browse the repository at this point in the history
  • Loading branch information
forelabs committed Aug 26, 2024
1 parent 11003ac commit 669b848
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
13 changes: 12 additions & 1 deletion doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -8924,6 +8924,17 @@
"type": "boolean",
"example": null
},
"locale_ids": {
"description": "Locale IDs or locale names",
"type": "array",
"items": {
"type": "string"
},
"example": [
"de",
"en"
]
},
"fallback_locale_id": {
"description": "If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.",
"type": "string",
Expand Down Expand Up @@ -8979,7 +8990,7 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "\ncurl \"https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"branch\":\"my-feature-branch\",\"file_format\":\"yml\",\"tags\":\"feature1,feature\",\"custom_metadata_filters\":{\"tone\":\"friendly\"}}' \\\n -H 'Content-Type: application/json'"
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"branch\":\"my-feature-branch\",\"file_format\":\"yml\",\"tags\":\"feature1,feature\",\"custom_metadata_filters\":{\"tone\":\"friendly\"}}' \\\n -H 'Content-Type: application/json'"
},
{
"lang": "CLI v2",
Expand Down
10 changes: 8 additions & 2 deletions paths/locale_downloads/create.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
summary: Initiate async download of a locale
description: Prepare a locale for download in a specific file format.
operationId: locale_download/create
Expand Down Expand Up @@ -65,6 +64,14 @@ requestBody:
description: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
type: boolean
example:
locale_ids:
description: Locale IDs or locale names
type: array
items:
type: string
example:
- de
- en
fallback_locale_id:
description: If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.
type: string
Expand Down Expand Up @@ -101,7 +108,6 @@ responses:
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
Expand Down

0 comments on commit 669b848

Please sign in to comment.