Module crowdin_api.api_resources.screenshots.resource

Classes

class ScreenshotsResource (requester: APIRequester, project_id: Optional[int] = None, page_size=25)

Resource for Screenshots.

Screenshots provide translators with additional context for the source strings. Screenshot tags allow specifying which source strings are displayed on each screenshot.

Use API to manage screenshots and their tags.

Link to documentation: https://support.crowdin.com/developer/api/v2/#tag/Screenshots

Ancestors

Methods

def add_screenshot(self, storageId: int, name: str, projectId: Optional[int] = None, autoTag: Optional[bool] = None, fileId: Optional[int] = None, branchId: Optional[int] = None, directoryId: Optional[int] = None, labelIds: Optional[Iterable[int]] = None)

Add Screenshot.

:param fileId: File Identifier (file-based projects only). :param directoryId: Directory Identifier (file-based projects only).

Link to documentation: https://support.crowdin.com/developer/api/v2/#operation/api.projects.screenshots.post

def add_tag(self, screenshotId: int, data: Iterable[AddTagRequest], projectId: Optional[int] = None)
def auto_tag(self, screenshotId: int, autoTag: bool, projectId: Optional[int] = None, fileId: Optional[int] = None, branchId: Optional[int] = None, directoryId: Optional[int] = None)

Auto Tag.

:param fileId: Limit auto tagging to strings of this file (file-based projects only). :param branchId: Limit auto tagging to strings of this branch. :param directoryId: Limit auto tagging to strings of this directory (file-based projects only).

Link to documentation: https://support.crowdin.com/developer/api/v2/#operation/api.projects.screenshots.tags.putMany

def clear_tags(self, screenshotId: int, projectId: Optional[int] = None)
def delete_screenshot(self, screenshotId: int, projectId: Optional[int] = None)
def delete_tag(self, screenshotId: int, tagId: int, projectId: Optional[int] = None)
def edit_screenshot(self, screenshotId: int, data: Iterable[ScreenshotPatchRequest], projectId: Optional[int] = None)
def edit_tag(self, screenshotId: int, tagId: int, data: Iterable[TagPatchRequest], projectId: Optional[int] = None)
def get_screenshot(self, screenshotId: int, projectId: Optional[int] = None)
def get_screenshots_path(self, projectId: int, screenshotId: Optional[int] = None)
def get_tag(self, screenshotId: int, tagId: int, projectId: Optional[int] = None)
def get_tags_path(self, projectId: int, screenshotId: int, tagId: Optional[int] = None)
def list_screenshots(self, orderBy: Optional[Sorting] = None, projectId: Optional[int] = None, stringId: Optional[int] = None, stringIds: Optional[Iterable[int]] = None, labelIds: Optional[Iterable[int]] = None, excludeLabelIds: Optional[Iterable[int]] = None, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None, search: Optional[str] = None)

List Screenshots.

:param search: Search screenshots by name, tagged strings or file names that include screenshots.

Link to documentation: https://support.crowdin.com/developer/api/v2/#operation/api.projects.screenshots.getMany

def list_tags(self, screenshotId: int, projectId: Optional[int] = None, page: Optional[int] = None, offset: Optional[int] = None, limit: Optional[int] = None)
def replace_tags(self, screenshotId: int, data: Iterable[AddTagRequest], projectId: Optional[int] = None)
def update_screenshot(self, screenshotId: int, storageId: int, name: str, projectId: Optional[int] = None, usePreviousTags: Optional[bool] = None)

Update Screenshot.

:param usePreviousTags: Defines whether to keep the tags of the previous screenshot version (the API default is True).

Link to documentation: https://support.crowdin.com/developer/api/v2/#operation/api.projects.screenshots.put