Skip to content

Commit 56fdc2a

Browse files
Add documentation for new style rules CRUD endpoints
1 parent e94a125 commit 56fdc2a

16 files changed

+1531
-221
lines changed

api-reference/languages/language-feature-use-cases.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,26 @@ else:
114114

115115
---
116116

117+
## Check if style rules are available for a target language
118+
119+
Use `product=style_rules` to query which languages support style rules. Style rules are target-language only — check
120+
that the target language is listed in the response. The `style_rules` product has no additional features, so only
121+
the language availability needs to be checked.
122+
123+
```
124+
GET /v3/languages?product=style_rules
125+
126+
languages = response
127+
target = languages.find(l => l.lang == selected_target_lang)
128+
129+
if target and target.usable_as_target:
130+
show style_rules_selector
131+
else:
132+
hide style_rules_selector
133+
```
134+
135+
---
136+
117137
## Determine feature support programmatically
118138

119139
Use `/v3/languages/products` to drive feature checks at runtime — without hardcoding which features are

0 commit comments

Comments
 (0)