Skip to content

feat: add Style Guides API support#251

Open
innomaxx wants to merge 1 commit into
mainfrom
feature/issue-247_add-style-guides
Open

feat: add Style Guides API support#251
innomaxx wants to merge 1 commit into
mainfrom
feature/issue-247_add-style-guides

Conversation

@innomaxx
Copy link
Copy Markdown
Collaborator

Closes #247

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Style Guides API support to the Crowdin Python client by introducing a new StyleGuidesResource (list/create/get/delete/patch) exposed via CrowdinClient.style_guides, along with corresponding enums, TypedDict request shapes, and unit tests. Resolves issue #247.

Changes:

  • New style_guides package (resource, enums, types, __init__) with CRUD methods under the style-guides path.
  • Re-exports StyleGuidesResource from crowdin_api/api_resources/__init__.py and wires it as a CrowdinClient property.
  • Adds resource unit tests following the existing pattern; also alphabetizes a few existing imports.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crowdin_api/api_resources/style_guides/resource.py New StyleGuidesResource implementing list/add/get/delete/edit operations.
crowdin_api/api_resources/style_guides/enums.py New ListStyleGuidesOrderBy and StyleGuidePatchPath enums.
crowdin_api/api_resources/style_guides/types.py New AddStyleGuideRequest and StyleGuidePatchRequest TypedDicts.
crowdin_api/api_resources/style_guides/init.py Excludes tests from pdoc output.
crowdin_api/api_resources/style_guides/tests/test_style_guides_resources.py Unit tests for the new resource methods and path helper.
crowdin_api/api_resources/init.py Exports StyleGuidesResource; re-sorts a few existing imports alphabetically.
crowdin_api/client.py Adds CrowdinClient.style_guides property.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +43 to +47
return self.requester.request(
method="get",
path=self.get_style_guides_path(),
params=params,
)
Comment thread crowdin_api/client.py
Comment on lines +363 to +367
@property
def style_guides(self) -> api_resources.StyleGuidesResource:
return api_resources.StyleGuidesResource(
requester=self.get_api_requestor(), page_size=self.PAGE_SIZE
)
Comment on lines 53 to 55
"StringCommentsResource",
"StyleGuidesResource",
"StringTranslationsResource",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Style Guides API

2 participants