Module crowdin_api.api_resources.branches.resource
Classes
class BranchesResource (requester: APIRequester, project_id: Optional[int] = None, page_size=25)-
Resource for Branches.
Branch CRUD and deletion status endpoints are available for both file-based and string-based projects. Clones and merges are available for string-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches
Ancestors
Methods
def add_branch(self, project_id: int, request_data: AddBranchRequest)-
Add Branch
exportPatternandpriorityare for file-based projects only,isProtectedis for string-based projects only.Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches/operation/api.projects.branches.post https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.post
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches/operation/api.projects.branches.post https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.post
def check_branch_clone_status(self, project_id: int, branch_id: int, clone_id: str)-
Check Branch Clone Status
String-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.clones.get
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.clones.get
def check_branch_deletion_status(self, project_id: int, branch_id: int, job_identifier: str)-
Check Branch Deletion Status
Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches/operation/api.projects.branches.jobs.get https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.jobs.get
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches/operation/api.projects.branches.jobs.get https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.jobs.get
def check_branch_merge_status(self, project_id: int, branch_id: int, merge_id: Union[int, str])-
Check Branch Merge Status
String-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.merges.get
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.merges.get
def clone_branch(self, project_id: int, branch_id: int, request_data: CloneBranchRequest)-
Clone Branch
String-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.clones.post
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.clones.post
def delete_branch(self, project_id: int, branch_id: int, prefer: Optional[str] = None)-
Delete Branch
Pass
prefer="respond-async"to delete the branch asynchronously (recommended); the API then returns a job to poll viacheck_branch_deletion_status.Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches/operation/api.projects.branches.delete https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.delete
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches/operation/api.projects.branches.delete https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.delete
def edit_branch(self, project_id: int, branch_id: int, patches: Iterable[EditBranchPatch])-
Edit Branch
/exportPatternis for file-based projects only,/isProtectedis for string-based projects only.Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches/operation/api.projects.branches.patch https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.patch
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches/operation/api.projects.branches.patch https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.patch
def get_branch(self, project_id: int, branch_id: int)-
Get Branch
Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches/operation/api.projects.branches.get https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.get
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches/operation/api.projects.branches.get https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.get
def get_branch_clones_path(self, project_id: int, branch_id: int, clone_id: Optional[str] = None)def get_branch_merge_summary(self, project_id: int, branch_id: int, merge_id: Union[int, str])-
Get Branch Merge Summary
String-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.merges.summary.get
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.merges.summary.get
def get_branch_merges_path(self, project_id: int, branch_id: int, merge_id: Union[int, str, None] = None)def get_branches_path(self, project_id: int, branch_id: Optional[int] = None)def get_cloned_branch(self, project_id: int, branch_id: int, clone_id: str)-
Get Cloned Branch
String-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.clones.branch.get
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.clones.branch.get
def list_branches(self, project_id: int, name: Optional[str] = None, order_by: Optional[Sorting] = None, limit: Optional[int] = None, offset: Optional[int] = None)-
List Branches
Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Branches/operation/api.projects.branches.getMany https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.getMany
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/#tag/Branches/operation/api.projects.branches.getMany https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.getMany
def merge_branch(self, project_id: int, branch_id: int, request: MergeBranchRequest)-
Merge Branch
String-based projects only.
Link to documentation: https://support.crowdin.com/developer/api/v2/string-based/#tag/Branches/operation/api.projects.branches.merges.post
Link to documentation for enterprise: https://support.crowdin.com/developer/enterprise/api/v2/string-based/#tag/Branches/operation/api.projects.branches.merges.post