Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): Add show API endpoint for custom_metadata_labels #359

Merged
merged 10 commits into from
Dec 5, 2023
64 changes: 64 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -6166,6 +6166,70 @@
"x-cli-version": "2.9"
}
},
"/accounts/{account_id}/custom_metadata/labels/{id}": {
"get": {
"summary": "Get a single property",
"description": "Get details of a single custom property.",
"operationId": "custom_metadata_property/show",
"tags": [
"Custom Metadata"
],
"parameters": [
{
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/custom_metadata_property"
}
}
},
"headers": {
"X-Rate-Limit-Limit": {
"$ref": "#/components/headers/X-Rate-Limit-Limit"
},
"X-Rate-Limit-Remaining": {
"$ref": "#/components/headers/X-Rate-Limit-Remaining"
},
"X-Rate-Limit-Reset": {
"$ref": "#/components/headers/X-Rate-Limit-Reset"
}
}
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"429": {
"$ref": "#/components/responses/429"
}
},
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
},
{
"lang": "CLI v2",
"source": "phrase custom_metadata_labels show \\\n--account_id <account_id> \\\n--id <id> \\\n--access_token <token>"
}
],
"x-cli-version": "2.9"
}
},
"/accounts/{account_id}/invitations": {
"get": {
"summary": "List invitations",
Expand Down
3 changes: 3 additions & 0 deletions paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"/accounts/{account_id}/custom_metadata/labels":
get:
"$ref": "./paths/custom_metadata_properties/index.yaml"
"/accounts/{account_id}/custom_metadata/labels/{id}":
get:
"$ref": "./paths/custom_metadata_properties/show.yaml"
"/accounts/{account_id}/invitations":
get:
"$ref": "./paths/invitations/index.yaml"
Expand Down
42 changes: 42 additions & 0 deletions paths/custom_metadata_properties/show.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
summary: Get a single property
description: Get details of a single custom property.
operationId: custom_metadata_property/show
tags:
- Custom Metadata
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/id"
responses:
'200':
description: OK
content:
application/json:
schema:
"$ref": "../../schemas/custom_metadata_property.yaml#/custom_metadata_property"
headers:
X-Rate-Limit-Limit:
"$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
X-Rate-Limit-Remaining:
"$ref": "../../headers.yaml#/X-Rate-Limit-Remaining"
X-Rate-Limit-Reset:
"$ref": "../../headers.yaml#/X-Rate-Limit-Reset"
'400':
"$ref": "../../responses.yaml#/400"
'404':
"$ref": "../../responses.yaml#/404"
'429':
"$ref": "../../responses.yaml#/429"
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase custom_metadata_labels show \
--account_id <account_id> \
--id <id> \
--access_token <token>
x-cli-version: '2.9'
Loading