Documentation ¶
Index ¶
- func ToPtr[T any](v T) *T
- type BranchesService
- func (s *BranchesService) Add(ctx context.Context, projectID int, req *model.BranchesAddRequest) (*model.Branch, *Response, error)
- func (s *BranchesService) CheckCloneStatus(ctx context.Context, projectID, branchID int, cloneID string) (*model.BranchMerge, *Response, error)
- func (s *BranchesService) CheckMergeStatus(ctx context.Context, projectID, branchID int, mergeID string) (*model.BranchMerge, *Response, error)
- func (s *BranchesService) Clone(ctx context.Context, projectID, branchID int, req *model.BranchesCloneRequest) (*model.BranchMerge, *Response, error)
- func (s *BranchesService) Delete(ctx context.Context, projectID, branchID int) (*Response, error)
- func (s *BranchesService) Edit(ctx context.Context, projectID, branchID int, req []*model.UpdateRequest) (*model.Branch, *Response, error)
- func (s *BranchesService) Get(ctx context.Context, projectID, branchID int) (*model.Branch, *Response, error)
- func (s *BranchesService) GetClone(ctx context.Context, projectID, branchID int, cloneID string) (*model.Branch, *Response, error)
- func (s *BranchesService) GetMergeSummary(ctx context.Context, projectID, branchID int, mergeID string) (*model.BranchMergeSummary, *Response, error)
- func (s *BranchesService) List(ctx context.Context, projectID int, opts *model.BranchesListOptions) ([]*model.Branch, *Response, error)
- func (s *BranchesService) Merge(ctx context.Context, projectID, branchID int, req *model.BranchesMergeRequest) (*model.BranchMerge, *Response, error)
- type BundlesService
- func (s *BundlesService) Add(ctx context.Context, projectID int, req *model.BundleAddRequest) (*model.Bundle, *Response, error)
- func (s *BundlesService) CheckExportStatus(ctx context.Context, projectID, bundleID int, exportID string) (*model.BundleExport, *Response, error)
- func (s *BundlesService) Delete(ctx context.Context, projectID, bundleID int) (*Response, error)
- func (s *BundlesService) Download(ctx context.Context, projectID, bundleID int, exportID string) (*model.DownloadLink, *Response, error)
- func (s *BundlesService) Edit(ctx context.Context, projectID, bundleID int, req []*model.UpdateRequest) (*model.Bundle, *Response, error)
- func (s *BundlesService) Export(ctx context.Context, projectID, bundleID int) (*model.BundleExport, *Response, error)
- func (s *BundlesService) Get(ctx context.Context, projectID, bundleID int) (*model.Bundle, *Response, error)
- func (s *BundlesService) List(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.Bundle, *Response, error)
- func (s *BundlesService) ListBranches(ctx context.Context, projectID, bundleID int, opts *model.ListOptions) ([]*model.Branch, *Response, error)
- func (s *BundlesService) ListFiles(ctx context.Context, projectID, bundleID int, opts *model.ListOptions) ([]*model.File, *Response, error)
- type Client
- func (c *Client) Delete(ctx context.Context, path string, v ...any) (*Response, error)
- func (c *Client) Get(ctx context.Context, path string, params ListOptionsProvider, v any) (*Response, error)
- func (c *Client) Patch(ctx context.Context, path string, body, v any) (*Response, error)
- func (c *Client) Post(ctx context.Context, path string, body, v any, opts ...RequestOption) (*Response, error)
- func (c *Client) Put(ctx context.Context, path string, body, v any) (*Response, error)
- type ClientOption
- type DictionariesService
- type GlossariesService
- func (s *GlossariesService) AddGlossary(ctx context.Context, req *model.GlossaryAddRequest) (*model.Glossary, *Response, error)
- func (s *GlossariesService) AddTerm(ctx context.Context, glossaryID int, req *model.TermAddRequest) (*model.Term, *Response, error)
- func (s *GlossariesService) CheckGlossaryExportStatus(ctx context.Context, glossaryID int, exportID string) (*model.GlossaryExport, *Response, error)
- func (s *GlossariesService) CheckGlossaryImportStatus(ctx context.Context, glossaryID, importID int) (*model.GlossaryImport, *Response, error)
- func (s *GlossariesService) ClearGlossary(ctx context.Context, glossaryID int, opts *model.ClearGlossaryOptions) (*Response, error)
- func (s *GlossariesService) ConcordanceSearch(ctx context.Context, projectID int, ...) ([]*model.ConcordanceSearch, *Response, error)
- func (s *GlossariesService) DeleteConcept(ctx context.Context, glossaryID, conceptID int) (*Response, error)
- func (s *GlossariesService) DeleteGlossary(ctx context.Context, glossaryID int) (*Response, error)
- func (s *GlossariesService) DeleteTerm(ctx context.Context, glossaryID, termID int) (*Response, error)
- func (s *GlossariesService) DownloadGlossary(ctx context.Context, glossaryID int, exportID string) (*model.DownloadLink, *Response, error)
- func (s *GlossariesService) EditGlossary(ctx context.Context, glossaryID int, req []*model.UpdateRequest) (*model.Glossary, *Response, error)
- func (s *GlossariesService) EditTerm(ctx context.Context, glossaryID, termID int, req []*model.UpdateRequest) (*model.Term, *Response, error)
- func (s *GlossariesService) ExportGlossary(ctx context.Context, glossaryID int, req *model.GlossaryExportRequest) (*model.GlossaryExport, *Response, error)
- func (s *GlossariesService) GetConcept(ctx context.Context, glossaryID, conceptID int) (*model.Concept, *Response, error)
- func (s *GlossariesService) GetGlossary(ctx context.Context, glossaryID int) (*model.Glossary, *Response, error)
- func (s *GlossariesService) GetTerm(ctx context.Context, glossaryID, termID int) (*model.Term, *Response, error)
- func (s *GlossariesService) ImportGlossary(ctx context.Context, glossaryID int, req *model.GlossaryImportRequest) (*model.GlossaryImport, *Response, error)
- func (s *GlossariesService) ListConcepts(ctx context.Context, glossaryID int, opts *model.ConceptsListOptions) ([]*model.Concept, *Response, error)
- func (s *GlossariesService) ListGlossaries(ctx context.Context, opts *model.GlossariesListOptions) ([]*model.Glossary, *Response, error)
- func (s *GlossariesService) ListTerms(ctx context.Context, glossaryID int, opts *model.TermsListOptions) ([]*model.Term, *Response, error)
- func (s *GlossariesService) UpdateConcept(ctx context.Context, glossaryID, conceptID int, ...) (*model.Concept, *Response, error)
- type GroupsService
- func (s *GroupsService) Add(ctx context.Context, req *model.GroupsAddRequest) (*model.Group, *Response, error)
- func (s *GroupsService) Delete(ctx context.Context, id int) (*Response, error)
- func (s *GroupsService) Edit(ctx context.Context, id int, req []*model.UpdateRequest) (*model.Group, *Response, error)
- func (s *GroupsService) Get(ctx context.Context, id int) (*model.Group, *Response, error)
- func (s *GroupsService) List(ctx context.Context, opts *model.GroupsListOptions) ([]*model.Group, *Response, error)
- type LabelsService
- func (s *LabelsService) Add(ctx context.Context, projectID int, req *model.LabelAddRequest) (*model.Label, *Response, error)
- func (s *LabelsService) AssignToScreenshots(ctx context.Context, projectID, labelID int, screenshotIDs []int) ([]*model.Screenshot, *Response, error)
- func (s *LabelsService) AssignToStrings(ctx context.Context, projectID, labelID int, stringIDs []int) ([]*model.SourceString, *Response, error)
- func (s *LabelsService) Delete(ctx context.Context, projectID, labelID int) (*Response, error)
- func (s *LabelsService) Edit(ctx context.Context, projectID, labelID int, req []*model.UpdateRequest) (*model.Label, *Response, error)
- func (s *LabelsService) Get(ctx context.Context, projectID, labelID int) (*model.Label, *Response, error)
- func (s *LabelsService) List(ctx context.Context, projectID int, opts *model.LabelsListOptions) ([]*model.Label, *Response, error)
- func (s *LabelsService) UnassignFromScreenshots(ctx context.Context, projectID, labelID int, screenshotIDs []int) ([]*model.Screenshot, *Response, error)
- func (s *LabelsService) UnassignFromStrings(ctx context.Context, projectID, labelID int, stringIDs []int) ([]*model.SourceString, *Response, error)
- type LanguagesService
- func (s *LanguagesService) Add(ctx context.Context, req *model.AddLanguageRequest) (*model.Language, *Response, error)
- func (s *LanguagesService) Delete(ctx context.Context, id string) (*Response, error)
- func (s *LanguagesService) Edit(ctx context.Context, id string, req []*model.UpdateRequest) (*model.Language, *Response, error)
- func (s *LanguagesService) Get(ctx context.Context, id string) (*model.Language, *Response, error)
- func (s *LanguagesService) List(ctx context.Context, opts *model.ListOptions) ([]*model.Language, *Response, error)
- type ListOptionsProvider
- type MachineTranslationEnginesService
- func (s *MachineTranslationEnginesService) AddMT(ctx context.Context, req *model.MTAddRequest) (*model.MachineTranslation, *Response, error)
- func (s *MachineTranslationEnginesService) DeleteMT(ctx context.Context, mtID int) (*Response, error)
- func (s *MachineTranslationEnginesService) EditMT(ctx context.Context, mtID int, req []*model.UpdateRequest) (*model.MachineTranslation, *Response, error)
- func (s *MachineTranslationEnginesService) GetMT(ctx context.Context, mtID int) (*model.MachineTranslation, *Response, error)
- func (s *MachineTranslationEnginesService) ListMT(ctx context.Context, opts *model.MTListOptions) ([]*model.MachineTranslation, *Response, error)
- func (s *MachineTranslationEnginesService) Translate(ctx context.Context, mtID int, req *model.TranslateRequest) (*model.MTTranslation, *Response, error)
- type ProjectsService
- func (s *ProjectsService) Add(ctx context.Context, req *model.ProjectsAddRequest) (*model.Project, *Response, error)
- func (s *ProjectsService) AddFileFormatSettings(ctx context.Context, projectID int, ...) (*model.ProjectsFileFormatSettings, *Response, error)
- func (s *ProjectsService) AddStringsExporterSettings(ctx context.Context, projectID int, ...) (*model.ProjectsStringsExporterSettings, *Response, error)
- func (s *ProjectsService) Delete(ctx context.Context, id int) (*Response, error)
- func (s *ProjectsService) DeleteFileFormatSettings(ctx context.Context, projectID, settingsID int) (*Response, error)
- func (s *ProjectsService) DeleteStringsExporterSettings(ctx context.Context, projectID, settingsID int) (*Response, error)
- func (s *ProjectsService) DownloadFileFormatSettingsCustomSegmentation(ctx context.Context, projectID, settingsID int) (*model.DownloadLink, *Response, error)
- func (s *ProjectsService) Edit(ctx context.Context, id int, req []*model.UpdateRequest) (*model.Project, *Response, error)
- func (s *ProjectsService) EditFileFormatSettings(ctx context.Context, projectID, settingsID int, req []*model.UpdateRequest) (*model.ProjectsFileFormatSettings, *Response, error)
- func (s *ProjectsService) EditStringsExporterSettings(ctx context.Context, projectID, settingsID int, ...) (*model.ProjectsStringsExporterSettings, *Response, error)
- func (s *ProjectsService) Get(ctx context.Context, id int) (*model.Project, *Response, error)
- func (s *ProjectsService) GetFileFormatSettings(ctx context.Context, projectID, settingsID int) (*model.ProjectsFileFormatSettings, *Response, error)
- func (s *ProjectsService) GetStringsExporterSettings(ctx context.Context, projectID, settingsID int) (*model.ProjectsStringsExporterSettings, *Response, error)
- func (s *ProjectsService) List(ctx context.Context, opts *model.ProjectsListOptions) ([]*model.Project, *Response, error)
- func (s *ProjectsService) ListFileFormatSettings(ctx context.Context, projectID int) ([]*model.ProjectsFileFormatSettings, *Response, error)
- func (s *ProjectsService) ListStringsExporterSettings(ctx context.Context, projectID int) ([]*model.ProjectsStringsExporterSettings, *Response, error)
- func (s *ProjectsService) ResetFileFormatSettingsCustomSegmentation(ctx context.Context, projectID, settingsID int) (*Response, error)
- type ReportsService
- func (s *ReportsService) AddSettingsTemplate(ctx context.Context, projectID int, ...) (*model.ReportSettingsTemplate, *Response, error)
- func (s *ReportsService) CheckArchiveExportStatus(ctx context.Context, userID, archiveID int, exportID string) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) CheckGroupReportStatus(ctx context.Context, groupID int, reportID string) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) CheckOrganizationReportStatus(ctx context.Context, reportID string) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) CheckStatus(ctx context.Context, projectID int, reportID string) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) DeleteArchive(ctx context.Context, userID, archiveID int) (*Response, error)
- func (s *ReportsService) DeleteSettingsTemplate(ctx context.Context, projectID, settingsTemplateID int) (*Response, error)
- func (s *ReportsService) Download(ctx context.Context, projectID int, reportID string) (*model.DownloadLink, *Response, error)
- func (s *ReportsService) DownloadArchive(ctx context.Context, userID, archiveID int, exportID string) (*model.DownloadLink, *Response, error)
- func (s *ReportsService) DownloadGroupReport(ctx context.Context, groupID int, reportID string) (*model.DownloadLink, *Response, error)
- func (s *ReportsService) DownloadOrganizationReport(ctx context.Context, reportID string) (*model.DownloadLink, *Response, error)
- func (s *ReportsService) EditSettingsTemplate(ctx context.Context, projectID, settingsTemplateID int, ...) (*model.ReportSettingsTemplate, *Response, error)
- func (s *ReportsService) ExportArchive(ctx context.Context, userID, archiveID int, ...) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) Generate(ctx context.Context, projectID int, req *model.ReportGenerateRequest) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) GenerateGroupReport(ctx context.Context, groupID int, req *model.GroupReportGenerateRequest) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) GenerateOrganizationReport(ctx context.Context, req *model.GroupReportGenerateRequest) (*model.ReportStatus, *Response, error)
- func (s *ReportsService) GetArchive(ctx context.Context, userID, archiveID int) (*model.ReportArchive, *Response, error)
- func (s *ReportsService) GetSettingsTemplate(ctx context.Context, projectID, settingsTemplateID int) (*model.ReportSettingsTemplate, *Response, error)
- func (s *ReportsService) ListArchives(ctx context.Context, userID int, opts *model.ReportArchivesListOptions) ([]*model.ReportArchive, *Response, error)
- func (s *ReportsService) ListSettingsTemplates(ctx context.Context, projectID int, ...) ([]*model.ReportSettingsTemplate, *Response, error)
- type RequestOption
- type RequestValidator
- type Response
- type ScreenshotsService
- func (s *ScreenshotsService) AddScreenshot(ctx context.Context, projectID int, req *model.ScreenshotAddRequest) (*model.Screenshot, *Response, error)
- func (s *ScreenshotsService) AddTag(ctx context.Context, projectID, screenshotID int, req *model.TagAddRequest) (*model.Tag, *Response, error)
- func (s *ScreenshotsService) AutoTag(ctx context.Context, projectID, screenshotID int, req *model.AutoTagRequest) (*Response, error)
- func (s *ScreenshotsService) ClearTags(ctx context.Context, projectID, screenshotID int) (*Response, error)
- func (s *ScreenshotsService) DeleteScreenshot(ctx context.Context, projectID, screenshotID int) (*Response, error)
- func (s *ScreenshotsService) DeleteTag(ctx context.Context, projectID, screenshotID, tagID int) (*Response, error)
- func (s *ScreenshotsService) EditScreenshot(ctx context.Context, projectID, screenshotID int, req []*model.UpdateRequest) (*model.Screenshot, *Response, error)
- func (s *ScreenshotsService) EditTag(ctx context.Context, projectID, screenshotID, tagID int, ...) (*model.Tag, *Response, error)
- func (s *ScreenshotsService) GetScreenshot(ctx context.Context, projectID, screenshotID int) (*model.Screenshot, *Response, error)
- func (s *ScreenshotsService) GetTag(ctx context.Context, projectID, screenshotID, tagID int) (*model.Tag, *Response, error)
- func (s *ScreenshotsService) ListScreenshots(ctx context.Context, projectID int, opts *model.ScreenshotListOptions) ([]*model.Screenshot, *Response, error)
- func (s *ScreenshotsService) ListTags(ctx context.Context, projectID, screenshotID int, opts *model.ListOptions) ([]*model.Tag, *Response, error)
- func (s *ScreenshotsService) ReplaceTags(ctx context.Context, projectID, screenshotID int, ...) (*Response, error)
- func (s *ScreenshotsService) UpdateScreenshot(ctx context.Context, projectID, screenshotID int, ...) (*model.Screenshot, *Response, error)
- type SourceFilesService
- func (s *SourceFilesService) AddDirectory(ctx context.Context, projectID int, req *model.DirectoryAddRequest) (*model.Directory, *Response, error)
- func (s *SourceFilesService) AddFile(ctx context.Context, projectID int, req *model.FileAddRequest) (*model.File, *Response, error)
- func (s *SourceFilesService) BuildReviewedFiles(ctx context.Context, projectID int, req *model.ReviewedBuildRequest) (*model.ReviewedBuild, *Response, error)
- func (s *SourceFilesService) CheckReviewedBuildStatus(ctx context.Context, projectID, buildID int) (*model.ReviewedBuild, *Response, error)
- func (s *SourceFilesService) DeleteDirectory(ctx context.Context, projectID, directoryID int) (*Response, error)
- func (s *SourceFilesService) DeleteFile(ctx context.Context, projectID, fileID int) (*Response, error)
- func (s *SourceFilesService) DownloadFile(ctx context.Context, projectID, fileID int) (*model.DownloadLink, *Response, error)
- func (s *SourceFilesService) DownloadFilePreview(ctx context.Context, projectID, fileID int) (*model.DownloadLink, *Response, error)
- func (s *SourceFilesService) DownloadReviewedBuild(ctx context.Context, projectID, buildID int) (*model.DownloadLink, *Response, error)
- func (s *SourceFilesService) EditDirectory(ctx context.Context, projectID, directoryID int, req []*model.UpdateRequest) (*model.Directory, *Response, error)
- func (s *SourceFilesService) EditFile(ctx context.Context, projectID, fileID int, req []*model.UpdateRequest) (*model.File, *Response, error)
- func (s *SourceFilesService) GetDirectory(ctx context.Context, projectID, directoryID int) (*model.Directory, *Response, error)
- func (s *SourceFilesService) GetFile(ctx context.Context, projectID, fileID int) (*model.File, *Response, error)
- func (s *SourceFilesService) GetFileRevision(ctx context.Context, projectID, fileID, revisionID int) (*model.FileRevision, *Response, error)
- func (s *SourceFilesService) ListDirectories(ctx context.Context, projectID int, opts *model.DirectoryListOptions) ([]*model.Directory, *Response, error)
- func (s *SourceFilesService) ListFileRevisions(ctx context.Context, projectID, fileID int, opts *model.ListOptions) ([]*model.FileRevision, *Response, error)
- func (s *SourceFilesService) ListFiles(ctx context.Context, projectID int, opts *model.FileListOptions) ([]*model.File, *Response, error)
- func (s *SourceFilesService) ListReviewedBuilds(ctx context.Context, projectID int, opts *model.ReviewedBuildListOptions) ([]*model.ReviewedBuild, *Response, error)
- func (s *SourceFilesService) UpdateOrRestoreFile(ctx context.Context, projectID, fileID int, ...) (*model.File, *Response, error)
- type SourceStringsService
- func (s *SourceStringsService) Add(ctx context.Context, projectID int, req *model.SourceStringsAddRequest) (*model.SourceString, *Response, error)
- func (s *SourceStringsService) BatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ([]*model.SourceString, *Response, error)
- func (s *SourceStringsService) Delete(ctx context.Context, projectID, stringID int) (*Response, error)
- func (s *SourceStringsService) Edit(ctx context.Context, projectID, stringID int, req []*model.UpdateRequest) (*model.SourceString, *Response, error)
- func (s *SourceStringsService) Get(ctx context.Context, projectID, stringID int, ...) (*model.SourceString, *Response, error)
- func (s *SourceStringsService) GetUploadStatus(ctx context.Context, projectID int, uploadID string) (*model.SourceStringsUpload, *Response, error)
- func (s *SourceStringsService) List(ctx context.Context, projectID int, opts *model.SourceStringsListOptions) ([]*model.SourceString, *Response, error)
- func (s *SourceStringsService) Upload(ctx context.Context, projectID int, req *model.SourceStringsUploadRequest) (*model.SourceStringsUpload, *Response, error)
- type StorageService
- func (s *StorageService) Add(ctx context.Context, file *os.File) (*model.Storage, *Response, error)
- func (s *StorageService) Delete(ctx context.Context, id int) (*Response, error)
- func (s *StorageService) Get(ctx context.Context, id int) (*model.Storage, *Response, error)
- func (s *StorageService) List(ctx context.Context, opts *model.ListOptions) ([]*model.Storage, *Response, error)
- type StringCommentsService
- func (s *StringCommentsService) Add(ctx context.Context, projectID int, req *model.StringCommentsAddRequest) (*model.StringComment, *Response, error)
- func (s *StringCommentsService) Delete(ctx context.Context, projectID, commentID int) (*Response, error)
- func (s *StringCommentsService) Edit(ctx context.Context, projectID, commentID int, req []*model.UpdateRequest) (*model.StringComment, *Response, error)
- func (s *StringCommentsService) Get(ctx context.Context, projectID, commentID int) (*model.StringComment, *Response, error)
- func (s *StringCommentsService) List(ctx context.Context, projectID int, opts *model.StringCommentsListOptions) ([]*model.StringComment, *Response, error)
- type StringTranslationsService
- func (s *StringTranslationsService) AddApproval(ctx context.Context, projectID, translationID int) (*model.Approval, *Response, error)
- func (s *StringTranslationsService) AddTranslation(ctx context.Context, projectID int, req *model.TranslationAddRequest) (*model.Translation, *Response, error)
- func (s *StringTranslationsService) AddVote(ctx context.Context, projectID int, req *model.VoteAddRequest) (*model.Vote, *Response, error)
- func (s *StringTranslationsService) CancelVote(ctx context.Context, projectID, voteID int) (*Response, error)
- func (s *StringTranslationsService) DeleteStringTranslations(ctx context.Context, projectID, stringID int, languageID string) (*Response, error)
- func (s *StringTranslationsService) DeleteTranslation(ctx context.Context, projectID, translationID int) (*Response, error)
- func (s *StringTranslationsService) GetApproval(ctx context.Context, projectID, approvalID int) (*model.Approval, *Response, error)
- func (s *StringTranslationsService) GetTranslation(ctx context.Context, projectID, translationID int, ...) (*model.Translation, *Response, error)
- func (s *StringTranslationsService) GetVote(ctx context.Context, projectID, voteID int) (*model.Vote, *Response, error)
- func (s *StringTranslationsService) ListApprovals(ctx context.Context, projectID int, opts *model.ApprovalsListOptions) ([]*model.Approval, *Response, error)
- func (s *StringTranslationsService) ListLanguageTranslations(ctx context.Context, projectID int, languageID string, ...) ([]*model.LanguageTranslation, *Response, error)
- func (s *StringTranslationsService) ListStringTranslations(ctx context.Context, projectID int, opts *model.StringTranslationsListOptions) ([]*model.Translation, *Response, error)
- func (s *StringTranslationsService) ListVotes(ctx context.Context, projectID int, opts *model.VotesListOptions) ([]*model.Vote, *Response, error)
- func (s *StringTranslationsService) RemoveApproval(ctx context.Context, projectID, approvalID int) (*Response, error)
- func (s *StringTranslationsService) RestoreTranslation(ctx context.Context, projectID, translationID int) (*model.Translation, *Response, error)
- func (s *StringTranslationsService) TranslationAlignment(ctx context.Context, projectID int, req *model.TranslationAlignmentRequest) (*model.TranslationAlignment, *Response, error)
- type TasksService
- func (s *TasksService) Add(ctx context.Context, projectID int, req model.TaskAddRequest) (*model.Task, *Response, error)
- func (s *TasksService) AddSettingsTemplate(ctx context.Context, projectID int, req *model.TaskSettingsTemplateAddRequest) (*model.TaskSettingsTemplate, *Response, error)
- func (s *TasksService) Delete(ctx context.Context, projectID, taskID int) (*Response, error)
- func (s *TasksService) DeleteSettingsTemplate(ctx context.Context, projectID, taskSettingTemplateID int) (*Response, error)
- func (s *TasksService) Edit(ctx context.Context, projectID, taskID int, req []*model.UpdateRequest) (*model.Task, *Response, error)
- func (s *TasksService) EditArchivedStatus(ctx context.Context, projectID, taskID int, req []*model.UpdateRequest) (*model.Task, *Response, error)
- func (s *TasksService) EditSettingsTemplate(ctx context.Context, projectID, taskSettingTemplateID int, ...) (*model.TaskSettingsTemplate, *Response, error)
- func (s *TasksService) ExportStrings(ctx context.Context, projectID, taskID int) (*model.DownloadLink, *Response, error)
- func (s *TasksService) Get(ctx context.Context, projectID, taskID int) (*model.Task, *Response, error)
- func (s *TasksService) GetSettingsTemplate(ctx context.Context, projectID, taskSettingTemplateID int) (*model.TaskSettingsTemplate, *Response, error)
- func (s *TasksService) List(ctx context.Context, projectID int, opts *model.TasksListOptions) ([]*model.Task, *Response, error)
- func (s *TasksService) ListSettingsTemplates(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.TaskSettingsTemplate, *Response, error)
- func (s *TasksService) ListUserTasks(ctx context.Context, opts *model.UserTasksListOptions) ([]*model.Task, *Response, error)
- type TranslationMemoryService
- func (s *TranslationMemoryService) AddTM(ctx context.Context, req *model.TranslationMemoryAddRequest) (*model.TranslationMemory, *Response, error)
- func (s *TranslationMemoryService) CheckTMExportStatus(ctx context.Context, tmID int, exportID string) (*model.TranslationMemoryExport, *Response, error)
- func (s *TranslationMemoryService) CheckTMImportStatus(ctx context.Context, tmID int, importID string) (*model.TranslationMemoryImport, *Response, error)
- func (s *TranslationMemoryService) ClearTM(ctx context.Context, tmID int) (*Response, error)
- func (s *TranslationMemoryService) ConcordanceSearch(ctx context.Context, projectID int, req *model.TMConcordanceSearchRequest) ([]*model.TMConcordanceSearch, *Response, error)
- func (s *TranslationMemoryService) CreateTMSegment(ctx context.Context, tmID int, req *model.TMSegmentCreateRequest) (*model.TMSegment, *Response, error)
- func (s *TranslationMemoryService) DeleteTM(ctx context.Context, tmID int) (*Response, error)
- func (s *TranslationMemoryService) DeleteTMSegment(ctx context.Context, tmID, segmentID int) (*Response, error)
- func (s *TranslationMemoryService) DownloadTM(ctx context.Context, tmID int, exportID string) (*model.DownloadLink, *Response, error)
- func (s *TranslationMemoryService) EditTM(ctx context.Context, tmID int, req []*model.UpdateRequest) (*model.TranslationMemory, *Response, error)
- func (s *TranslationMemoryService) EditTMSegment(ctx context.Context, tmID, segmentID int, req []*model.UpdateRequest) (*model.TMSegment, *Response, error)
- func (s *TranslationMemoryService) ExportTM(ctx context.Context, tmID int, req *model.TranslationMemoryExportRequest) (*model.TranslationMemoryExport, *Response, error)
- func (s *TranslationMemoryService) GetTM(ctx context.Context, tmID int) (*model.TranslationMemory, *Response, error)
- func (s *TranslationMemoryService) GetTMSegment(ctx context.Context, tmID, segmentID int) (*model.TMSegment, *Response, error)
- func (s *TranslationMemoryService) ImportTM(ctx context.Context, tmID int, req *model.TranslationMemoryImportRequest) (*model.TranslationMemoryImport, *Response, error)
- func (s *TranslationMemoryService) ListTMSegments(ctx context.Context, tmID int, opts *model.TMSegmentsListOptions) ([]*model.TMSegment, *Response, error)
- func (s *TranslationMemoryService) ListTMs(ctx context.Context, opts *model.TranslationMemoriesListOptions) ([]*model.TranslationMemory, *Response, error)
- type TranslationStatusService
- func (s *TranslationStatusService) GetBranchProgress(ctx context.Context, projectID, branchID int, opts *model.ListOptions) ([]*model.TranslationProgress, *Response, error)
- func (s *TranslationStatusService) GetDirectoryProgress(ctx context.Context, projectID, directoryID int, opts *model.ListOptions) ([]*model.TranslationProgress, *Response, error)
- func (s *TranslationStatusService) GetFileProgress(ctx context.Context, projectID, fileID int, opts *model.ListOptions) ([]*model.TranslationProgress, *Response, error)
- func (s *TranslationStatusService) GetLanguageProgress(ctx context.Context, projectID int, languageID string, opts *model.ListOptions) ([]*model.TranslationProgress, *Response, error)
- func (s *TranslationStatusService) GetProjectProgress(ctx context.Context, projectID int, opts *model.ProjectProgressListOptions) ([]*model.TranslationProgress, *Response, error)
- func (s *TranslationStatusService) ListQAChecks(ctx context.Context, projectID int, opts *model.QACheckListOptions) ([]*model.QACheck, *Response, error)
- type TranslationsService
- func (s *TranslationsService) ApplyPreTranslation(ctx context.Context, projectID int, req *model.PreTranslationRequest) (*model.PreTranslation, *Response, error)
- func (s *TranslationsService) BuildProjectDirectoryTranslation(ctx context.Context, projectID, directoryID int, ...) (*model.BuildProjectDirectoryTranslation, *Response, error)
- func (s *TranslationsService) BuildProjectFileTranslation(ctx context.Context, projectID, fileID int, ...) (*model.DownloadLink, *Response, error)
- func (s *TranslationsService) BuildProjectTranslation(ctx context.Context, projectID int, req model.BuildProjectTranslationRequest) (*model.TranslationsProjectBuild, *Response, error)
- func (s *TranslationsService) CancelBuild(ctx context.Context, projectID, buildID int) (*Response, error)
- func (s *TranslationsService) CheckBuildStatus(ctx context.Context, projectID, buildID int) (*model.TranslationsProjectBuild, *Response, error)
- func (s *TranslationsService) DownloadProjectTranslations(ctx context.Context, projectID, buildID int) (*model.DownloadLink, *Response, error)
- func (s *TranslationsService) ExportProjectTranslation(ctx context.Context, projectID int, req *model.ExportTranslationRequest) (*model.DownloadLink, *Response, error)
- func (s *TranslationsService) ListProjectBuilds(ctx context.Context, projectID int, opts *model.TranslationsBuildsListOptions) ([]*model.TranslationsProjectBuild, *Response, error)
- func (s *TranslationsService) PreTranslationStatus(ctx context.Context, projectID int, preTranslationID string) (*model.PreTranslation, *Response, error)
- func (s *TranslationsService) UploadTranslations(ctx context.Context, projectID int, languageID string, ...) (*model.UploadTranslations, *Response, error)
- type UsersService
- func (s *UsersService) AddProjectMember(ctx context.Context, projectID int, req *model.ProjectMemberAddRequest) (map[string][]*model.ProjectMember, *Response, error)
- func (s *UsersService) Delete(ctx context.Context, userID int) (*Response, error)
- func (s *UsersService) DeleteProjectMember(ctx context.Context, projectID, memberID int) (*Response, error)
- func (s *UsersService) Edit(ctx context.Context, userID int, req []*model.UpdateRequest) (*model.User, *Response, error)
- func (s *UsersService) Get(ctx context.Context, userID int) (*model.User, *Response, error)
- func (s *UsersService) GetAuthenticated(ctx context.Context) (*model.User, *Response, error)
- func (s *UsersService) GetProjectMember(ctx context.Context, projectID, memberID int) (*model.ProjectMember, *Response, error)
- func (s *UsersService) Invite(ctx context.Context, req *model.InviteUserRequest) (*model.User, *Response, error)
- func (s *UsersService) List(ctx context.Context, opts *model.UsersListOptions) ([]*model.User, *Response, error)
- func (s *UsersService) ListProjectMembers(ctx context.Context, projectID int, opts *model.ProjectMembersListOptions) ([]*model.ProjectMember, *Response, error)
- func (s *UsersService) ReplaceProjectMemberPermissions(ctx context.Context, projectID, memberID int, ...) (*model.ProjectMember, *Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BranchesService ¶
type BranchesService struct {
// contains filtered or unexported fields
}
Source branches are resources for translation. Use API to manage project branches. Note: Make sure your master branch is the first one you integrate with Crowdin.
func (*BranchesService) Add ¶
func (s *BranchesService) Add(ctx context.Context, projectID int, req *model.BranchesAddRequest) ( *model.Branch, *Response, error, )
Add creates a new project branch.
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.post
func (*BranchesService) CheckCloneStatus ¶
func (s *BranchesService) CheckCloneStatus(ctx context.Context, projectID, branchID int, cloneID string) ( *model.BranchMerge, *Response, error, )
CheckCloneStatus checks the status of a branch clone.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.branches.clones.get
func (*BranchesService) CheckMergeStatus ¶
func (s *BranchesService) CheckMergeStatus(ctx context.Context, projectID, branchID int, mergeID string) ( *model.BranchMerge, *Response, error, )
CheckMergeStatus checks the status of a branch merge.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.branches.merges.get
func (*BranchesService) Clone ¶
func (s *BranchesService) Clone(ctx context.Context, projectID, branchID int, req *model.BranchesCloneRequest) ( *model.BranchMerge, *Response, error, )
Clone clones a project branch. Note: Only the main branch (oldest branch) can be cloned.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.branches.clones.post
func (*BranchesService) Delete ¶
Delete deletes a project branch.
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.delete
func (*BranchesService) Edit ¶
func (s *BranchesService) Edit(ctx context.Context, projectID, branchID int, req []*model.UpdateRequest) ( *model.Branch, *Response, error, )
Edit updates a project branch.
Request body: - op: The operation to perform. Enum: replace, test. - path: A JSON Pointer as defined in RFC 6901. Enum: "/name", "/title", "/exportPattern", "/priority". - value: The value to be used within the operations. The value must be one of string.
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.patch
func (*BranchesService) Get ¶
func (s *BranchesService) Get(ctx context.Context, projectID, branchID int) (*model.Branch, *Response, error)
Get returns a single project branch.
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.get
func (*BranchesService) GetClone ¶
func (s *BranchesService) GetClone(ctx context.Context, projectID, branchID int, cloneID string) (*model.Branch, *Response, error)
GetClone returns a cloned project branch.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.branches.clones.branch.get
func (*BranchesService) GetMergeSummary ¶
func (s *BranchesService) GetMergeSummary(ctx context.Context, projectID, branchID int, mergeID string) ( *model.BranchMergeSummary, *Response, error, )
GetMergeSummary returns a summary of a branch merge.
func (*BranchesService) List ¶
func (s *BranchesService) List(ctx context.Context, projectID int, opts *model.BranchesListOptions) ( []*model.Branch, *Response, error, )
List returns a list of project branches.
Query parameters: - name: Filter branches by name. - limit: A maximum number of items to retrieve (default 25, max 500). - offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.getMany
func (*BranchesService) Merge ¶
func (s *BranchesService) Merge(ctx context.Context, projectID, branchID int, req *model.BranchesMergeRequest) ( *model.BranchMerge, *Response, error, )
Merge merges a project branch.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.branches.merges.post
type BundlesService ¶
type BundlesService struct {
// contains filtered or unexported fields
}
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Bundles
func (*BundlesService) Add ¶
func (s *BundlesService) Add(ctx context.Context, projectID int, req *model.BundleAddRequest) ( *model.Bundle, *Response, error, )
Add creates a new bundle.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.post
func (*BundlesService) CheckExportStatus ¶
func (s *BundlesService) CheckExportStatus(ctx context.Context, projectID, bundleID int, exportID string) ( *model.BundleExport, *Response, error, )
CheckExportStatus returns the status of the bundle export.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.get
func (*BundlesService) Delete ¶
Delete removes the bundle.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.delete
func (*BundlesService) Download ¶
func (s *BundlesService) Download(ctx context.Context, projectID, bundleID int, exportID string) ( *model.DownloadLink, *Response, error, )
Download returns a download link for the bundle.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.download.get
func (*BundlesService) Edit ¶
func (s *BundlesService) Edit(ctx context.Context, projectID, bundleID int, req []*model.UpdateRequest) ( *model.Bundle, *Response, error, )
Edit updates the bundle.
Request body:
- op: The operation to perform. Enum: replace, test.
- path (json-pointer): A JSON Pointer as defined by RFC 6901. Enum: "/name", "/format", "/sourcePatterns", "/ignorePatterns", "/exportPattern", "/isMultilingual", "/labelIds", "/includeProjectSourceLanguage", "/excludeLabelIds".
- value: The value to be used within the operations. The value must be string or integer.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.patch
func (*BundlesService) Export ¶
func (s *BundlesService) Export(ctx context.Context, projectID, bundleID int) ( *model.BundleExport, *Response, error, )
Export starts the export process for the bundle.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.post
func (*BundlesService) Get ¶
func (s *BundlesService) Get(ctx context.Context, projectID, bundleID int) (*model.Bundle, *Response, error)
Get returns the bundle by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.get
func (*BundlesService) List ¶
func (s *BundlesService) List(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.Bundle, *Response, error, )
List returns a list of bundles.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.getMany
func (*BundlesService) ListBranches ¶
func (s *BundlesService) ListBranches(ctx context.Context, projectID, bundleID int, opts *model.ListOptions) ( []*model.Branch, *Response, error, )
ListBranches returns a list of branches included in the bundle.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.bundles.branches.getMany
func (*BundlesService) ListFiles ¶
func (s *BundlesService) ListFiles(ctx context.Context, projectID, bundleID int, opts *model.ListOptions) ( []*model.File, *Response, error, )
ListFiles returns a list of files included in the bundle.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.files.getMany
type Client ¶
type Client struct { Storages *StorageService Languages *LanguagesService Groups *GroupsService Projects *ProjectsService Branches *BranchesService SourceFiles *SourceFilesService SourceStrings *SourceStringsService StringTranslations *StringTranslationsService StringComments *StringCommentsService Translations *TranslationsService TranslationStatus *TranslationStatusService Screenshots *ScreenshotsService Bundles *BundlesService Labels *LabelsService Glossaries *GlossariesService TranslationMemory *TranslationMemoryService Users *UsersService MachineTranslationEngines *MachineTranslationEnginesService Tasks *TasksService Reports *ReportsService Dictionaries *DictionariesService // contains filtered or unexported fields }
Client is a Crowdin API client.
func NewClient ¶
func NewClient(token string, opts ...ClientOption) (*Client, error)
NewClient creates a new Crowdin API client with provided options (ex. WithHTTPClient). `token` is a personal access token. To create a client, use the following code:
client, err := crowdin.NewClient("token")
To create an Enterprise client, use the WithOrganization() option as below:
client, err := crowdin.NewClient("token", crowdin.WithOrganization("organization"))
func (*Client) Delete ¶
Delete makes a DELETE request to the specified path. If the provided parameter v is not nil, the result will be unmarshaled into it.
func (*Client) Get ¶
func (c *Client) Get(ctx context.Context, path string, params ListOptionsProvider, v any) (*Response, error)
Get makes a GET request to the specified path.
type ClientOption ¶
ClientOption is a client functional option.
func WithHTTPClient ¶
func WithHTTPClient(hc *http.Client) ClientOption
WithHTTPClient sets the custom HTTP client. If not set http.DefaultClient will be used.
func WithOrganization ¶
func WithOrganization(organization string) ClientOption
WithOrganization sets the organization name.
type DictionariesService ¶
type DictionariesService struct {
// contains filtered or unexported fields
}
Dictionaries allow you to create a storage of words that should be skipped by the spell checker.
Use API to get the list of organization dictionaries and to edit a specific dictionary.
https://developer.crowdin.com/api/v2/#tag/Dictionaries
func (*DictionariesService) Edit ¶
func (s *DictionariesService) Edit(ctx context.Context, projectID int, languageID string, req []*model.UpdateRequest) ( *model.Dictionary, *Response, error, )
Edit updates a specific dictionary.
Request body:
- Op (string) - operation to perform. Enum: remove, add.
- Path (string <json-pointer>) - a JSON Pointer as defined by RFC 6901. Value: "/words/{index}". To delete multiple words with one request, please specify the word indexes in reverse order.
- Value (array) - value to set. Required for add operation.
https://developer.crowdin.com/api/v2/#operation/api.projects.dictionaries.patch
func (*DictionariesService) List ¶
func (s *DictionariesService) List(ctx context.Context, projectID int, opts *model.DictionariesListOptions) ( []*model.Dictionary, *Response, error, )
List returns a list of organization dictionaries.
type GlossariesService ¶
type GlossariesService struct {
// contains filtered or unexported fields
}
Glossaries help to explain some specific terms or the ones often used in the project so that they can be properly and consistently translated.
Use API to manage glossaries or specific terms. Glossary export and import are asynchronous operations and shall be completed with sequence of API methods.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Glossaries
func (*GlossariesService) AddGlossary ¶
func (s *GlossariesService) AddGlossary(ctx context.Context, req *model.GlossaryAddRequest) ( *model.Glossary, *Response, error, )
AddGlossary creates a new glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.post
func (*GlossariesService) AddTerm ¶
func (s *GlossariesService) AddTerm(ctx context.Context, glossaryID int, req *model.TermAddRequest) ( *model.Term, *Response, error, )
AddTerm adds a new term to a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.terms.post
func (*GlossariesService) CheckGlossaryExportStatus ¶
func (s *GlossariesService) CheckGlossaryExportStatus(ctx context.Context, glossaryID int, exportID string) ( *model.GlossaryExport, *Response, error, )
CheckGlossaryExportStatus returns the status of a glossary export.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.exports.get
func (*GlossariesService) CheckGlossaryImportStatus ¶
func (s *GlossariesService) CheckGlossaryImportStatus(ctx context.Context, glossaryID, importID int) ( *model.GlossaryImport, *Response, error, )
CheckGlossaryImportStatus returns the status of a glossary import.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.imports.get
func (*GlossariesService) ClearGlossary ¶
func (s *GlossariesService) ClearGlossary(ctx context.Context, glossaryID int, opts *model.ClearGlossaryOptions) ( *Response, error, )
ClearGlossary deletes all terms from a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.terms.deleteMany
func (*GlossariesService) ConcordanceSearch ¶
func (s *GlossariesService) ConcordanceSearch(ctx context.Context, projectID int, req *model.GlossaryConcordanceSearchRequest) ( []*model.ConcordanceSearch, *Response, error, )
ConcordanceSearch searches for concordance in the glossary.
https://developer.crowdin.com/api/v2/#operation/api.projects.glossaries.concordance.post
func (*GlossariesService) DeleteConcept ¶
func (s *GlossariesService) DeleteConcept(ctx context.Context, glossaryID, conceptID int) (*Response, error)
DeleteConcept deletes a specific concept from a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.concepts.delete
func (*GlossariesService) DeleteGlossary ¶
DeleteGlossary deletes a specific glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.delete
func (*GlossariesService) DeleteTerm ¶
func (s *GlossariesService) DeleteTerm(ctx context.Context, glossaryID, termID int) (*Response, error)
DeleteTerm deletes a specific term from a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.terms.delete
func (*GlossariesService) DownloadGlossary ¶
func (s *GlossariesService) DownloadGlossary(ctx context.Context, glossaryID int, exportID string) ( *model.DownloadLink, *Response, error, )
DownloadGlossary returns a download link for a glossary export.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.exports.download.download
func (*GlossariesService) EditGlossary ¶
func (s *GlossariesService) EditGlossary(ctx context.Context, glossaryID int, req []*model.UpdateRequest) ( *model.Glossary, *Response, error, )
EditGlossary updates a specific glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.patch
func (*GlossariesService) EditTerm ¶
func (s *GlossariesService) EditTerm(ctx context.Context, glossaryID, termID int, req []*model.UpdateRequest) ( *model.Term, *Response, error, )
EditTerm updates a specific term.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.terms.patch
func (*GlossariesService) ExportGlossary ¶
func (s *GlossariesService) ExportGlossary(ctx context.Context, glossaryID int, req *model.GlossaryExportRequest) ( *model.GlossaryExport, *Response, error, )
ExportGlossary performs an export of a glossary. The export operation is asynchronous and returns the status of the export process.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.exports.post
func (*GlossariesService) GetConcept ¶
func (s *GlossariesService) GetConcept(ctx context.Context, glossaryID, conceptID int) ( *model.Concept, *Response, error, )
GetConcept returns a specific concept from a glossary by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.concepts.get
func (*GlossariesService) GetGlossary ¶
func (s *GlossariesService) GetGlossary(ctx context.Context, glossaryID int) (*model.Glossary, *Response, error)
GetGlossary returns a specific glossary by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.get
func (*GlossariesService) GetTerm ¶
func (s *GlossariesService) GetTerm(ctx context.Context, glossaryID, termID int) ( *model.Term, *Response, error, )
GetTerm returns a specific term from a glossary by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.terms.get
func (*GlossariesService) ImportGlossary ¶
func (s *GlossariesService) ImportGlossary(ctx context.Context, glossaryID int, req *model.GlossaryImportRequest) ( *model.GlossaryImport, *Response, error, )
ImportGlossary performs an import of a glossary. The import operation is asynchronous and returns the status of the import process.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.imports.post
func (*GlossariesService) ListConcepts ¶
func (s *GlossariesService) ListConcepts(ctx context.Context, glossaryID int, opts *model.ConceptsListOptions) ( []*model.Concept, *Response, error, )
ListConcepts returns a list of concepts from a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.concepts.getMany
func (*GlossariesService) ListGlossaries ¶
func (s *GlossariesService) ListGlossaries(ctx context.Context, opts *model.GlossariesListOptions) ( []*model.Glossary, *Response, error, )
ListGlossaries returns a list of glossaries.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.getMany
func (*GlossariesService) ListTerms ¶
func (s *GlossariesService) ListTerms(ctx context.Context, glossaryID int, opts *model.TermsListOptions) ( []*model.Term, *Response, error, )
ListTerms returns a list of terms from a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.terms.getMany
func (*GlossariesService) UpdateConcept ¶
func (s *GlossariesService) UpdateConcept(ctx context.Context, glossaryID, conceptID int, req *model.ConceptUpdateRequest) ( *model.Concept, *Response, error, )
UpdateConcept updates a specific concept in a glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.concepts.put
type GroupsService ¶
type GroupsService struct {
// contains filtered or unexported fields
}
Groups allow you to organize your projects based on specific characteristics. Use API to manage projects and groups, change their settings, or remove them from organization if required.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Projects-and-Groups
func (*GroupsService) Add ¶
func (s *GroupsService) Add(ctx context.Context, req *model.GroupsAddRequest) (*model.Group, *Response, error)
Add creates a new group.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.post
func (*GroupsService) Delete ¶
Delete removes a group from the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.delete
func (*GroupsService) Edit ¶
func (s *GroupsService) Edit(ctx context.Context, id int, req []*model.UpdateRequest) (*model.Group, *Response, error)
Edit updates a group.
Request body:
op: The operation to perform. Enum: replace, test. path: A JSON Pointer as defined in RFC 6901. Enum: "/name", "/description", "/parentId". value: The value to be used within the operations. The value must be one of string or integer.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.patch
func (*GroupsService) Get ¶
Get returns a group by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.get
func (*GroupsService) List ¶
func (s *GroupsService) List(ctx context.Context, opts *model.GroupsListOptions) ([]*model.Group, *Response, error)
List returns a list of groups.
Query parameters:
parentId: A parent group identifier (default 0 - groups of root group). limit: A maximum number of items to retrieve (default 25, max 500). offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.getMany
type LabelsService ¶
type LabelsService struct {
// contains filtered or unexported fields
}
LabelsService provides access to the Labels API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Labels
func (*LabelsService) Add ¶
func (s *LabelsService) Add(ctx context.Context, projectID int, req *model.LabelAddRequest) ( *model.Label, *Response, error, )
Add creates a new label in the project.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.post
func (*LabelsService) AssignToScreenshots ¶
func (s *LabelsService) AssignToScreenshots(ctx context.Context, projectID, labelID int, screenshotIDs []int) ( []*model.Screenshot, *Response, error, )
AssignToScreenshots assigns label to screenshots and returns a list of screenshots which the label was assigned to. Note: You can assign up to 500 screenshots at a time.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.screenshots.post
func (*LabelsService) AssignToStrings ¶
func (s *LabelsService) AssignToStrings(ctx context.Context, projectID, labelID int, stringIDs []int) ( []*model.SourceString, *Response, error, )
AssignToStrings assigns label to strings and returns a list of strings which the label was assigned to. Note: You can assign up to 500 strings at a time.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.strings.post
func (*LabelsService) Delete ¶
Delete removes a label by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.delete
func (*LabelsService) Edit ¶
func (s *LabelsService) Edit(ctx context.Context, projectID, labelID int, req []*model.UpdateRequest) ( *model.Label, *Response, error, )
Edit updates a label by its identifier.
Request body: - op - operation to perform with the label. Enum: replace, test. - path (json-pointer) - path to the field to update. Enum: "/title". - value (string) - new value for the field. Must be a string.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.patch
func (*LabelsService) Get ¶
func (s *LabelsService) Get(ctx context.Context, projectID, labelID int) (*model.Label, *Response, error)
Get returns a label by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.get
func (*LabelsService) List ¶
func (s *LabelsService) List(ctx context.Context, projectID int, opts *model.LabelsListOptions) ( []*model.Label, *Response, error, )
List returns a list of labels in the project.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.getMany
func (*LabelsService) UnassignFromScreenshots ¶
func (s *LabelsService) UnassignFromScreenshots(ctx context.Context, projectID, labelID int, screenshotIDs []int) ( []*model.Screenshot, *Response, error, )
UnassignFromScreenshots unassigns label from screenshots and returns a list of screenshots which the label was unassigned from. Note: You can unassign up to 500 screenshots at a time.
func (*LabelsService) UnassignFromStrings ¶
func (s *LabelsService) UnassignFromStrings(ctx context.Context, projectID, labelID int, stringIDs []int) ( []*model.SourceString, *Response, error, )
UnassignFromStrings unassigns label from strings and returns a list of strings which the label was unassigned from. Note: You can unassign up to 500 strings at a time.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.strings.deleteMany
type LanguagesService ¶
type LanguagesService struct {
// contains filtered or unexported fields
}
Crowdin supports more than 300 world languages and custom languages created in the system. Use API to get the list of all supported languages and retrieve additional details (e.g. text direction, internal code) on specific language.
https://developer.crowdin.com/api/v2/#tag/Languages
func (*LanguagesService) Add ¶
func (s *LanguagesService) Add(ctx context.Context, req *model.AddLanguageRequest) (*model.Language, *Response, error)
Add adds a new custom language.
https://developer.crowdin.com/api/v2/#operation/api.languages.post
func (*LanguagesService) Delete ¶
Delete deletes a custom language by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.languages.delete
func (*LanguagesService) Edit ¶
func (s *LanguagesService) Edit(ctx context.Context, id string, req []*model.UpdateRequest) (*model.Language, *Response, error)
Edit updates a custom language by its identifier.
Request body:
op: The operation to perform. Enum: replace, test path: A JSON Pointer as defined in RFC 6901. Enum: "/name" "/textDirection" "/pluralCategoryNames" "/threeLettersCode" "/localeCode" "/dialectOf" value: The value to be used within the operations. The value must be one of string or array of strings.
https://developer.crowdin.com/api/v2/#operation/api.languages.patch
func (*LanguagesService) Get ¶
Get returns a language by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.languages.get
func (*LanguagesService) List ¶
func (s *LanguagesService) List(ctx context.Context, opts *model.ListOptions) ([]*model.Language, *Response, error)
List returns a list of all supported languages.
Query parameters:
limit: A maximum number of items to retrieve (default 25, max 500). offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.languages.getMany
type ListOptionsProvider ¶
ListOptionsProvider interface provides query parameters for list methods. The Values method returns the url.Values representation of the optional query parameters and a boolean indicating whether they are set.
type MachineTranslationEnginesService ¶
type MachineTranslationEnginesService struct {
// contains filtered or unexported fields
}
Machine Translation Engines (MTE) are the sources for pre-translations. You can currently connect Google Translate, Microsoft Translator, Translate, DeepL Pro, Amazon Translate, and Watson (IBM) Translate engines.
Use API to add, update, and delete specific MTE.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Machine-Translation-Engines
func (*MachineTranslationEnginesService) AddMT ¶
func (s *MachineTranslationEnginesService) AddMT(ctx context.Context, req *model.MTAddRequest) ( *model.MachineTranslation, *Response, error, )
AddMT creates a new machine translation.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.mts.post
func (*MachineTranslationEnginesService) DeleteMT ¶
func (s *MachineTranslationEnginesService) DeleteMT(ctx context.Context, mtID int) (*Response, error)
DeleteMT removes an existing machine translation.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.mts.delete
func (*MachineTranslationEnginesService) EditMT ¶
func (s *MachineTranslationEnginesService) EditMT(ctx context.Context, mtID int, req []*model.UpdateRequest) ( *model.MachineTranslation, *Response, error, )
EditMT updates an existing machine translation.
Request body:
- op (string): Operation to perform. Possible values: replace, test.
- path (string): Path to the field to update (a JSON Pointer as defined by RFC 6901). Enum: /name, /type, /credentials, /enabledLanguageIds, /enabledProjectIds, /isEnabled.
- value (any): New value for the field. Value must be one of string or object.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.mts.patch
func (*MachineTranslationEnginesService) GetMT ¶
func (s *MachineTranslationEnginesService) GetMT(ctx context.Context, mtID int) ( *model.MachineTranslation, *Response, error, )
GetMT returns a specific machine translation by its identifier.
func (*MachineTranslationEnginesService) ListMT ¶
func (s *MachineTranslationEnginesService) ListMT(ctx context.Context, opts *model.MTListOptions) ( []*model.MachineTranslation, *Response, error, )
ListMT returns a list of all machine translations.
https://developer.crowdin.com/api/v2/#operation/api.mts.getMany
func (*MachineTranslationEnginesService) Translate ¶
func (s *MachineTranslationEnginesService) Translate(ctx context.Context, mtID int, req *model.TranslateRequest) ( *model.MTTranslation, *Response, error, )
Translate translates strings using a specific MTE.
https://developer.crowdin.com/api/v2/#operation/api.mts.translations.post
type ProjectsService ¶
type ProjectsService struct {
// contains filtered or unexported fields
}
Using projects, you can keep your source files sorted. Use API to manage projects, change their settings, or remove them if required.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Projects
func (*ProjectsService) Add ¶
func (s *ProjectsService) Add(ctx context.Context, req *model.ProjectsAddRequest) (*model.Project, *Response, error)
Add creates a new project.
https://developer.crowdin.com/api/v2/#operation/api.projects.post
func (*ProjectsService) AddFileFormatSettings ¶
func (s *ProjectsService) AddFileFormatSettings(ctx context.Context, projectID int, req *model.ProjectsAddFileFormatSettingsRequest) ( *model.ProjectsFileFormatSettings, *Response, error, )
AddFileFormatSettings adds a new project file format settings by its project identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.file-format-settings.post
func (*ProjectsService) AddStringsExporterSettings ¶
func (s *ProjectsService) AddStringsExporterSettings( ctx context.Context, projectID int, req *model.ProjectsStringsExporterSettingsRequest, ) (*model.ProjectsStringsExporterSettings, *Response, error, )
AddStringsExporterSettings adds a new project strings exporter settings by its project identifier.
Request body:
format: Enum: "android", "macosx", "xliff" settings: One of convertPlaceholders, languagePairMapping
https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.post
func (*ProjectsService) Delete ¶
Delete deletes a project by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.delete
func (*ProjectsService) DeleteFileFormatSettings ¶
func (s *ProjectsService) DeleteFileFormatSettings(ctx context.Context, projectID, settingsID int) (*Response, error)
DeleteFileFormatSettings deletes a project file format settings by project and file format settings identifiers.
https://developer.crowdin.com/api/v2/#operation/api.projects.file-format-settings.delete
func (*ProjectsService) DeleteStringsExporterSettings ¶
func (s *ProjectsService) DeleteStringsExporterSettings(ctx context.Context, projectID, settingsID int) (*Response, error)
DeleteStringsExporterSettings deletes a project strings exporter settings by project and strings exporter settings identifiers.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.delete
func (*ProjectsService) DownloadFileFormatSettingsCustomSegmentation ¶
func (s *ProjectsService) DownloadFileFormatSettingsCustomSegmentation(ctx context.Context, projectID, settingsID int) ( *model.DownloadLink, *Response, error, )
DownloadFileFormatSettingsCustomSegmentation returns a download link for custom segmentations by project and file format settings identifiers.
func (*ProjectsService) Edit ¶
func (s *ProjectsService) Edit(ctx context.Context, id int, req []*model.UpdateRequest) (*model.Project, *Response, error)
Edit updates a project by its identifier.
Request body:
op: The operation to perform. Enum: add, replace, remove, test path: A JSON Pointer as defined in RFC 6901. value: The value to be used within the operations. The value must be one of string, integer, boolean and object
https://developer.crowdin.com/api/v2/#operation/api.projects.patch
func (*ProjectsService) EditFileFormatSettings ¶
func (s *ProjectsService) EditFileFormatSettings(ctx context.Context, projectID, settingsID int, req []*model.UpdateRequest) ( *model.ProjectsFileFormatSettings, *Response, error, )
EditFileFormatSettings updates a project file format settings by project and file format settings identifiers.
Request body:
op: The operation to perform. Possible values: replace, test path: A JSON Pointer as defined in RFC 6901. Possible values: /format, /settings value: The value to be used within the operations. The value must be one of string or array of strings.
https://developer.crowdin.com/api/v2/#operation/api.projects.file-format-settings.patch
func (*ProjectsService) EditStringsExporterSettings ¶
func (s *ProjectsService) EditStringsExporterSettings( ctx context.Context, projectID, settingsID int, req *model.ProjectsStringsExporterSettingsRequest, ) (*model.ProjectsStringsExporterSettings, *Response, error, )
EditStringsExporterSettings updates a project strings exporter settings by project and strings exporter settings identifiers.
Request body:
format: Enum: "android", "macosx", "xliff" settings: One of convertPlaceholders, languagePairMapping
https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.patch
func (*ProjectsService) Get ¶
Get returns a project by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.get
func (*ProjectsService) GetFileFormatSettings ¶
func (s *ProjectsService) GetFileFormatSettings(ctx context.Context, projectID, settingsID int) ( *model.ProjectsFileFormatSettings, *Response, error, )
GetFileFormatSettings returns a project file format settings by project and file format settings identifiers.
https://developer.crowdin.com/api/v2/#operation/api.projects.file-format-settings.get
func (*ProjectsService) GetStringsExporterSettings ¶
func (s *ProjectsService) GetStringsExporterSettings(ctx context.Context, projectID, settingsID int) ( *model.ProjectsStringsExporterSettings, *Response, error, )
GetStringsExporterSettings returns a project strings exporter settings by project and strings exporter settings identifiers.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.get
func (*ProjectsService) List ¶
func (s *ProjectsService) List(ctx context.Context, opts *model.ProjectsListOptions) ([]*model.Project, *Response, error)
List returns a list of projects.
Query parameters:
userId: A user identifier. hasManagerAccess: Filter by projects with manager access (default 0). Enum: 0, 1. type: Set type to 1 to get all string based projects. Enum: 0, 1. limit: A maximum number of items to retrieve (default 25, max 500). offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.getMany
func (*ProjectsService) ListFileFormatSettings ¶
func (s *ProjectsService) ListFileFormatSettings(ctx context.Context, projectID int) ( []*model.ProjectsFileFormatSettings, *Response, error, )
ListFileFormatSettings returns a list of project file format settings by project identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.file-format-settings.getMany
func (*ProjectsService) ListStringsExporterSettings ¶
func (s *ProjectsService) ListStringsExporterSettings(ctx context.Context, projectID int) ( []*model.ProjectsStringsExporterSettings, *Response, error, )
ListStringsExporterSettings returns a list of project strings exporter settings by project identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings-exporter-settings.getMany
func (*ProjectsService) ResetFileFormatSettingsCustomSegmentation ¶
func (s *ProjectsService) ResetFileFormatSettingsCustomSegmentation(ctx context.Context, projectID, settingsID int) (*Response, error)
ResetFileFormatSettingsCustomSegmentation resets custom segmentations by project and file format settings identifiers.
type ReportsService ¶
type ReportsService struct {
// contains filtered or unexported fields
}
Reports help to estimate costs, calculate translation costs, and identify the top members.
Use API to generate Cost Estimate, Translation Cost, and Top Members reports. You can then export reports in .xlsx or .csv file formats. Report generation is an asynchronous operation and shall be completed with a sequence of API methods.
API docs: https://developer.crowdin.com/api/v2/#tag/Reports
func (*ReportsService) AddSettingsTemplate ¶
func (s *ReportsService) AddSettingsTemplate(ctx context.Context, projectID int, req *model.ReportSettingsTemplateAddRequest) ( *model.ReportSettingsTemplate, *Response, error, )
AddSettingsTemplate creates a new report settings template.
For the Enterprise client, set the projectID to 0.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.settings-templates.post
func (*ReportsService) CheckArchiveExportStatus ¶
func (s *ReportsService) CheckArchiveExportStatus(ctx context.Context, userID, archiveID int, exportID string) ( *model.ReportStatus, *Response, error, )
CheckArchiveExportStatus returns the status of the report archive export.
For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.reports.archives.exports.get
func (*ReportsService) CheckGroupReportStatus ¶
func (s *ReportsService) CheckGroupReportStatus(ctx context.Context, groupID int, reportID string) ( *model.ReportStatus, *Response, error, )
CheckGroupReportStatus returns the status of the group report generation.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.reports.get
func (*ReportsService) CheckOrganizationReportStatus ¶
func (s *ReportsService) CheckOrganizationReportStatus(ctx context.Context, reportID string) (*model.ReportStatus, *Response, error)
CheckOrganizationReportStatus returns the status of the organization report generation.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.reports.get
func (*ReportsService) CheckStatus ¶
func (s *ReportsService) CheckStatus(ctx context.Context, projectID int, reportID string) ( *model.ReportStatus, *Response, error, )
CheckStatus returns the status of the report generation.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.get
func (*ReportsService) DeleteArchive ¶
func (s *ReportsService) DeleteArchive(ctx context.Context, userID, archiveID int) (*Response, error)
DeleteArchive deletes a report archive by its identifier.
For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.reports.archives.delete
func (*ReportsService) DeleteSettingsTemplate ¶
func (s *ReportsService) DeleteSettingsTemplate(ctx context.Context, projectID, settingsTemplateID int) (*Response, error)
DeleteSettingsTemplate removes a report settings template.
For the Enterprise client, set the projectID to 0.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.settings-templates.delete
func (*ReportsService) Download ¶
func (s *ReportsService) Download(ctx context.Context, projectID int, reportID string) ( *model.DownloadLink, *Response, error, )
Download returns a download link for the report.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.download.download
func (*ReportsService) DownloadArchive ¶
func (s *ReportsService) DownloadArchive(ctx context.Context, userID, archiveID int, exportID string) ( *model.DownloadLink, *Response, error, )
DownloadArchive returns a download link for the report archive.
For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.reports.archives.exports.download.get
func (*ReportsService) DownloadGroupReport ¶
func (s *ReportsService) DownloadGroupReport(ctx context.Context, groupID int, reportID string) ( *model.DownloadLink, *Response, error, )
DownloadGroupReport returns a download link for the group report.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.reports.download.download
func (*ReportsService) DownloadOrganizationReport ¶
func (s *ReportsService) DownloadOrganizationReport(ctx context.Context, reportID string) (*model.DownloadLink, *Response, error)
DownloadOrganizationReport returns a download link for the organization report.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.reports.download.download
func (*ReportsService) EditSettingsTemplate ¶
func (s *ReportsService) EditSettingsTemplate(ctx context.Context, projectID, settingsTemplateID int, req []*model.UpdateRequest) ( *model.ReportSettingsTemplate, *Response, error, )
EditSettingsTemplate updates a report settings template.
For the Enterprise client, set the projectID to 0.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string <json-pointer>): path to the field to update. Enum: "/name", "/currency", "/unit", "/mode", "/config", "/isPublic".
- Value (any): new value to set.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.settings-templates.patch
func (*ReportsService) ExportArchive ¶
func (s *ReportsService) ExportArchive(ctx context.Context, userID, archiveID int, req *model.ExportReportArchiveRequest) ( *model.ReportStatus, *Response, error, )
ExportArchive exports a report archive in the specified file format. If no format is provided, the default format is XLSX.
For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.reports.archives.exports.post
func (*ReportsService) Generate ¶
func (s *ReportsService) Generate(ctx context.Context, projectID int, req *model.ReportGenerateRequest) ( *model.ReportStatus, *Response, error, )
Generate generates a new report.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.post
func (*ReportsService) GenerateGroupReport ¶
func (s *ReportsService) GenerateGroupReport(ctx context.Context, groupID int, req *model.GroupReportGenerateRequest) ( *model.ReportStatus, *Response, error, )
GenerateGroupReport generates a new group report.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.reports.post
func (*ReportsService) GenerateOrganizationReport ¶
func (s *ReportsService) GenerateOrganizationReport(ctx context.Context, req *model.GroupReportGenerateRequest) ( *model.ReportStatus, *Response, error, )
GenerateOrganizationReport generates a new organization report.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.reports.post
func (*ReportsService) GetArchive ¶
func (s *ReportsService) GetArchive(ctx context.Context, userID, archiveID int) (*model.ReportArchive, *Response, error)
GetArchive returns a report archive bu its identifier.
For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.reports.archives.get
func (*ReportsService) GetSettingsTemplate ¶
func (s *ReportsService) GetSettingsTemplate(ctx context.Context, projectID, settingsTemplateID int) ( *model.ReportSettingsTemplate, *Response, error, )
GetSettingsTemplate returns a report settings template by its identifier.
For the Enterprise client, set the projectID to 0.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.settings-templates.get
func (*ReportsService) ListArchives ¶
func (s *ReportsService) ListArchives(ctx context.Context, userID int, opts *model.ReportArchivesListOptions) ( []*model.ReportArchive, *Response, error, )
ListArchives returns a list of report archives.
For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.reports.archives.getMany
func (*ReportsService) ListSettingsTemplates ¶
func (s *ReportsService) ListSettingsTemplates(ctx context.Context, projectID int, opts *model.ReportSettingsTemplatesListOptions) ( []*model.ReportSettingsTemplate, *Response, error, )
ListSettingsTemplates returns a list of report settings templates.
For the Enterprise client, set the projectID to 0.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.settings-templates.getMany
type RequestOption ¶
RequestOption represents an option that can be used to modify a http.Request.
func Header ¶
func Header(key, value string) RequestOption
Header sets a header as an option for the request.
type RequestValidator ¶
type RequestValidator interface {
Validate() error
}
RequestValidator is an interface for validating requests.
type Response ¶
type Response struct { *http.Response Pagination model.Pagination }
Response is a Crowdin response that wraps http.Response.
type ScreenshotsService ¶
type ScreenshotsService struct {
// contains filtered or unexported fields
}
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.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Screenshots
func (*ScreenshotsService) AddScreenshot ¶
func (s *ScreenshotsService) AddScreenshot(ctx context.Context, projectID int, req *model.ScreenshotAddRequest) ( *model.Screenshot, *Response, error, )
AddScreenshot adds a new screenshot to the project.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.screenshots.post
func (*ScreenshotsService) AddTag ¶
func (s *ScreenshotsService) AddTag(ctx context.Context, projectID, screenshotID int, req *model.TagAddRequest) ( *model.Tag, *Response, error, )
AddTag adds a new tag to the screenshot.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.post
func (*ScreenshotsService) AutoTag ¶
func (s *ScreenshotsService) AutoTag(ctx context.Context, projectID, screenshotID int, req *model.AutoTagRequest) ( *Response, error, )
AutoTag automatically tags the screenshot with the source strings that are displayed on it.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.putMany
func (*ScreenshotsService) ClearTags ¶
func (s *ScreenshotsService) ClearTags(ctx context.Context, projectID, screenshotID int) (*Response, error)
ClearTags deletes all tags from the screenshot.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.deleteMany
func (*ScreenshotsService) DeleteScreenshot ¶
func (s *ScreenshotsService) DeleteScreenshot(ctx context.Context, projectID, screenshotID int) (*Response, error)
DeleteScreenshot deletes a specific screenshot by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.screenshots.delete
func (*ScreenshotsService) DeleteTag ¶
func (s *ScreenshotsService) DeleteTag(ctx context.Context, projectID, screenshotID, tagID int) (*Response, error)
DeleteTag deletes a specific tag by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.delete
func (*ScreenshotsService) EditScreenshot ¶
func (s *ScreenshotsService) EditScreenshot(ctx context.Context, projectID, screenshotID int, req []*model.UpdateRequest) ( *model.Screenshot, *Response, error, )
EditScreenshot edit a specific screenshot by its identifier.
Request body:
- op (string): Operation to perform with the screenshot. Enum: replace, test
- path (string <json-pointer>): JSON path to the field that needs to be updated (RFC 6901). Enum: "/name", "labelIds"
- value (string): New value for the field. Must be a string.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.screenshots.patch
func (*ScreenshotsService) EditTag ¶
func (s *ScreenshotsService) EditTag(ctx context.Context, projectID, screenshotID, tagID int, req []*model.UpdateRequest) ( *model.Tag, *Response, error, )
EditTag edit a specific tag by its identifier.
Request body:
- op (string): Operation to perform with the tag. Enum: replace, test
- path (string <json-pointer>): JSON path to the field that needs to be updated (RFC 6901). Enum: "/stringId", "/position"
- value (string or int): New value for the field. Must be a string or int.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.patch
func (*ScreenshotsService) GetScreenshot ¶
func (s *ScreenshotsService) GetScreenshot(ctx context.Context, projectID, screenshotID int) ( *model.Screenshot, *Response, error, )
GetScreenshot returns a specific screenshot by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.get
func (*ScreenshotsService) GetTag ¶
func (s *ScreenshotsService) GetTag(ctx context.Context, projectID, screenshotID, tagID int) ( *model.Tag, *Response, error, )
GetTag returns a specific tag by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.screenshots.tags.get
func (*ScreenshotsService) ListScreenshots ¶
func (s *ScreenshotsService) ListScreenshots(ctx context.Context, projectID int, opts *model.ScreenshotListOptions) ( []*model.Screenshot, *Response, error, )
ListScreenshots returns a list of all screenshots in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.getMany
func (*ScreenshotsService) ListTags ¶
func (s *ScreenshotsService) ListTags(ctx context.Context, projectID, screenshotID int, opts *model.ListOptions) ( []*model.Tag, *Response, error, )
ListTags returns a list of all tags for the screenshot.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.getMany
func (*ScreenshotsService) ReplaceTags ¶
func (s *ScreenshotsService) ReplaceTags(ctx context.Context, projectID, screenshotID int, req []*model.ReplaceTagsRequest) ( *Response, error, )
ReplaceTags replaces all tags on the screenshot.
https://developer.crowdin.com/api/v2/#operation/api.projects.screenshots.tags.putMany
func (*ScreenshotsService) UpdateScreenshot ¶
func (s *ScreenshotsService) UpdateScreenshot(ctx context.Context, projectID, screenshotID int, req *model.ScreenshotUpdateRequest) ( *model.Screenshot, *Response, error, )
UpdateScreenshot updates a specific screenshot by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.screenshots.put
type SourceFilesService ¶
type SourceFilesService struct {
// contains filtered or unexported fields
}
Source files are resources for translation. You can keep files structure using folders or manage different versions of the content via branches. Use API to keep the source files up to date, check on file revisions, and manage project branches. Before adding source files to the project, upload each file to the Storage first.
Note: If you use branches, make sure your master branch is the first one you integrate with Crowdin.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Source-Files
func (*SourceFilesService) AddDirectory ¶
func (s *SourceFilesService) AddDirectory(ctx context.Context, projectID int, req *model.DirectoryAddRequest) ( *model.Directory, *Response, error, )
AddDirectory creates a new directory in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.post
func (*SourceFilesService) AddFile ¶
func (s *SourceFilesService) AddFile(ctx context.Context, projectID int, req *model.FileAddRequest) ( *model.File, *Response, error, )
AddFile adds a new file to the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.post
func (*SourceFilesService) BuildReviewedFiles ¶
func (s *SourceFilesService) BuildReviewedFiles(ctx context.Context, projectID int, req *model.ReviewedBuildRequest) ( *model.ReviewedBuild, *Response, error, )
BuildReviewedFiles starts a new build of reviewed source files.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.strings.reviewed-builds.post
func (*SourceFilesService) CheckReviewedBuildStatus ¶
func (s *SourceFilesService) CheckReviewedBuildStatus(ctx context.Context, projectID, buildID int) (*model.ReviewedBuild, *Response, error)
CheckReviewedBuildStatus checks the status of a specific reviewed source files build.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.strings.reviewed-builds.get
func (*SourceFilesService) DeleteDirectory ¶
func (s *SourceFilesService) DeleteDirectory(ctx context.Context, projectID, directoryID int) (*Response, error)
DeleteDirectory deletes a directory in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.delete
func (*SourceFilesService) DeleteFile ¶
func (s *SourceFilesService) DeleteFile(ctx context.Context, projectID, fileID int) (*Response, error)
DeleteFile deletes a file in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.delete
func (*SourceFilesService) DownloadFile ¶
func (s *SourceFilesService) DownloadFile(ctx context.Context, projectID, fileID int) (*model.DownloadLink, *Response, error)
DownloadFile returns a download link for a specific file.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.download.get
func (*SourceFilesService) DownloadFilePreview ¶
func (s *SourceFilesService) DownloadFilePreview(ctx context.Context, projectID, fileID int) (*model.DownloadLink, *Response, error)
DownloadFilePreview returns a download link for a specific file preview.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.preview.get
func (*SourceFilesService) DownloadReviewedBuild ¶
func (s *SourceFilesService) DownloadReviewedBuild(ctx context.Context, projectID, buildID int) (*model.DownloadLink, *Response, error)
DownloadReviewedBuild returns a download link for a specific reviewed source files build.
func (*SourceFilesService) EditDirectory ¶
func (s *SourceFilesService) EditDirectory(ctx context.Context, projectID, directoryID int, req []*model.UpdateRequest) ( *model.Directory, *Response, error, )
EditDirectory updates a directory in the project.
Request body:
- op: The operation to perform. Enum: replace, test.
- path: A JSON Pointer as defined in RFC 6901. Enum: "/branchId", "/directoryId", "/name", "/title", "/exportPattern", "/priority".
- value: The value to be used within the operations. The value must be one of string or integer.
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.patch
func (*SourceFilesService) EditFile ¶
func (s *SourceFilesService) EditFile(ctx context.Context, projectID, fileID int, req []*model.UpdateRequest) ( *model.File, *Response, error, )
EditFile updates a file in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.patch
func (*SourceFilesService) GetDirectory ¶
func (s *SourceFilesService) GetDirectory(ctx context.Context, projectID, directoryID int) (*model.Directory, *Response, error)
GetDirectory returns a single directory in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.get
func (*SourceFilesService) GetFile ¶
func (s *SourceFilesService) GetFile(ctx context.Context, projectID, fileID int) (*model.File, *Response, error)
GetFile returns a single file in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.get
func (*SourceFilesService) GetFileRevision ¶
func (s *SourceFilesService) GetFileRevision(ctx context.Context, projectID, fileID, revisionID int) (*model.FileRevision, *Response, error)
GetFileRevision returns a single file revision.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.revisions.get
func (*SourceFilesService) ListDirectories ¶
func (s *SourceFilesService) ListDirectories(ctx context.Context, projectID int, opts *model.DirectoryListOptions) ( []*model.Directory, *Response, error, )
ListDirectories returns a list of directories in the project.
Query parameters: - branchId: The identifier of the branch (filter by branch). - directoryId: The identifier of the directory (filter by directory). - filter: Filter directories by name. - recursion: List directories recursively. - limit: A maximum number of items to retrieve (default 25, max 500). - offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.getMany
func (*SourceFilesService) ListFileRevisions ¶
func (s *SourceFilesService) ListFileRevisions(ctx context.Context, projectID, fileID int, opts *model.ListOptions) ( []*model.FileRevision, *Response, error, )
ListFileRevisions returns a list of file revisions.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.revisions.getMany
func (*SourceFilesService) ListFiles ¶
func (s *SourceFilesService) ListFiles(ctx context.Context, projectID int, opts *model.FileListOptions) ( []*model.File, *Response, error, )
ListFiles returns a list of files in the project.
Query parameters: - branchId: The identifier of the branch (filter by branch). - directoryId: The identifier of the directory (filter by directory). - filter: Filter files by name. - recursion: List files recursively. - limit: A maximum number of items to retrieve (default 25, max 500). - offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.files.getMany
func (*SourceFilesService) ListReviewedBuilds ¶
func (s *SourceFilesService) ListReviewedBuilds(ctx context.Context, projectID int, opts *model.ReviewedBuildListOptions) ( []*model.ReviewedBuild, *Response, error, )
ListReviewedBuilds returns a list of reviewed source files builds.
func (*SourceFilesService) UpdateOrRestoreFile ¶
func (s *SourceFilesService) UpdateOrRestoreFile(ctx context.Context, projectID, fileID int, req *model.FileUpdateRestoreRequest) ( *model.File, *Response, error, )
UpdateOrRestoreFile updates a file in the project or restores it to one of the previous revisions. For updating the file, use the `storageId` body parameter. For restoring the file, use the `revisionId` body parameter.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.put
type SourceStringsService ¶
type SourceStringsService struct {
// contains filtered or unexported fields
}
Source strings are the text units for translation. Instead of modifying source files, you can manage source strings one by one. Use API to add, edit, or delete some specific strings in the source-based and files-based projects (available only for the following file formats: CSV, RESX, JSON, Android XML, iOS strings, PROPERTIES, XLIFF).
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Source-Strings
func (*SourceStringsService) Add ¶
func (s *SourceStringsService) Add(ctx context.Context, projectID int, req *model.SourceStringsAddRequest) ( *model.SourceString, *Response, error, )
Add creates a new string.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings.post
func (*SourceStringsService) BatchOperations ¶
func (s *SourceStringsService) BatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ( []*model.SourceString, *Response, error, )
BatchOperations allows performing multiple operations on source strings.
Request body:
- op: The operation to perform. Enum: add, replace, remove
- path: A JSON Pointer as defined in RFC 6901. Enum: "/{stringId}/identifier", "/{stringId}/text", "/{stringId}/context", "/{stringId}/isHidden", "/{stringId}/maxLength", "/{stringId}/labelIds"
- value: The value to be used within the operations. The value must be one of string, integer, boolean or map
https://developer.crowdin.com/api/v2/#operation/api.projects.strings.batchPatch
func (*SourceStringsService) Delete ¶
func (s *SourceStringsService) Delete(ctx context.Context, projectID, stringID int) (*Response, error)
Delete removes a specific string by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings.delete
func (*SourceStringsService) Edit ¶
func (s *SourceStringsService) Edit(ctx context.Context, projectID, stringID int, req []*model.UpdateRequest) ( *model.SourceString, *Response, error, )
Edit updates a specific string by its identifier.
Request body:
- op: The operation to perform. Enum: replace, test
- path: A JSON Pointer as defined in RFC 6901. Enum: "/identifier", "/text", "/context", "/isHidden" "/maxLength" "/labelIds"
- value: The value to be used within the operations. The value must be one of string, integer, boolean or object
https://developer.crowdin.com/api/v2/#operation/api.projects.strings.patch
func (*SourceStringsService) Get ¶
func (s *SourceStringsService) Get(ctx context.Context, projectID, stringID int, opts *model.SourceStringsGetOptions) ( *model.SourceString, *Response, error, )
Get returns a specific source string by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings.get
func (*SourceStringsService) GetUploadStatus ¶
func (s *SourceStringsService) GetUploadStatus(ctx context.Context, projectID int, uploadID string) ( *model.SourceStringsUpload, *Response, error, )
GetUploadStatus returns the status of the uploaded strings.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.strings.uploads.get
func (*SourceStringsService) List ¶
func (s *SourceStringsService) List(ctx context.Context, projectID int, opts *model.SourceStringsListOptions) ( []*model.SourceString, *Response, error, )
List returns a list of source strings. Use optional parameters to filter the list.
https://developer.crowdin.com/api/v2/#operation/api.projects.strings.getMany
func (*SourceStringsService) Upload ¶
func (s *SourceStringsService) Upload(ctx context.Context, projectID int, req *model.SourceStringsUploadRequest) ( *model.SourceStringsUpload, *Response, error, )
Upload uploads strings to the project.
https://developer.crowdin.com/api/v2/string-based/#operation/api.projects.strings.uploads.post
type StorageService ¶
type StorageService struct {
// contains filtered or unexported fields
}
Storages is a separate container for each file. You need to use Add method before adding files to your projects via API. Files that should be uploaded into storage include files for localization, screenshots, Glossaries, and Translation Memories. Storage `id` is the identifier of the file uploaded to the Storage.
Note: Files uploaded to the storage are kept during the next 24 hours.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Storage
func (*StorageService) Add ¶
Add adds a new file to the storage.
`file` is the file to be uploaded. It should be an os.File. ZIP files are not supported.
https://developer.crowdin.com/api/v2/#operation/api.storages.post
func (*StorageService) Delete ¶
Delete deletes a file from the storage by its identifier. https://developer.crowdin.com/api/v2/#operation/api.storages.delete
func (*StorageService) Get ¶
Get returns a file in the storage by its identifier. https://developer.crowdin.com/api/v2/#operation/api.storages.get
func (*StorageService) List ¶
func (s *StorageService) List(ctx context.Context, opts *model.ListOptions) ([]*model.Storage, *Response, error)
List returns a list of storages. opts (model.ListOptions) can be used to control pagination. If nil, default values will be used.
limit: A maximum number of items to retrieve (default 25, max 500). offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.storages.getMany
type StringCommentsService ¶
type StringCommentsService struct {
// contains filtered or unexported fields
}
Use API to list, add, edit or remove string comments.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/String-Comments
func (*StringCommentsService) Add ¶
func (s *StringCommentsService) Add(ctx context.Context, projectID int, req *model.StringCommentsAddRequest) ( *model.StringComment, *Response, error, )
Add creates a new string comment.
https://developer.crowdin.com/api/v2/#operation/api.projects.comments.post
func (*StringCommentsService) Delete ¶
func (s *StringCommentsService) Delete(ctx context.Context, projectID, commentID int) (*Response, error)
Delete removes a string comment.
https://developer.crowdin.com/api/v2/#operation/api.projects.comments.delete
func (*StringCommentsService) Edit ¶
func (s *StringCommentsService) Edit(ctx context.Context, projectID, commentID int, req []*model.UpdateRequest) ( *model.StringComment, *Response, error, )
Edit updates a string comment.
Request body:
- op: The operation to perform. Enum: replace, test.
- path: A JSON Pointer as defined by RFC 6901. Enum: "/text", "/issueStatus".
- value: The value to be used within the operations. The value must be string.
https://developer.crowdin.com/api/v2/#operation/api.projects.comments.patch
func (*StringCommentsService) Get ¶
func (s *StringCommentsService) Get(ctx context.Context, projectID, commentID int) ( *model.StringComment, *Response, error, )
Get returns a string comment by its ID.
https://developer.crowdin.com/api/v2/#operation/api.projects.comments.post
func (*StringCommentsService) List ¶
func (s *StringCommentsService) List(ctx context.Context, projectID int, opts *model.StringCommentsListOptions) ( []*model.StringComment, *Response, error, )
List returns a list of string comments.
https://developer.crowdin.com/api/v2/#operation/api.projects.comments.getMany
type StringTranslationsService ¶
type StringTranslationsService struct {
// contains filtered or unexported fields
}
Use API to add or remove strings translations, approvals, and votes.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/String-Translations
func (*StringTranslationsService) AddApproval ¶
func (s *StringTranslationsService) AddApproval(ctx context.Context, projectID, translationID int) ( *model.Approval, *Response, error, )
AddApproval adds a new translation approval.
https://developer.crowdin.com/api/v2/#operation/api.projects.approvals.post
func (*StringTranslationsService) AddTranslation ¶
func (s *StringTranslationsService) AddTranslation(ctx context.Context, projectID int, req *model.TranslationAddRequest) ( *model.Translation, *Response, error, )
AddTranslation adds a new string translation.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.post
func (*StringTranslationsService) AddVote ¶
func (s *StringTranslationsService) AddVote(ctx context.Context, projectID int, req *model.VoteAddRequest) ( *model.Vote, *Response, error, )
AddVote adds a vote for a translation.
https://developer.crowdin.com/api/v2/#operation/api.projects.votes.post
func (*StringTranslationsService) CancelVote ¶
func (s *StringTranslationsService) CancelVote(ctx context.Context, projectID, voteID int) (*Response, error)
CancelVote cancels a vote for a translation by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.votes.delete
func (*StringTranslationsService) DeleteStringTranslations ¶
func (s *StringTranslationsService) DeleteStringTranslations(ctx context.Context, projectID, stringID int, languageID string) ( *Response, error, )
DeleteStringTranslations deletes string translations by its identifiers.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.deleteMany
func (*StringTranslationsService) DeleteTranslation ¶
func (s *StringTranslationsService) DeleteTranslation(ctx context.Context, projectID, translationID int) (*Response, error)
DeleteTranslation deletes a translation by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.delete
func (*StringTranslationsService) GetApproval ¶
func (s *StringTranslationsService) GetApproval(ctx context.Context, projectID, approvalID int) (*model.Approval, *Response, error)
GetApproval returns a single translation approval by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.approvals.get
func (*StringTranslationsService) GetTranslation ¶
func (s *StringTranslationsService) GetTranslation(ctx context.Context, projectID, translationID int, opts *model.TranslationGetOptions) ( *model.Translation, *Response, error, )
GetTranslation returns a single string translation by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.get
func (*StringTranslationsService) GetVote ¶
func (s *StringTranslationsService) GetVote(ctx context.Context, projectID, voteID int) (*model.Vote, *Response, error)
GetVote gets a single translation vote by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.votes.get
func (*StringTranslationsService) ListApprovals ¶
func (s *StringTranslationsService) ListApprovals(ctx context.Context, projectID int, opts *model.ApprovalsListOptions) ( []*model.Approval, *Response, error, )
ListApprovals returns a list of translation approvals.
https://developer.crowdin.com/api/v2/#operation/api.projects.approvals.getMany
func (*StringTranslationsService) ListLanguageTranslations ¶
func (s *StringTranslationsService) ListLanguageTranslations( ctx context.Context, projectID int, languageID string, opts *model.LanguageTranslationsListOptions) ( []*model.LanguageTranslation, *Response, error, )
ListLanguageTranslations returns a list of translations for a specific language.
Note: For instant translation delivery to your mobile, web, server, or desktop apps, it is recommended to use OTA.
https://developer.crowdin.com/api/v2/#operation/api.projects.languages.translations.getMany
func (*StringTranslationsService) ListStringTranslations ¶
func (s *StringTranslationsService) ListStringTranslations(ctx context.Context, projectID int, opts *model.StringTranslationsListOptions) ( []*model.Translation, *Response, error, )
ListStringTranslations returns a list of string translations.
Note: For instant translation delivery to your mobile, web, server, or desktop apps, it is recommended to use OTA.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.getMany
func (*StringTranslationsService) ListVotes ¶
func (s *StringTranslationsService) ListVotes(ctx context.Context, projectID int, opts *model.VotesListOptions) ( []*model.Vote, *Response, error, )
ListVotes lists translation votes.
Note: Either `translationId` OR `fileId` OR `labelIds` OR `excludeLabelIds` with `languageId` OR `stringId` with `languageId` are required
https://developer.crowdin.com/api/v2/#operation/api.projects.votes.getMany
func (*StringTranslationsService) RemoveApproval ¶
func (s *StringTranslationsService) RemoveApproval(ctx context.Context, projectID, approvalID int) (*Response, error)
RemoveApproval removes a translation approval by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.approvals.delete
func (*StringTranslationsService) RestoreTranslation ¶
func (s *StringTranslationsService) RestoreTranslation(ctx context.Context, projectID, translationID int) ( *model.Translation, *Response, error, )
RestoreTranslation restores a translation by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.put
func (*StringTranslationsService) TranslationAlignment ¶
func (s *StringTranslationsService) TranslationAlignment(ctx context.Context, projectID int, req *model.TranslationAlignmentRequest) ( *model.TranslationAlignment, *Response, error, )
TranslationAlignment aligns translations.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.alignment.post
type TasksService ¶
type TasksService struct {
// contains filtered or unexported fields
}
Create and assign tasks to get files translated or proofread by specific people. You can set the due dates, split words between people, and receive notifications about the changes and updates on tasks. Tasks are project-specific, so you’ll have to create them within a project.
Use API to create, modify, and delete specific tasks.
API docs: https://developer.crowdin.com/api/v2/#tag/Tasks
func (*TasksService) Add ¶
func (s *TasksService) Add(ctx context.Context, projectID int, req model.TaskAddRequest) (*model.Task, *Response, error)
Add creates a new task in a project.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.post
func (*TasksService) AddSettingsTemplate ¶
func (s *TasksService) AddSettingsTemplate(ctx context.Context, projectID int, req *model.TaskSettingsTemplateAddRequest) ( *model.TaskSettingsTemplate, *Response, error, )
AddSettingsTemplate creates a new task settings template in a project.
func (*TasksService) Delete ¶
Delete removes a task from a project by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.delete
func (*TasksService) DeleteSettingsTemplate ¶
func (s *TasksService) DeleteSettingsTemplate(ctx context.Context, projectID, taskSettingTemplateID int) (*Response, error)
DeleteSettingsTemplate removes a task settings template from a project by its identifier.
func (*TasksService) Edit ¶
func (s *TasksService) Edit(ctx context.Context, projectID, taskID int, req []*model.UpdateRequest) (*model.Task, *Response, error)
Edit updates a task in a project by its identifier.
Request body (one of the following): 1. TaskOperation
- op (string): Operation to perform. Enum: replace, test.
- path (string <json-pointer>): JSON path to the field to be updated. Enum: "/status", "/title", "/description", "/deadline", "/startedAt", "/resolvedAt", "/splitFiles", "/splitContent", "/fileIds", "/stringIds", "/assignees", "/dateFrom", "/dateTo", "/labelIds", "/excludeLabelIds".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
2. VendorTaskOperation
- op (string): Operation to perform. Enum: replace, test.
- path (string <json-pointer>): JSON path to the field to be updated. Enum: "/title", "/description", "/sttaus".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
3. PendingTaskOperation
- op (string): Operation to perform. Enum: replace, test.
- path (string <json-pointer>): JSON path to the field to be updated. Enum: "/title", "/description", "/assignees", "/deadline".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
4. VendorPendingTaskOperation
- op (string): Operation to perform. Enum: replace, test.
- path (string <json-pointer>): JSON path to the field to be updated. Enum: "/title", "/description".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.patch
func (*TasksService) EditArchivedStatus ¶
func (s *TasksService) EditArchivedStatus(ctx context.Context, projectID, taskID int, req []*model.UpdateRequest) ( *model.Task, *Response, error, )
EditArchivedStatus changes the archived status of the task.
Request body: - op (string): Operation to perform. Enum: replace. - path (string <json-pointer>): JSON path to the field to be updated. Enum: "/isArchived". - value (bool): Value to be set. Enum: true - archive task, false - move a task from archived to a list of all tasks
https://developer.crowdin.com/api/v2/#operation/api.user.tasks.patch
func (*TasksService) EditSettingsTemplate ¶
func (s *TasksService) EditSettingsTemplate(ctx context.Context, projectID, taskSettingTemplateID int, req []*model.UpdateRequest) ( *model.TaskSettingsTemplate, *Response, error, )
EditSettingsTemplate updates a task settings template in a project by its identifier.
Request body: - op (string): Operation to perform. Enum: replace, test. - path (string <json-pointer>): JSON path to the field to be updated. Enum: "/name", "/config". - value (string|int): Value to be set. Enum: string, integer.
func (*TasksService) ExportStrings ¶
func (s *TasksService) ExportStrings(ctx context.Context, projectID, taskID int) (*model.DownloadLink, *Response, error)
ExportStrings returns a download link.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.exports.post
func (*TasksService) Get ¶
func (s *TasksService) Get(ctx context.Context, projectID, taskID int) (*model.Task, *Response, error)
Get returns a single task in a project by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.get
func (*TasksService) GetSettingsTemplate ¶
func (s *TasksService) GetSettingsTemplate(ctx context.Context, projectID, taskSettingTemplateID int) ( *model.TaskSettingsTemplate, *Response, error, )
GetSettingsTemplate returns a single task settings template in a project by its identifier.
func (*TasksService) List ¶
func (s *TasksService) List(ctx context.Context, projectID int, opts *model.TasksListOptions) ([]*model.Task, *Response, error)
List returns a list of tasks in a project.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.getMany
func (*TasksService) ListSettingsTemplates ¶
func (s *TasksService) ListSettingsTemplates(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.TaskSettingsTemplate, *Response, error, )
ListSettingsTemplates returns a list of task settings templates in a project.
func (*TasksService) ListUserTasks ¶
func (s *TasksService) ListUserTasks(ctx context.Context, opts *model.UserTasksListOptions) ([]*model.Task, *Response, error)
ListUserTasks returns a list of tasks assigned to the user.
https://developer.crowdin.com/api/v2/#operation/api.user.tasks.getMany
type TranslationMemoryService ¶
type TranslationMemoryService struct {
// contains filtered or unexported fields
}
Translation Memory (TM) is a vault of translations that were previously made in other projects. Those translations can be reused to speed up the translation process. Every translation made in the project is automatically added to the project Translation Memory.
Use API to create, upload, download, or remove specific TM. Translation Memory export and import are asynchronous operations and shall be completed with sequence of API methods.
func (*TranslationMemoryService) AddTM ¶
func (s *TranslationMemoryService) AddTM(ctx context.Context, req *model.TranslationMemoryAddRequest) ( *model.TranslationMemory, *Response, error, )
AddTM creates a new translation memory.
https://developer.crowdin.com/api/v2/#operation/api.tms.post
func (*TranslationMemoryService) CheckTMExportStatus ¶
func (s *TranslationMemoryService) CheckTMExportStatus(ctx context.Context, tmID int, exportID string) ( *model.TranslationMemoryExport, *Response, error, )
CheckTMExportStatus returns the status of a specific translation memory export.
https://developer.crowdin.com/api/v2/#operation/api.tms.exports.get
func (*TranslationMemoryService) CheckTMImportStatus ¶
func (s *TranslationMemoryService) CheckTMImportStatus(ctx context.Context, tmID int, importID string) ( *model.TranslationMemoryImport, *Response, error, )
CheckTMImportStatus returns the status of a specific translation memory import.
https://developer.crowdin.com/api/v2/#operation/api.tms.imports.get
func (*TranslationMemoryService) ClearTM ¶
ClearTM removes all segments from a specific translation memory.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.clear
func (*TranslationMemoryService) ConcordanceSearch ¶
func (s *TranslationMemoryService) ConcordanceSearch(ctx context.Context, projectID int, req *model.TMConcordanceSearchRequest) ( []*model.TMConcordanceSearch, *Response, error, )
ConcordanceSearch searches for concordance in a translation memory.
https://developer.crowdin.com/api/v2/#operation/api.projects.tms.concordance.post
func (*TranslationMemoryService) CreateTMSegment ¶
func (s *TranslationMemoryService) CreateTMSegment(ctx context.Context, tmID int, req *model.TMSegmentCreateRequest) ( *model.TMSegment, *Response, error, )
CreateTMSegment creates a new translation memory segment.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.post
func (*TranslationMemoryService) DeleteTM ¶
DeleteTM removes a specific translation memory by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.tms.delete
func (*TranslationMemoryService) DeleteTMSegment ¶
func (s *TranslationMemoryService) DeleteTMSegment(ctx context.Context, tmID, segmentID int) (*Response, error)
DeleteTMSegment removes a specific translation memory segment by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.delete
func (*TranslationMemoryService) DownloadTM ¶
func (s *TranslationMemoryService) DownloadTM(ctx context.Context, tmID int, exportID string) ( *model.DownloadLink, *Response, error, )
DownloadTM returns a download link for a specific translation memory export.
https://developer.crowdin.com/api/v2/#operation/api.tms.exports.download.download
func (*TranslationMemoryService) EditTM ¶
func (s *TranslationMemoryService) EditTM(ctx context.Context, tmID int, req []*model.UpdateRequest) ( *model.TranslationMemory, *Response, error, )
EditTM updates a specific translation memory by its identifier.
Request body: - op (string): Operation to perform. Enum: replace, test. - path (string): JSON Pointer to the field to update as defined in RFC 6901. - value (string): Value to set.
https://developer.crowdin.com/api/v2/#operation/api.tms.patch
func (*TranslationMemoryService) EditTMSegment ¶
func (s *TranslationMemoryService) EditTMSegment(ctx context.Context, tmID, segmentID int, req []*model.UpdateRequest) ( *model.TMSegment, *Response, error, )
EditTMSegment updates a specific translation memory segment by its identifier.
Request body: 1. TMSegmentRecordOperationAdd: Add a new record to the segment.
- op (string): Value: "add".
- path (string): "/records/-".
- value (object): Possible fields: text, languageId. Example: {"text":"string","languageId":"string"}
2. TMSegmentRecordOperationReplace: Replace the text of a specific record.
- op (string): Value: "replace".
- path (string): "/records/{recordId}/text".
- value (string): Value to set.
3. TMSegmentRecordOperationRemove: Remove a specific record.
- op (string): Value: "remove".
- path (string): "/records/{recordId}".
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.patch
func (*TranslationMemoryService) ExportTM ¶
func (s *TranslationMemoryService) ExportTM(ctx context.Context, tmID int, req *model.TranslationMemoryExportRequest) ( *model.TranslationMemoryExport, *Response, error, )
ExportTM creates a new translation memory export.
https://developer.crowdin.com/api/v2/#operation/api.tms.exports.post
func (*TranslationMemoryService) GetTM ¶
func (s *TranslationMemoryService) GetTM(ctx context.Context, tmID int) (*model.TranslationMemory, *Response, error)
GetTM returns a specific translation memory by its identifier.
func (*TranslationMemoryService) GetTMSegment ¶
func (s *TranslationMemoryService) GetTMSegment(ctx context.Context, tmID, segmentID int) ( *model.TMSegment, *Response, error, )
GetTMSegment returns a specific translation memory segment by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.get
func (*TranslationMemoryService) ImportTM ¶
func (s *TranslationMemoryService) ImportTM(ctx context.Context, tmID int, req *model.TranslationMemoryImportRequest) ( *model.TranslationMemoryImport, *Response, error, )
ImportTM creates a new translation memory import.
https://developer.crowdin.com/api/v2/#operation/api.tms.imports.post
func (*TranslationMemoryService) ListTMSegments ¶
func (s *TranslationMemoryService) ListTMSegments(ctx context.Context, tmID int, opts *model.TMSegmentsListOptions) ( []*model.TMSegment, *Response, error, )
ListTMSegments returns a list of translation memory segments.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.getMany
func (*TranslationMemoryService) ListTMs ¶
func (s *TranslationMemoryService) ListTMs(ctx context.Context, opts *model.TranslationMemoriesListOptions) ( []*model.TranslationMemory, *Response, error, )
ListTMs returns a list of translation memories.
https://developer.crowdin.com/api/v2/#operation/api.tms.getMany
type TranslationStatusService ¶
type TranslationStatusService struct {
// contains filtered or unexported fields
}
Status represents the general localization progress on both translations and proofreading. Use API to check translation and proofreading progress on different levels: file, language, branch, directory.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Translation-Status
func (*TranslationStatusService) GetBranchProgress ¶
func (s *TranslationStatusService) GetBranchProgress(ctx context.Context, projectID, branchID int, opts *model.ListOptions) ( []*model.TranslationProgress, *Response, error, )
GetBranchProgress returns the translation and proofreading progress on a branch level.
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.languages.progress.getMany
func (*TranslationStatusService) GetDirectoryProgress ¶
func (s *TranslationStatusService) GetDirectoryProgress(ctx context.Context, projectID, directoryID int, opts *model.ListOptions) ( []*model.TranslationProgress, *Response, error, )
GetDirectoryProgress returns the translation and proofreading progress on a directory level.
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.languages.progress.getMany
func (*TranslationStatusService) GetFileProgress ¶
func (s *TranslationStatusService) GetFileProgress(ctx context.Context, projectID, fileID int, opts *model.ListOptions) ( []*model.TranslationProgress, *Response, error, )
GetFileProgress returns the translation and proofreading progress on a file level.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.languages.progress.getMany
func (*TranslationStatusService) GetLanguageProgress ¶
func (s *TranslationStatusService) GetLanguageProgress(ctx context.Context, projectID int, languageID string, opts *model.ListOptions) ( []*model.TranslationProgress, *Response, error, )
GetLanguageProgress returns the translation and proofreading progress on a language level.
https://developer.crowdin.com/api/v2/#operation/api.projects.languages.files.progress.getMany
func (*TranslationStatusService) GetProjectProgress ¶
func (s *TranslationStatusService) GetProjectProgress(ctx context.Context, projectID int, opts *model.ProjectProgressListOptions) ( []*model.TranslationProgress, *Response, error, )
GetProjectProgress returns the translation and proofreading progress on a project level.
Query parameters: - languageIds: Filter progress by Language Identifier. - limit: A maximum number of items to retrieve (default 25, max 500). - offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.languages.progress.getMany
func (*TranslationStatusService) ListQAChecks ¶
func (s *TranslationStatusService) ListQAChecks(ctx context.Context, projectID int, opts *model.QACheckListOptions) ( []*model.QACheck, *Response, error, )
ListQAChecks returns a list of QA check issues.
Query parameters: - category: Filter progress by Category. - validation: Filter progress by Validation type. - languageId: Filter progress by Language Identifier. - limit: A maximum number of items to retrieve (default 25, max 500). - offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.qa-checks.getMany
type TranslationsService ¶
type TranslationsService struct {
// contains filtered or unexported fields
}
Translators can work with entirely untranslated project or you can pre-translate the files to ease the translations process. Use API to pre-translate files via Machine Translation (MT) or Translation Memory (TM), upload your existing translations, and download translations correspondingly. Pre-translate and build are asynchronous operations and shall be completed with sequence of API methods.
Note: If there are no new translations or changes in build parameters, Crowdin will return the current build for such requests.
func (*TranslationsService) ApplyPreTranslation ¶
func (s *TranslationsService) ApplyPreTranslation(ctx context.Context, projectID int, req *model.PreTranslationRequest) ( *model.PreTranslation, *Response, error, )
ApplyPreTranslation applies pre-translation to the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.post
func (*TranslationsService) BuildProjectDirectoryTranslation ¶
func (s *TranslationsService) BuildProjectDirectoryTranslation( ctx context.Context, projectID, directoryID int, req *model.BuildProjectDirectoryTranslationRequest, ) (*model.BuildProjectDirectoryTranslation, *Response, error)
BuildProjectDirectoryTranslation builds translations for a specific directory in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.directories.post
func (*TranslationsService) BuildProjectFileTranslation ¶
func (s *TranslationsService) BuildProjectFileTranslation( ctx context.Context, projectID, fileID int, req *model.BuildProjectFileTranslationRequest, etag string, ) (*model.DownloadLink, *Response, error)
BuildProjectFileTranslation builds translations for a specific file in the project.
Note: Pass `etag` identifier to see whether any changes were applied to the file. If etag is not empty, it would be added to the If-None-Match request header. In case the file was changed it would be built. If not you'll receive a 304 (Not Modified) status code.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.files.post
func (*TranslationsService) BuildProjectTranslation ¶
func (s *TranslationsService) BuildProjectTranslation(ctx context.Context, projectID int, req model.BuildProjectTranslationRequest) ( *model.TranslationsProjectBuild, *Response, error, )
BuildProjectTranslation builds project translations. Request body can be either `model.BuildProjectRequest` or `model.PseudoBuildProjectRequest`.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.post
func (*TranslationsService) CancelBuild ¶
func (s *TranslationsService) CancelBuild(ctx context.Context, projectID, buildID int) (*Response, error)
CancelBuild cancels a build by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.delete
func (*TranslationsService) CheckBuildStatus ¶
func (s *TranslationsService) CheckBuildStatus(ctx context.Context, projectID, buildID int) ( *model.TranslationsProjectBuild, *Response, error, )
CheckBuildStatus checks the status of a project build by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.get
func (*TranslationsService) DownloadProjectTranslations ¶
func (s *TranslationsService) DownloadProjectTranslations(ctx context.Context, projectID, buildID int) ( *model.DownloadLink, *Response, error, )
DownloadProjectTranslations returns a download link for a specific build.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.download.download
func (*TranslationsService) ExportProjectTranslation ¶
func (s *TranslationsService) ExportProjectTranslation(ctx context.Context, projectID int, req *model.ExportTranslationRequest) ( *model.DownloadLink, *Response, error, )
ExportProjectTranslation exports project translations for a specific language.
Note: For instant translation delivery to your mobile, web, server, or desktop apps, it is recommended to use OTA.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.exports.post
func (*TranslationsService) ListProjectBuilds ¶
func (s *TranslationsService) ListProjectBuilds(ctx context.Context, projectID int, opts *model.TranslationsBuildsListOptions) ( []*model.TranslationsProjectBuild, *Response, error, )
ListProjectBuilds returns a list of builds for a specific project.
Query parameters: - branchId: The identifier of the branch (filter by branch). - limit: A maximum number of items to retrieve (default 25, max 500). - offset: A starting offset in the collection of items (default 0).
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.getMany
func (*TranslationsService) PreTranslationStatus ¶
func (s *TranslationsService) PreTranslationStatus(ctx context.Context, projectID int, preTranslationID string) ( *model.PreTranslation, *Response, error, )
PreTranslationStatus returns a pre-translation status for project by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.get
func (*TranslationsService) UploadTranslations ¶
func (s *TranslationsService) UploadTranslations(ctx context.Context, projectID int, languageID string, req *model.UploadTranslationsRequest) ( *model.UploadTranslations, *Response, error, )
UploadTranslations uploads translations for a specific language in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.postOnLanguage
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
Users are the members of your organization with the defined access levels (e.g. manager, admin, contributor).
Use API to get the list of organization users and to check the information on a specific user.
CrowdIn API docs: https://developer.crowdin.com/api/v2/#tag/Users
func (*UsersService) AddProjectMember ¶
func (s *UsersService) AddProjectMember(ctx context.Context, projectID int, req *model.ProjectMemberAddRequest) ( map[string][]*model.ProjectMember, *Response, error, )
AddProjectMember adds a new member to the project. Returns a list of added and skipped members.
https://developer.crowdin.com/api/v2/#operation/api.projects.members.post
func (*UsersService) Delete ¶
Delete removes a user from the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.delete
func (*UsersService) DeleteProjectMember ¶
func (s *UsersService) DeleteProjectMember(ctx context.Context, projectID, memberID int) (*Response, error)
DeleteProjectMember removes a member from the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.members.delete
func (*UsersService) Edit ¶
func (s *UsersService) Edit(ctx context.Context, userID int, req []*model.UpdateRequest) (*model.User, *Response, error)
Edit updates information about a specific user.
Request body:
- op (string): Operation to perform. Enum: replace.
- path (string <json-pointer>): Path to the field to update. Enum: "/firstName", "/lastName", "/timezone", "/status", "/adminAccess".
- value (string): Value to set.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.patch
func (*UsersService) Get ¶
Get returns information about a specific user.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.getById
func (*UsersService) GetAuthenticated ¶
GetAuthenticated returns information about the authenticated user.
https://developer.crowdin.com/api/v2/#operation/api.user.get
func (*UsersService) GetProjectMember ¶
func (s *UsersService) GetProjectMember(ctx context.Context, projectID, memberID int) ( *model.ProjectMember, *Response, error, )
GetProjectMember returns information or permissions of a specific project member.
https://developer.crowdin.com/api/v2/#operation/api.projects.members.get
func (*UsersService) Invite ¶
func (s *UsersService) Invite(ctx context.Context, req *model.InviteUserRequest) (*model.User, *Response, error)
Invite sends an invitation to a new user.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.post
func (*UsersService) List ¶
func (s *UsersService) List(ctx context.Context, opts *model.UsersListOptions) ([]*model.User, *Response, error)
List returns a list of users in the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.getMany
func (*UsersService) ListProjectMembers ¶
func (s *UsersService) ListProjectMembers(ctx context.Context, projectID int, opts *model.ProjectMembersListOptions) ( []*model.ProjectMember, *Response, error, )
ListProjectMembers returns a list of project members.
https://developer.crowdin.com/api/v2/#operation/api.projects.members.getMany
func (*UsersService) ReplaceProjectMemberPermissions ¶
func (s *UsersService) ReplaceProjectMemberPermissions( ctx context.Context, projectID, memberID int, req *model.ProjectMemberReplaceRequest, ) (*model.ProjectMember, *Response, error)
ReplaceProjectMemberPermissions replaces permissions of a specific project member.
https://developer.crowdin.com/api/v2/#operation/api.projects.members.put
Source Files ¶
- branches.go
- bundles.go
- crowdin.go
- dictionaries.go
- glossaries.go
- groups.go
- labels.go
- languages.go
- machine_translation_engines.go
- projects.go
- reports.go
- screenshots.go
- source_files.go
- source_strings.go
- storage.go
- string_comments.go
- string_translations.go
- tasks.go
- translation_memory.go
- translation_status.go
- translations.go
- users.go