feat: add string-based API support#269
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #269 +/- ##
============================================
- Coverage 93.30% 93.12% -0.18%
- Complexity 1840 1884 +44
============================================
Files 169 173 +4
Lines 4969 5097 +128
============================================
+ Hits 4636 4746 +110
- Misses 333 351 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds initial support for Crowdin string-based projects by extending the PHP client with several string-based-only endpoints (and corresponding models/tests), plus clarifying documentation around parameter differences between file-based vs string-based projects.
Changes:
- Added Source Strings upload endpoints (
uploadStrings,checkUploadStatus) and aStringUploadmodel with tests. - Added Branch clone/merge endpoints (clone, status, get cloned branch, merge, merge status, merge summary) with new models and tests.
- Added Bundle “list branches” endpoint for string-based projects, updated
Branchmodel to exposeisProtected, and adjusted PHPDoc for string-based parameter variants.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/CrowdinApiClient/Api/SourceStringApiTest.php | Adds tests for string upload endpoints and response mapping. |
| tests/CrowdinApiClient/Api/BundleApiTest.php | Adds test coverage for listing bundle branches (string-based). |
| tests/CrowdinApiClient/Api/BranchApiTest.php | Adds tests for branch clone/merge async workflows and merge summary. |
| src/CrowdinApiClient/Model/StringUpload.php | Introduces model representing async string upload state. |
| src/CrowdinApiClient/Model/BranchMergeSummary.php | Introduces model representing merge summary details. |
| src/CrowdinApiClient/Model/BranchMerge.php | Introduces model representing async branch merge state. |
| src/CrowdinApiClient/Model/BranchClone.php | Introduces model representing async branch clone state. |
| src/CrowdinApiClient/Model/Branch.php | Adds isProtected field accessor for string-based branches. |
| src/CrowdinApiClient/Api/TranslationApi.php | Updates PHPDoc to reflect string-based vs file-based parameter differences. |
| src/CrowdinApiClient/Api/SourceStringApi.php | Adds upload endpoints and updates create PHPDoc for branchId vs fileId. |
| src/CrowdinApiClient/Api/DistributionApi.php | Updates PHPDoc for exportMode and bundleIds for string-based projects. |
| src/CrowdinApiClient/Api/BundleApi.php | Adds listBranches endpoint for bundles in string-based projects. |
| src/CrowdinApiClient/Api/BranchApi.php | Adds string-based clone/merge endpoints and updates create PHPDoc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@andrii-bodnar please review and merge |
Closes #171