Documentation
¶
Index ¶
- func ToPtr[T any](v T) *T
- type AIService
- func (s *AIService) AddPrompt(ctx context.Context, userID int, req *model.PromptAddRequest) (*model.Prompt, *Response, error)
- func (s *AIService) AddProvider(ctx context.Context, userID int, req *model.ProviderAddRequest) (*model.Provider, *Response, error)
- func (s *AIService) AddSnippet(ctx context.Context, userID int, req *model.AISnippetAddRequest) (*model.AISnippet, *Response, error)
- func (s *AIService) CancelFileTranslation(ctx context.Context, jobIdentifier string, userID int) (*Response, error)
- func (s *AIService) CancelPromptCompletion(ctx context.Context, promptID int, completionID string, userID int) (*Response, error)
- func (s *AIService) CheckReportStatus(ctx context.Context, reportID string, userID int) (*model.AIReport, *Response, error)
- func (s *AIService) CheckRequestLogsExportStatus(ctx context.Context, exportID string, userID int) (*model.AIRequestLogsExport, *Response, error)
- func (s *AIService) ClonePrompt(ctx context.Context, promptID, userID int, req *model.PromptCloneRequest) (*model.Prompt, *Response, error)
- func (s *AIService) CreateFineTuningJob(ctx context.Context, aiPromptID, userID int, ...) (*model.FineTuningJob, *Response, error)
- func (s *AIService) CreateProxyChatCompletion(ctx context.Context, providerID, userID int, ...) (*model.ProxyChatCompletion, *Response, error)
- func (s *AIService) DeletePrompt(ctx context.Context, promptID, userID int) (*Response, error)
- func (s *AIService) DeleteProvider(ctx context.Context, providerID, userID int) (*Response, error)
- func (s *AIService) DeleteSnippet(ctx context.Context, snippetID, userID int) (*Response, error)
- func (s *AIService) DownloadFineTuningDataset(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) (*model.DownloadLink, *Response, error)
- func (s *AIService) DownloadPromptCompletion(ctx context.Context, promptID int, completionID string, userID int) (*model.DownloadLink, *Response, error)
- func (s *AIService) DownloadReport(ctx context.Context, reportID string, userID int) (*model.DownloadLink, *Response, error)
- func (s *AIService) DownloadRequestLogsExport(ctx context.Context, exportID string, userID int) (*model.DownloadLink, *Response, error)
- func (s *AIService) DownloadTranslatedFile(ctx context.Context, jobIdentifier string, userID int) (*model.DownloadLink, *Response, error)
- func (s *AIService) DownloadTranslatedFileStrings(ctx context.Context, jobIdentifier string, userID int) (*model.DownloadLink, *Response, error)
- func (s *AIService) EditPrompt(ctx context.Context, promptID, userID int, req []*model.UpdateRequest) (*model.Prompt, *Response, error)
- func (s *AIService) EditProvider(ctx context.Context, providerID, userID int, req []*model.UpdateRequest) (*model.Provider, *Response, error)
- func (s *AIService) EditSettings(ctx context.Context, userID int, req []*model.UpdateRequest) (*model.AISettings, *Response, error)
- func (s *AIService) EditSnippet(ctx context.Context, snippetID, userID int, req []*model.UpdateRequest) (*model.AISnippet, *Response, error)
- func (s *AIService) ExportRequestLogs(ctx context.Context, userID int, req *model.AIRequestLogsExportRequest) (*model.AIRequestLogsExport, *Response, error)
- func (s *AIService) GatewayDelete(ctx context.Context, providerID, userID int, path string) (map[string]any, *Response, error)
- func (s *AIService) GatewayGet(ctx context.Context, providerID, userID int, path string) (map[string]any, *Response, error)
- func (s *AIService) GatewayPatch(ctx context.Context, providerID, userID int, path string, body any) (map[string]any, *Response, error)
- func (s *AIService) GatewayPost(ctx context.Context, providerID, userID int, path string, body any) (map[string]any, *Response, error)
- func (s *AIService) GatewayPut(ctx context.Context, providerID, userID int, path string, body any) (map[string]any, *Response, error)
- func (s *AIService) GenerateFineTuningDataset(ctx context.Context, aiPromptID, userID int, ...) (*model.FineTuningDataset, *Response, error)
- func (s *AIService) GeneratePromptCompletion(ctx context.Context, promptID, userID int, req *model.PromptCompletionRequest) (*model.PromptCompletion, *Response, error)
- func (s *AIService) GenerateReport(ctx context.Context, userID int, req *model.AIReportGenerateRequest) (*model.AIReport, *Response, error)
- func (s *AIService) GetFileTranslationStatus(ctx context.Context, jobIdentifier string, userID int) (*model.AIFileTranslation, *Response, error)
- func (s *AIService) GetFineTuningDatasetGenerationStatus(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) (*model.FineTuningDataset, *Response, error)
- func (s *AIService) GetFineTuningJobStatus(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) (*model.FineTuningJob, *Response, error)
- func (s *AIService) GetProjectAISettings(ctx context.Context, projectID int) (*model.ProjectAISettings, *Response, error)
- func (s *AIService) GetPrompt(ctx context.Context, promptID, userID int) (*model.Prompt, *Response, error)
- func (s *AIService) GetPromptCompletionStatus(ctx context.Context, promptID int, completionID string, userID int) (*model.PromptCompletion, *Response, error)
- func (s *AIService) GetProvider(ctx context.Context, providerID, userID int) (*model.Provider, *Response, error)
- func (s *AIService) GetSettings(ctx context.Context, userID int) (*model.AISettings, *Response, error)
- func (s *AIService) GetSnippet(ctx context.Context, snippetID, userID int) (*model.AISnippet, *Response, error)
- func (s *AIService) GetUsageMember(ctx context.Context, memberID, userID int) (*model.AIUsageMember, *Response, error)
- func (s *AIService) ListAllProviderModels(ctx context.Context, userID int) ([]*model.ProviderModel, *Response, error)
- func (s *AIService) ListFineTuningEvents(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) ([]*model.FineTuningEvent, *Response, error)
- func (s *AIService) ListFineTuningJobs(ctx context.Context, userID int, opts *model.FineTuningJobsListOptions) ([]*model.FineTuningJob, *Response, error)
- func (s *AIService) ListPrompts(ctx context.Context, userID int, opt *model.AIPromtsListOptions) ([]*model.Prompt, *Response, error)
- func (s *AIService) ListProviderModels(ctx context.Context, providerID, userID int) ([]*model.ProviderModel, *Response, error)
- func (s *AIService) ListProviders(ctx context.Context, userID int, opt *model.ListOptions) ([]*model.Provider, *Response, error)
- func (s *AIService) ListRequestLogs(ctx context.Context, userID int, opts *model.AIRequestLogsListOptions) ([]*model.AIRequestLog, *Response, error)
- func (s *AIService) ListSnippets(ctx context.Context, userID int, opts *model.ListOptions) ([]*model.AISnippet, *Response, error)
- func (s *AIService) ListSupportedProviderModels(ctx context.Context, userID int, opts *model.SupportedModelsListOptions) ([]*model.SupportedModel, *Response, error)
- func (s *AIService) ListUsageMembers(ctx context.Context, userID int, opts *model.AIUsageMembersListOptions) ([]*model.AIUsageMember, *Response, error)
- func (s *AIService) TranslateFile(ctx context.Context, userID int, req *model.AIFileTranslationRequest) (*model.AIFileTranslation, *Response, error)
- func (s *AIService) TranslateStrings(ctx context.Context, userID int, req *model.AITranslateStringsRequest) (*model.AITranslateStrings, *Response, error)
- type AdvisorsService
- func (s *AdvisorsService) CreateCheck(ctx context.Context, projectID int, req *model.AdvisorCheckCreateRequest) (*model.AdvisorCheck, *Response, error)
- func (s *AdvisorsService) CreateOrUpdateApplicationInsight(ctx context.Context, projectID int, applicationIdentifier, moduleKey string, ...) (*Response, error)
- func (s *AdvisorsService) EditInsight(ctx context.Context, projectID, insightID int, req []*model.UpdateRequest) (*model.AdvisorInsight, *Response, error)
- func (s *AdvisorsService) GetCheck(ctx context.Context, projectID int, checkID string) (*model.AdvisorCheck, *Response, error)
- func (s *AdvisorsService) ListInsights(ctx context.Context, projectID int, opts *model.AdvisorInsightsListOptions) ([]*model.AdvisorInsight, *Response, error)
- type ApplicationsService
- func (s *ApplicationsService) AddConsent(ctx context.Context, req *model.ApplicationConsentAddRequest) (*model.ApplicationConsent, *Response, error)
- func (s *ApplicationsService) AddData(ctx context.Context, applicationID, path string, req map[string]any) (any, *Response, error)
- func (s *ApplicationsService) AddKVRecord(ctx context.Context, applicationID string, ...) (*model.ApplicationKVRecord, *Response, error)
- func (s *ApplicationsService) ApplyInstallationUpdate(ctx context.Context, applicationID string, ...) (*model.Installation, *Response, error)
- func (s *ApplicationsService) CancelIntegrationJob(ctx context.Context, applicationID string, projectID int, jobID string) (*Response, error)
- func (s *ApplicationsService) DeleteConsent(ctx context.Context, consentID int) (*Response, error)
- func (s *ApplicationsService) DeleteData(ctx context.Context, applicationID, path string) (*Response, error)
- func (s *ApplicationsService) DeleteInstallation(ctx context.Context, applicationID string, force bool) (*Response, error)
- func (s *ApplicationsService) DeleteKVRecord(ctx context.Context, applicationID, key string) (*Response, error)
- func (s *ApplicationsService) EditConsent(ctx context.Context, consentID int, req []*model.UpdateRequest) (*model.ApplicationConsent, *Response, error)
- func (s *ApplicationsService) EditData(ctx context.Context, applicationID, path string, req map[string]any) (any, *Response, error)
- func (s *ApplicationsService) EditInstallation(ctx context.Context, applicationID string, req []*model.UpdateRequest) (*model.Installation, *Response, error)
- func (s *ApplicationsService) EditKVRecord(ctx context.Context, applicationID, key string, req []*model.UpdateRequest) (*model.ApplicationKVRecord, *Response, error)
- func (s *ApplicationsService) GetData(ctx context.Context, applicationID, path string) (any, *Response, error)
- func (s *ApplicationsService) GetInstallation(ctx context.Context, applicationID string) (*model.Installation, *Response, error)
- func (s *ApplicationsService) GetInstallationUpdate(ctx context.Context, applicationID string) (*model.InstallationUpdate, *Response, error)
- func (s *ApplicationsService) GetIntegrationFileProgress(ctx context.Context, applicationID string, projectID, fileID int) (*model.TranslationProgress, *Response, error)
- func (s *ApplicationsService) GetIntegrationJobInfo(ctx context.Context, applicationID string, projectID int, jobID string) ([]*model.IntegrationJob, *Response, error)
- func (s *ApplicationsService) GetIntegrationJobs(ctx context.Context, applicationID string, projectID int, jobID string) ([]*model.IntegrationJob, *Response, error)
- func (s *ApplicationsService) GetIntegrationSettings(ctx context.Context, applicationID string, projectID int) (map[string]any, *Response, error)
- func (s *ApplicationsService) GetIntegrationSyncSettings(ctx context.Context, applicationID string, projectID int, ...) (any, *Response, error)
- func (s *ApplicationsService) GetKVRecord(ctx context.Context, applicationID, key string) (*model.ApplicationKVRecord, *Response, error)
- func (s *ApplicationsService) Install(ctx context.Context, req *model.InstallApplicationRequest) (*model.Installation, *Response, error)
- func (s *ApplicationsService) IntegrationLogin(ctx context.Context, applicationID string, req *model.IntegrationLoginRequest) (*Response, error)
- func (s *ApplicationsService) ListConsents(ctx context.Context, opts *model.ApplicationConsentsListOptions) ([]*model.ApplicationConsent, *Response, error)
- func (s *ApplicationsService) ListInstallations(ctx context.Context, opt *model.ListOptions) ([]*model.Installation, *Response, error)
- func (s *ApplicationsService) ListInstallationsWithOptions(ctx context.Context, opts *model.InstallationsListOptions) ([]*model.Installation, *Response, error)
- func (s *ApplicationsService) ListIntegrationCrowdinFiles(ctx context.Context, applicationID string, projectID int) ([]map[string]any, *Response, error)
- func (s *ApplicationsService) ListIntegrationFiles(ctx context.Context, applicationID string, projectID int) ([]map[string]any, *Response, error)
- func (s *ApplicationsService) ListIntegrationJobs(ctx context.Context, applicationID string, projectID int, ...) ([]*model.IntegrationJob, *Response, error)
- func (s *ApplicationsService) ListIntegrationLoginFields(ctx context.Context, applicationID string) ([]*model.IntegrationLoginField, *Response, error)
- func (s *ApplicationsService) ListKVRecords(ctx context.Context, applicationID string, ...) ([]*model.ApplicationKVRecord, *Response, error)
- func (s *ApplicationsService) RemoveKVRecordTTL(ctx context.Context, applicationID, key string) (*model.ApplicationKVRecord, *Response, error)
- func (s *ApplicationsService) UpdateIntegrationCrowdinFiles(ctx context.Context, applicationID string, ...) (*model.IntegrationJobResult, *Response, error)
- func (s *ApplicationsService) UpdateIntegrationFiles(ctx context.Context, applicationID string, ...) (*model.IntegrationJobResult, *Response, error)
- func (s *ApplicationsService) UpdateIntegrationSettings(ctx context.Context, applicationID string, ...) (*Response, error)
- func (s *ApplicationsService) UpdateIntegrationSyncSettings(ctx context.Context, applicationID string, ...) (*Response, error)
- func (s *ApplicationsService) UpdateOrRestoreData(ctx context.Context, applicationID, path string, req map[string]any) (any, *Response, error)
- func (s *ApplicationsService) UploadBundle(ctx context.Context, applicationID string, ...) (*model.Installation, *Response, error)
- 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) CheckDeleteStatus(ctx context.Context, projectID, branchID int, jobID string) (*model.NodeDeleteJob, *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) DeleteAsync(ctx context.Context, projectID, branchID int) (*model.NodeDeleteJob, *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)
- func (s *BranchesService) Search(ctx context.Context, opts *model.BranchesSearchOptions) ([]*model.Branch, *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) ExportWithRequest(ctx context.Context, projectID, bundleID int, req *model.BundleExportRequest) (*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)
- func (c *Client) Upload(ctx context.Context, path string, file io.Reader, v any, opts ...RequestOption) (*Response, error)
- type ClientOption
- type ClientsService
- type CustomPlaceholdersService
- func (s *CustomPlaceholdersService) Add(ctx context.Context, req *model.CustomPlaceholderAddRequest) (*model.CustomPlaceholder, *Response, error)
- func (s *CustomPlaceholdersService) Delete(ctx context.Context, customPlaceholderID int) (*Response, error)
- func (s *CustomPlaceholdersService) Edit(ctx context.Context, customPlaceholderID int, req []*model.UpdateRequest) (*model.CustomPlaceholder, *Response, error)
- func (s *CustomPlaceholdersService) Get(ctx context.Context, customPlaceholderID int) (*model.CustomPlaceholder, *Response, error)
- func (s *CustomPlaceholdersService) List(ctx context.Context, opts *model.ListOptions) ([]*model.CustomPlaceholder, *Response, error)
- type CustomSpellcheckersService
- type DictionariesService
- type DistributionsService
- func (s *DistributionsService) Add(ctx context.Context, projectID int, req *model.DistributionAddRequest) (*model.Distribution, *Response, error)
- func (s *DistributionsService) Delete(ctx context.Context, projectID int, hash string) (*Response, error)
- func (s *DistributionsService) Edit(ctx context.Context, projectID int, hash string, req []*model.UpdateRequest) (*model.Distribution, *Response, error)
- func (s *DistributionsService) Get(ctx context.Context, projectID int, hash string) (*model.Distribution, *Response, error)
- func (s *DistributionsService) GetRelease(ctx context.Context, projectID int, hash string) (*model.DistributionRelease, *Response, error)
- func (s *DistributionsService) List(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.Distribution, *Response, error)
- func (s *DistributionsService) Release(ctx context.Context, projectID int, hash string) (*model.DistributionRelease, *Response, error)
- type ExternalQAChecksService
- type FieldsService
- func (s *FieldsService) Add(ctx context.Context, req *model.FieldAddRequest) (*model.Field, *Response, error)
- func (s *FieldsService) Delete(ctx context.Context, fieldID int) (*Response, error)
- func (s *FieldsService) Edit(ctx context.Context, fieldID int, req []*model.UpdateRequest) (*model.Field, *Response, error)
- func (s *FieldsService) Get(ctx context.Context, fieldID int) (*model.Field, *Response, error)
- func (s *FieldsService) List(ctx context.Context, opts *model.FieldsListOptions) ([]*model.Field, *Response, error)
- 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) ConcordanceSearchAll(ctx context.Context, req *model.GlossaryConcordanceSearchAllRequest) ([]*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 GraphQL
- 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 NotificationsService
- type OrganizationService
- type OrganizationWebhooksService
- func (s *OrganizationWebhooksService) Add(ctx context.Context, projectID int, req *model.WebhookAddRequest) (*model.Webhook, *Response, error)
- func (s *OrganizationWebhooksService) Delete(ctx context.Context, organizationWebhookID int) (*Response, error)
- func (s *OrganizationWebhooksService) Edit(ctx context.Context, organizationWebhookID int, req []*model.UpdateRequest) (*model.Webhook, *Response, error)
- func (s *OrganizationWebhooksService) Get(ctx context.Context, organizationWebhookID int) (*model.Webhook, *Response, error)
- func (s *OrganizationWebhooksService) List(ctx context.Context, opts *model.ListOptions) ([]*model.Webhook, *Response, error)
- type ProjectPlaceholdersService
- func (s *ProjectPlaceholdersService) Add(ctx context.Context, projectID int, req *model.ProjectPlaceholderAddRequest) (*model.ProjectPlaceholder, *Response, error)
- func (s *ProjectPlaceholdersService) Delete(ctx context.Context, projectID, projectPlaceholderID int) (*Response, error)
- func (s *ProjectPlaceholdersService) Edit(ctx context.Context, projectID, projectPlaceholderID int, ...) (*model.ProjectPlaceholder, *Response, error)
- func (s *ProjectPlaceholdersService) Get(ctx context.Context, projectID, projectPlaceholderID int) (*model.ProjectPlaceholder, *Response, error)
- func (s *ProjectPlaceholdersService) List(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.ProjectPlaceholder, *Response, error)
- func (s *ProjectPlaceholdersService) ListSystemPlaceholders(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.ProjectSystemPlaceholder, *Response, error)
- func (s *ProjectPlaceholdersService) SystemPlaceholderBatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ([]*model.ProjectSystemPlaceholder, *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) AddUserSettingsTemplate(ctx context.Context, userID int, req *model.ReportSettingsTemplateAddRequest) (*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) DeleteUserSettingsTemplate(ctx context.Context, userID, 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) EditUserSettingsTemplate(ctx context.Context, userID, 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) GetUserSettingsTemplate(ctx context.Context, userID, 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)
- func (s *ReportsService) ListUserSettingsTemplates(ctx context.Context, userID int, opts *model.ListOptions) ([]*model.ReportSettingsTemplate, *Response, error)
- type Request
- 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 SecurityLogsService
- func (s *SecurityLogsService) GetOrganizationLog(ctx context.Context, logID int) (*model.SecurityLog, *Response, error)
- func (s *SecurityLogsService) GetUserLog(ctx context.Context, userID, logID int) (*model.SecurityLog, *Response, error)
- func (s *SecurityLogsService) ListOrganizationLogs(ctx context.Context, opts *model.SecurityLogsListOptions) ([]*model.SecurityLog, *Response, error)
- func (s *SecurityLogsService) ListUserLogs(ctx context.Context, userID int, opts *model.SecurityLogsListOptions) ([]*model.SecurityLog, *Response, error)
- type SourceFilesService
- func (s *SourceFilesService) AddAssetReference(ctx context.Context, projectID, fileID int, ...) (*model.AssetReference, *Response, error)
- 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) CheckDirectoryDeleteStatus(ctx context.Context, projectID, directoryID int, jobID string) (*model.NodeDeleteJob, *Response, error)
- func (s *SourceFilesService) CheckFileDeleteStatus(ctx context.Context, projectID, fileID int, jobID string) (*model.NodeDeleteJob, *Response, error)
- func (s *SourceFilesService) CheckReviewedBuildStatus(ctx context.Context, projectID, buildID int) (*model.ReviewedBuild, *Response, error)
- func (s *SourceFilesService) DeleteAssetReference(ctx context.Context, projectID, fileID, referenceID int) (*Response, error)
- func (s *SourceFilesService) DeleteDirectory(ctx context.Context, projectID, directoryID int) (*Response, error)
- func (s *SourceFilesService) DeleteDirectoryAsync(ctx context.Context, projectID, directoryID int) (*model.NodeDeleteJob, *Response, error)
- func (s *SourceFilesService) DeleteFile(ctx context.Context, projectID, fileID int) (*Response, error)
- func (s *SourceFilesService) DeleteFileAsync(ctx context.Context, projectID, fileID int) (*model.NodeDeleteJob, *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) GetAssetReference(ctx context.Context, projectID, fileID, referenceID int) (*model.AssetReference, *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) ListAssetReferences(ctx context.Context, projectID, fileID int, opts *model.ListOptions) ([]*model.AssetReference, *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) SearchDirectories(ctx context.Context, opts *model.DirectoriesSearchOptions) ([]*model.Directory, *Response, error)
- func (s *SourceFilesService) SearchFiles(ctx context.Context, opts *model.FilesSearchOptions) ([]*model.File, *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) BatchOperationsWithOptions(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) EditWithOptions(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) Search(ctx context.Context, opts *model.SourceStringsSearchOptions) ([]*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) BatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ([]*model.StringComment, *Response, error)
- func (s *StringCommentsService) Delete(ctx context.Context, projectID, commentID int) (*Response, error)
- func (s *StringCommentsService) DeleteAttachment(ctx context.Context, projectID, commentID, attachmentID int) (*model.StringComment, *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 StringCorrectionsService
- func (s *StringCorrectionsService) Add(ctx context.Context, projectID int, req *model.StringCorrectionAddRequest) (*model.StringCorrection, *Response, error)
- func (s *StringCorrectionsService) Delete(ctx context.Context, projectID, correctionID int) (*Response, error)
- func (s *StringCorrectionsService) DeleteMany(ctx context.Context, projectID, stringID int) (*Response, error)
- func (s *StringCorrectionsService) Get(ctx context.Context, projectID, correctionID int, ...) (*model.StringCorrection, *Response, error)
- func (s *StringCorrectionsService) List(ctx context.Context, projectID int, opts *model.StringCorrectionsListOptions) ([]*model.StringCorrection, *Response, error)
- func (s *StringCorrectionsService) Restore(ctx context.Context, projectID, correctionID int) (*model.StringCorrection, *Response, error)
- type StringTranslationsService
- func (s *StringTranslationsService) AddApproval(ctx context.Context, projectID, translationID int) (*model.Approval, *Response, error)
- func (s *StringTranslationsService) AddCorrectionApproval(ctx context.Context, projectID, correctionID 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) ApprovalBatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ([]*model.Approval, *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) RemoveStringApprovals(ctx context.Context, projectID, stringID int) (*Response, error)
- func (s *StringTranslationsService) RestoreTranslation(ctx context.Context, projectID, translationID int) (*model.Translation, *Response, error)
- func (s *StringTranslationsService) SearchTranslations(ctx context.Context, opts *model.SearchTranslationsListOptions) ([]*model.SearchTranslation, *Response, error)
- func (s *StringTranslationsService) TranslationAlignment(ctx context.Context, projectID int, req *model.TranslationAlignmentRequest) (*model.TranslationAlignment, *Response, error)
- func (s *StringTranslationsService) TranslationBatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ([]*model.Translation, *Response, error)
- type StyleGuidesService
- func (s *StyleGuidesService) Create(ctx context.Context, req *model.StyleGuideCreateRequest) (*model.StyleGuide, *Response, error)
- func (s *StyleGuidesService) Delete(ctx context.Context, styleGuideID int) (*Response, error)
- func (s *StyleGuidesService) Edit(ctx context.Context, styleGuideID int, req []*model.UpdateRequest) (*model.StyleGuide, *Response, error)
- func (s *StyleGuidesService) Get(ctx context.Context, styleGuideID int) (*model.StyleGuide, *Response, error)
- func (s *StyleGuidesService) List(ctx context.Context, opts *model.StyleGuidesListOptions) ([]*model.StyleGuide, *Response, error)
- type TasksService
- func (s *TasksService) Add(ctx context.Context, projectID int, req model.TaskAddRequester) (*model.Task, *Response, error)
- func (s *TasksService) AddComment(ctx context.Context, projectID, taskID int, req *model.TaskCommentAddRequest) (*model.TaskComment, *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) DeleteComment(ctx context.Context, projectID, taskID, commentID 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) EditComment(ctx context.Context, projectID, taskID, commentID int, ...) (*model.TaskComment, *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) GetComment(ctx context.Context, projectID, taskID, commentID int) (*model.TaskComment, *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) ListAll(ctx context.Context, userID int, opts *model.AllTasksListOptions) ([]*model.Task, *Response, error)
- func (s *TasksService) ListComments(ctx context.Context, projectID, taskID int, opts *model.ListOptions) ([]*model.TaskComment, *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 TeamsService
- func (s *TeamsService) Add(ctx context.Context, req *model.TeamAddRequest) (*model.Team, *Response, error)
- func (s *TeamsService) AddMember(ctx context.Context, teamID int, req *model.TeamMemberAddRequest) (map[string][]*model.TeamMember, *Response, error)
- func (s *TeamsService) AddToProject(ctx context.Context, projectID int, req *model.ProjectTeamAddRequest) (map[string]*model.ProjectTeam, *Response, error)
- func (s *TeamsService) Delete(ctx context.Context, teamID int) (*Response, error)
- func (s *TeamsService) DeleteMember(ctx context.Context, teamID, memberID int) (*Response, error)
- func (s *TeamsService) DeleteMembers(ctx context.Context, teamID int) (*Response, error)
- func (s *TeamsService) Edit(ctx context.Context, teamID int, req []*model.UpdateRequest) (*model.Team, *Response, error)
- func (s *TeamsService) EditGroupTeams(ctx context.Context, groupID int, req []*model.UpdateRequest) ([]*model.GroupsTeam, *Response, error)
- func (s *TeamsService) EditProjectsPermissions(ctx context.Context, teamID int, req []*model.UpdateRequest) ([]*model.TeamProjectPermissions, *Response, error)
- func (s *TeamsService) Get(ctx context.Context, teamID int) (*model.Team, *Response, error)
- func (s *TeamsService) GetGroupTeam(ctx context.Context, groupID, teamID int) (*model.GroupsTeam, *Response, error)
- func (s *TeamsService) List(ctx context.Context, opts *model.TeamsListOptions) ([]*model.Team, *Response, error)
- func (s *TeamsService) ListGroupTeams(ctx context.Context, groupID int, opts *model.TeamsListOptions) ([]*model.GroupsTeam, *Response, error)
- func (s *TeamsService) ListMembers(ctx context.Context, teamID int, opts *model.ListOptions) ([]*model.TeamMember, *Response, error)
- func (s *TeamsService) ListProjectsPermissions(ctx context.Context, teamID int, opts *model.ListOptions) ([]*model.TeamProjectPermissions, *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) ConcordanceSearchAll(ctx context.Context, req *model.TMConcordanceSearchAllRequest) ([]*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)
- func (s *TranslationMemoryService) TMSegmentBatchOperations(ctx context.Context, tmID int, req []*model.UpdateRequest) ([]*model.TMSegment, *Response, error)
- type TranslationStatusService
- func (s *TranslationStatusService) CancelQAChecksRevalidation(ctx context.Context, projectID int, revalidationID string) (*Response, error)
- 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) GetQAChecksRevalidationStatus(ctx context.Context, projectID int, revalidationID string) (*model.QACheckRevalidation, *Response, error)
- func (s *TranslationStatusService) ListQAChecks(ctx context.Context, projectID int, opts *model.QACheckListOptions) ([]*model.QACheck, *Response, error)
- func (s *TranslationStatusService) RevalidateQAChecks(ctx context.Context, projectID int, req *model.QACheckRevalidationRequest) (*model.QACheckRevalidation, *Response, error)
- func (s *TranslationStatusService) ValidateQAChecks(ctx context.Context, projectID int, req []*model.QACheckValidateRequest) ([]*model.QACheckValidation, *Response, error)
- type TranslationsService
- func (s *TranslationsService) ApplyPreTranslation(ctx context.Context, projectID int, req *model.PreTranslationRequest) (*model.PreTranslation, *Response, error)
- func (s *TranslationsService) BatchPreTranslation(ctx context.Context, projectID int, req []*model.UpdateRequest) ([]*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.BuildProjectTranslationRequester) (*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) EditPreTranslation(ctx context.Context, projectID int, preTranslationID string, ...) (*model.PreTranslation, *Response, error)
- func (s *TranslationsService) ExportProjectTranslation(ctx context.Context, projectID int, req *model.ExportTranslationRequest) (*model.DownloadLink, *Response, error)
- func (s *TranslationsService) ImportTranslations(ctx context.Context, projectID int, req *model.TranslationImportRequest) (*model.TranslationImport, *Response, error)
- func (s *TranslationsService) ImportTranslationsReport(ctx context.Context, projectID int, importID string) (*model.TranslationImportReport, *Response, error)
- func (s *TranslationsService) ImportTranslationsStatus(ctx context.Context, projectID int, importID string) (*model.TranslationImport, *Response, error)
- func (s *TranslationsService) ListPreTranslations(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.PreTranslation, *Response, error)
- func (s *TranslationsService) ListPreTranslationsWithOptions(ctx context.Context, projectID int, opts *model.PreTranslationsListOptions) ([]*model.PreTranslation, *Response, error)
- func (s *TranslationsService) ListProjectBuilds(ctx context.Context, projectID int, opts *model.TranslationsBuildsListOptions) ([]*model.TranslationsProjectBuild, *Response, error)
- func (s *TranslationsService) PreTranslationReport(ctx context.Context, projectID int, preTranslationID string) (*model.PreTranslationReport, *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)deprecated
- 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) EditAuthenticated(ctx context.Context, req []*model.UpdateRequest) (*model.User, *Response, error)
- func (s *UsersService) EditManagers(ctx context.Context, groupID int, req []*model.UpdateRequest) ([]*model.Manager, *Response, error)
- func (s *UsersService) EditProjectsPermissions(ctx context.Context, userID int, req []*model.UpdateRequest) ([]*model.UserProjectPermissions, *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) GetManager(ctx context.Context, groupID, userID int) (*model.Manager, *Response, error)
- func (s *UsersService) GetManagers(ctx context.Context, groupID int) (*model.Manager, *Response, error)deprecated
- 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) ListManagers(ctx context.Context, groupID int, opts *model.ManagerListOptions) ([]*model.Manager, *Response, error)
- func (s *UsersService) ListProjectMembers(ctx context.Context, projectID int, opts *model.ProjectMembersListOptions) ([]*model.ProjectMember, *Response, error)
- func (s *UsersService) ListProjectsContributions(ctx context.Context, userID int, opts *model.ListOptions) ([]*model.UserProjectContribution, *Response, error)
- func (s *UsersService) ListProjectsPermissions(ctx context.Context, userID int, opts *model.ListOptions) ([]*model.UserProjectPermissions, *Response, error)
- func (s *UsersService) ReplaceProjectMemberPermissions(ctx context.Context, projectID, memberID int, ...) (*model.ProjectMember, *Response, error)
- type VendorsService
- type WebhooksService
- func (s *WebhooksService) Add(ctx context.Context, projectID int, req *model.WebhookAddRequest) (*model.Webhook, *Response, error)
- func (s *WebhooksService) Delete(ctx context.Context, projectID, webhookID int) (*Response, error)
- func (s *WebhooksService) Edit(ctx context.Context, projectID, webhookID int, req []*model.UpdateRequest) (*model.Webhook, *Response, error)
- func (s *WebhooksService) Get(ctx context.Context, projectID, webhookID int) (*model.Webhook, *Response, error)
- func (s *WebhooksService) List(ctx context.Context, projectID int, opts *model.ListOptions) ([]*model.Webhook, *Response, error)
- type WorkflowsService
- func (s *WorkflowsService) GetStep(ctx context.Context, projectID, stepID int) (*model.WorkflowStep, *Response, error)
- func (s *WorkflowsService) GetTemplate(ctx context.Context, templateID int) (*model.WorkflowTemplate, *Response, error)
- func (s *WorkflowsService) ListStepStrings(ctx context.Context, projectID, stepID int, ...) ([]*model.SourceString, *Response, error)
- func (s *WorkflowsService) ListSteps(ctx context.Context, projectID string) ([]*model.WorkflowStep, *Response, error)
- func (s *WorkflowsService) ListTemplates(ctx context.Context, opts *model.WorkflowTemplatesListOptions) ([]*model.WorkflowTemplate, *Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AIService ¶ added in v0.5.0
type AIService struct {
// contains filtered or unexported fields
}
AIService provides access to the AI related methods of the CrowdIn API.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/AI
func (*AIService) AddPrompt ¶ added in v0.5.0
func (s *AIService) AddPrompt(ctx context.Context, userID int, req *model.PromptAddRequest) (*model.Prompt, *Response, error)
AddPrompt adds a new AI prompt. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.post
func (*AIService) AddProvider ¶ added in v0.5.0
func (s *AIService) AddProvider(ctx context.Context, userID int, req *model.ProviderAddRequest) (*model.Provider, *Response, error)
AddProvider adds a new AI provider. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.post
func (*AIService) AddSnippet ¶ added in v0.19.0
func (s *AIService) AddSnippet(ctx context.Context, userID int, req *model.AISnippetAddRequest) (*model.AISnippet, *Response, error)
AddSnippet adds a new AI snippet. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.prompts.snippets.post
func (*AIService) CancelFileTranslation ¶ added in v0.19.0
func (s *AIService) CancelFileTranslation(ctx context.Context, jobIdentifier string, userID int) (*Response, error)
CancelFileTranslation cancels an AI file translation job. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.file-translations.delete
func (*AIService) CancelPromptCompletion ¶ added in v0.19.0
func (s *AIService) CancelPromptCompletion(ctx context.Context, promptID int, completionID string, userID int) (*Response, error)
CancelPromptCompletion cancels an AI prompt completion. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.prompts.completions.delete
func (*AIService) CheckReportStatus ¶ added in v0.19.0
func (s *AIService) CheckReportStatus(ctx context.Context, reportID string, userID int) (*model.AIReport, *Response, error)
CheckReportStatus returns the generation status of an AI report. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.reports.get
func (*AIService) CheckRequestLogsExportStatus ¶ added in v0.19.0
func (s *AIService) CheckRequestLogsExportStatus(ctx context.Context, exportID string, userID int) ( *model.AIRequestLogsExport, *Response, error, )
CheckRequestLogsExportStatus returns the status of an AI request logs export. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.requestLogs.exports.get
func (*AIService) ClonePrompt ¶ added in v0.19.0
func (s *AIService) ClonePrompt(ctx context.Context, promptID, userID int, req *model.PromptCloneRequest) (*model.Prompt, *Response, error)
ClonePrompt clones an existing AI prompt. For the Enterprise client, set the userID to 0. If req is nil, the prompt is cloned with the default name.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.prompts.clones.post
func (*AIService) CreateFineTuningJob ¶ added in v0.12.0
func (s *AIService) CreateFineTuningJob(ctx context.Context, aiPromptID, userID int, req *model.FineTuningJobCreateRequest) ( *model.FineTuningJob, *Response, error, )
CreateFineTuningJob creates a new AI Prompt Fine-Tuning Job.
https://support.crowdin.com/developer/api/v2/#tag/AI/operation/api.ai.prompts.fine-tuning.jobs.post
func (*AIService) CreateProxyChatCompletion ¶ added in v0.5.0
func (s *AIService) CreateProxyChatCompletion(ctx context.Context, providerID, userID int, req *model.CreateProxyChatCompletionRequest) ( *model.ProxyChatCompletion, *Response, error, )
CreateProxyChatCompletion creates a new chat completion.
This API method serves as an intermediary, forwarding your requests directly to the selected provider. Please refer to the documentation for the specific provider you use to determine the required payload format.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.chat.completions.post
func (*AIService) DeletePrompt ¶ added in v0.5.0
DeletePrompt deletes an existing AI prompt. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.delete
func (*AIService) DeleteProvider ¶ added in v0.5.0
DeleteProvider deletes an existing AI provider. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.delete
func (*AIService) DeleteSnippet ¶ added in v0.19.0
DeleteSnippet deletes an existing AI snippet. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.prompts.snippets.delete
func (*AIService) DownloadFineTuningDataset ¶ added in v0.12.0
func (s *AIService) DownloadFineTuningDataset(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) ( *model.DownloadLink, *Response, error, )
DownloadFineTuningDataset returns a download link for the AI Prompt Fine-Tuning Dataset.
func (*AIService) DownloadPromptCompletion ¶ added in v0.19.0
func (s *AIService) DownloadPromptCompletion(ctx context.Context, promptID int, completionID string, userID int) ( *model.DownloadLink, *Response, error, )
DownloadPromptCompletion returns a download link for an AI prompt completion. For the Enterprise client, set the userID to 0.
func (*AIService) DownloadReport ¶ added in v0.19.0
func (s *AIService) DownloadReport(ctx context.Context, reportID string, userID int) (*model.DownloadLink, *Response, error)
DownloadReport returns a download link for an AI report. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.reports.download.download
func (*AIService) DownloadRequestLogsExport ¶ added in v0.19.0
func (s *AIService) DownloadRequestLogsExport(ctx context.Context, exportID string, userID int) ( *model.DownloadLink, *Response, error, )
DownloadRequestLogsExport returns a download link for an AI request logs export. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.requestLogs.exports.download
func (*AIService) DownloadTranslatedFile ¶ added in v0.19.0
func (s *AIService) DownloadTranslatedFile(ctx context.Context, jobIdentifier string, userID int) ( *model.DownloadLink, *Response, error, )
DownloadTranslatedFile returns a download link for the file translated by AI. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.file-translations.download
func (*AIService) DownloadTranslatedFileStrings ¶ added in v0.19.0
func (s *AIService) DownloadTranslatedFileStrings(ctx context.Context, jobIdentifier string, userID int) ( *model.DownloadLink, *Response, error, )
DownloadTranslatedFileStrings returns a download link for the strings of the file translated by AI. For the Enterprise client, set the userID to 0.
func (*AIService) EditPrompt ¶ added in v0.5.0
func (s *AIService) EditPrompt(ctx context.Context, promptID, userID int, req []*model.UpdateRequest) (*model.Prompt, *Response, error)
EditPrompt updates an existing AI prompt. For the Enterprise client, set the userID to 0.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string<json-pointer>): path to the field to update. Enum: "/name", "/action", "/aiProviderId", "/aiModelId", "/enabledProjectIds", "/config".
- Value (any): new value to set.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.patch
func (*AIService) EditProvider ¶ added in v0.5.0
func (s *AIService) EditProvider(ctx context.Context, providerID, userID int, req []*model.UpdateRequest) (*model.Provider, *Response, error)
EditProvider updates an existing AI provider. For the Enterprise client, set the userID to 0.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string<json-pointer>): path to the field to update. Enum: "/name", "/type", "/credentials", "/config", "/isEnabled", "/useSystemCredentials".
- Value (any): new value to set.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.patch
func (*AIService) EditSettings ¶ added in v0.19.0
func (s *AIService) EditSettings(ctx context.Context, userID int, req []*model.UpdateRequest) (*model.AISettings, *Response, error)
EditSettings updates the AI settings. For the Enterprise client, set the userID to 0.
Request body:
- Op (string): operation to perform. Enum: replace, remove, test.
- Path (string<json-pointer>): path to the field to update. Enum: "/preTranslationAiPromptId", "/editorSuggestionAiPromptId", "/alignmentActionAiPromptId" (Enterprise only), "/qaCheckActionAiPromptId", "/contextReviewAiPromptId", "/dailyCostLimit", "/monthlyCostLimit", "/userDailyCostLimit", "/userMonthlyCostLimit", "/perUserOverrides".
- Value (any): new value to set.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.settings.patch
func (*AIService) EditSnippet ¶ added in v0.19.0
func (s *AIService) EditSnippet(ctx context.Context, snippetID, userID int, req []*model.UpdateRequest) (*model.AISnippet, *Response, error)
EditSnippet updates an existing AI snippet. For the Enterprise client, set the userID to 0.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string<json-pointer>): path to the field to update. Enum: "/description", "/placeholder", "/value".
- Value (any): new value to set.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.prompts.snippets.patch
func (*AIService) ExportRequestLogs ¶ added in v0.19.0
func (s *AIService) ExportRequestLogs(ctx context.Context, userID int, req *model.AIRequestLogsExportRequest) ( *model.AIRequestLogsExport, *Response, error, )
ExportRequestLogs starts an export of the AI request logs. For the Enterprise client, set the userID to 0. If req is nil, every log entry is exported.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.requestLogs.exports.post
func (*AIService) GatewayDelete ¶ added in v0.19.0
func (s *AIService) GatewayDelete(ctx context.Context, providerID, userID int, path string) (map[string]any, *Response, error)
GatewayDelete sends a DELETE request to the AI provider API through the AI Gateway. For the Enterprise client, set the userID to 0.
The path is the raw provider API path after `/gateway/` and may contain slashes. The provider response is returned as is.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.providers.gateway.crowdin.delete
func (*AIService) GatewayGet ¶ added in v0.19.0
func (s *AIService) GatewayGet(ctx context.Context, providerID, userID int, path string) (map[string]any, *Response, error)
GatewayGet sends a GET request to the AI provider API through the AI Gateway. For the Enterprise client, set the userID to 0.
The path is the raw provider API path after `/gateway/` and may contain slashes (e.g. `models`, `chat/completions`). The provider response is returned as is.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.providers.gateway.crowdin.get
func (*AIService) GatewayPatch ¶ added in v0.19.0
func (s *AIService) GatewayPatch(ctx context.Context, providerID, userID int, path string, body any) (map[string]any, *Response, error)
GatewayPatch sends a PATCH request to the AI provider API through the AI Gateway. For the Enterprise client, set the userID to 0.
The path is the raw provider API path after `/gateway/` and may contain slashes. The body is forwarded to the provider and the provider response is returned as is.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.providers.gateway.crowdin.patch
func (*AIService) GatewayPost ¶ added in v0.19.0
func (s *AIService) GatewayPost(ctx context.Context, providerID, userID int, path string, body any) (map[string]any, *Response, error)
GatewayPost sends a POST request to the AI provider API through the AI Gateway. For the Enterprise client, set the userID to 0.
The path is the raw provider API path after `/gateway/` and may contain slashes (e.g. `chat/completions`, `messages`). The body is forwarded to the provider and the provider response is returned as is.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.providers.gateway.crowdin.post
func (*AIService) GatewayPut ¶ added in v0.19.0
func (s *AIService) GatewayPut(ctx context.Context, providerID, userID int, path string, body any) (map[string]any, *Response, error)
GatewayPut sends a PUT request to the AI provider API through the AI Gateway. For the Enterprise client, set the userID to 0.
The path is the raw provider API path after `/gateway/` and may contain slashes. The body is forwarded to the provider and the provider response is returned as is.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.providers.gateway.crowdin.put
func (*AIService) GenerateFineTuningDataset ¶ added in v0.12.0
func (s *AIService) GenerateFineTuningDataset(ctx context.Context, aiPromptID, userID int, req *model.FineTuningDatasetAttributes) ( *model.FineTuningDataset, *Response, error, )
GenerateFineTuningDataset generates a new AI Prompt Fine-Tuning Dataset.
func (*AIService) GeneratePromptCompletion ¶ added in v0.19.0
func (s *AIService) GeneratePromptCompletion(ctx context.Context, promptID, userID int, req *model.PromptCompletionRequest) ( *model.PromptCompletion, *Response, error, )
GeneratePromptCompletion generates a new AI prompt completion. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.prompts.completions.post
func (*AIService) GenerateReport ¶ added in v0.19.0
func (s *AIService) GenerateReport(ctx context.Context, userID int, req *model.AIReportGenerateRequest) (*model.AIReport, *Response, error)
GenerateReport generates a new AI report. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.reports.post
func (*AIService) GetFileTranslationStatus ¶ added in v0.19.0
func (s *AIService) GetFileTranslationStatus(ctx context.Context, jobIdentifier string, userID int) ( *model.AIFileTranslation, *Response, error, )
GetFileTranslationStatus returns the status of an AI file translation job. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.file-translations.get
func (*AIService) GetFineTuningDatasetGenerationStatus ¶ added in v0.12.0
func (s *AIService) GetFineTuningDatasetGenerationStatus(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) ( *model.FineTuningDataset, *Response, error, )
GetFineTuningDatasetGenerationStatus returns the status of the AI Prompt Fine-Tuning Dataset generation.
func (*AIService) GetFineTuningJobStatus ¶ added in v0.12.0
func (s *AIService) GetFineTuningJobStatus(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) ( *model.FineTuningJob, *Response, error, )
GetFineTuningJobStatus returns the status of the AI Prompt Fine-Tuning Job.
func (*AIService) GetProjectAISettings ¶ added in v0.19.0
func (s *AIService) GetProjectAISettings(ctx context.Context, projectID int) (*model.ProjectAISettings, *Response, error)
GetProjectAISettings returns the AI settings of a project.
https://support.crowdin.com/developer/api/v2/#operation/api.projects.ai.settings.get
func (*AIService) GetPrompt ¶ added in v0.5.0
func (s *AIService) GetPrompt(ctx context.Context, promptID, userID int) (*model.Prompt, *Response, error)
GetPrompt retrieves a single AI prompt. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.prompts.get
func (*AIService) GetPromptCompletionStatus ¶ added in v0.19.0
func (s *AIService) GetPromptCompletionStatus(ctx context.Context, promptID int, completionID string, userID int) ( *model.PromptCompletion, *Response, error, )
GetPromptCompletionStatus returns the status of an AI prompt completion. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.prompts.completions.get
func (*AIService) GetProvider ¶ added in v0.5.0
func (s *AIService) GetProvider(ctx context.Context, providerID, userID int) (*model.Provider, *Response, error)
GetProvider returns a single AI provider. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.users.ai.providers.get
func (*AIService) GetSettings ¶ added in v0.19.0
func (s *AIService) GetSettings(ctx context.Context, userID int) (*model.AISettings, *Response, error)
GetSettings returns the AI settings. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.settings.get
func (*AIService) GetSnippet ¶ added in v0.19.0
func (s *AIService) GetSnippet(ctx context.Context, snippetID, userID int) (*model.AISnippet, *Response, error)
GetSnippet returns a single AI snippet. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.prompts.snippets.get
func (*AIService) GetUsageMember ¶ added in v0.19.0
func (s *AIService) GetUsageMember(ctx context.Context, memberID, userID int) (*model.AIUsageMember, *Response, error)
GetUsageMember returns the AI usage and limits of a single organization member. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.usage.members.get
func (*AIService) ListAllProviderModels ¶ added in v0.19.0
func (s *AIService) ListAllProviderModels(ctx context.Context, userID int) ([]*model.ProviderModel, *Response, error)
ListAllProviderModels returns a list of models of all configured AI providers. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.providers.models.crowdin.getMany
func (*AIService) ListFineTuningEvents ¶ added in v0.12.0
func (s *AIService) ListFineTuningEvents(ctx context.Context, aiPromptID int, jobIdentifier string, userID int) ( []*model.FineTuningEvent, *Response, error, )
ListFineTuningEvents returns a list of AI Prompt Fine-Tuning Events.
func (*AIService) ListFineTuningJobs ¶ added in v0.12.0
func (s *AIService) ListFineTuningJobs(ctx context.Context, userID int, opts *model.FineTuningJobsListOptions) ( []*model.FineTuningJob, *Response, error, )
ListFineTuningJobs returns a list of AI Prompt Fine-Tuning Jobs.
func (*AIService) ListPrompts ¶ added in v0.5.0
func (s *AIService) ListPrompts(ctx context.Context, userID int, opt *model.AIPromtsListOptions) ([]*model.Prompt, *Response, error)
ListPrompts returns a list of AI prompts. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.ai.prompts.getMany
func (*AIService) ListProviderModels ¶ added in v0.5.0
func (s *AIService) ListProviderModels(ctx context.Context, providerID, userID int) ([]*model.ProviderModel, *Response, error)
ListProviderModels returns a list of AI provider models. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.ai.providers.models.getMany
func (*AIService) ListProviders ¶ added in v0.5.0
func (s *AIService) ListProviders(ctx context.Context, userID int, opt *model.ListOptions) ([]*model.Provider, *Response, error)
ListProviders returns a list of AI providers. For the Enterprise client, set the userID to 0.
https://developer.crowdin.com/api/v2/#operation/api.ai.providers.getMany
func (*AIService) ListRequestLogs ¶ added in v0.19.0
func (s *AIService) ListRequestLogs(ctx context.Context, userID int, opts *model.AIRequestLogsListOptions) ( []*model.AIRequestLog, *Response, error, )
ListRequestLogs returns a list of AI request logs. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.requestLogs.getMany
func (*AIService) ListSnippets ¶ added in v0.19.0
func (s *AIService) ListSnippets(ctx context.Context, userID int, opts *model.ListOptions) ([]*model.AISnippet, *Response, error)
ListSnippets returns a list of AI snippets. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.prompts.snippets.getMany
func (*AIService) ListSupportedProviderModels ¶ added in v0.19.0
func (s *AIService) ListSupportedProviderModels(ctx context.Context, userID int, opts *model.SupportedModelsListOptions) ( []*model.SupportedModel, *Response, error, )
ListSupportedProviderModels returns a list of supported AI provider models. For the Enterprise client, set the userID to 0.
func (*AIService) ListUsageMembers ¶ added in v0.19.0
func (s *AIService) ListUsageMembers(ctx context.Context, userID int, opts *model.AIUsageMembersListOptions) ( []*model.AIUsageMember, *Response, error, )
ListUsageMembers returns a list of organization members with their AI usage and limits. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.ai.usage.members.getMany
func (*AIService) TranslateFile ¶ added in v0.19.0
func (s *AIService) TranslateFile(ctx context.Context, userID int, req *model.AIFileTranslationRequest) ( *model.AIFileTranslation, *Response, error, )
TranslateFile starts an AI file translation job. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.file-translations.post
func (*AIService) TranslateStrings ¶ added in v0.19.0
func (s *AIService) TranslateStrings(ctx context.Context, userID int, req *model.AITranslateStringsRequest) ( *model.AITranslateStrings, *Response, error, )
TranslateStrings translates strings with AI. For the Enterprise client, set the userID to 0.
https://support.crowdin.com/developer/api/v2/#operation/api.users.ai.translate.strings.post
type AdvisorsService ¶ added in v0.19.0
type AdvisorsService struct {
// contains filtered or unexported fields
}
AdvisorsService provides access to the Advisors API methods. Advisors inspect a project and produce insights about its localization health.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Advisors
func (*AdvisorsService) CreateCheck ¶ added in v0.19.0
func (s *AdvisorsService) CreateCheck(ctx context.Context, projectID int, req *model.AdvisorCheckCreateRequest) ( *model.AdvisorCheck, *Response, error, )
CreateCheck triggers an asynchronous re-check of advisor inspectors for the project. If req is nil or empty, every inspector is re-checked.
https://developer.crowdin.com/api/v2/#operation/api.projects.advisors.checks.post
func (*AdvisorsService) CreateOrUpdateApplicationInsight ¶ added in v0.19.0
func (s *AdvisorsService) CreateOrUpdateApplicationInsight( ctx context.Context, projectID int, applicationIdentifier, moduleKey string, req *model.ApplicationAdvisorInsightRequest, ) (*Response, error)
CreateOrUpdateApplicationInsight publishes the result of an installed application's `advisor-inspector` module check. Subsequent calls for the same string overwrite the previous insight from this module.
func (*AdvisorsService) EditInsight ¶ added in v0.19.0
func (s *AdvisorsService) EditInsight(ctx context.Context, projectID, insightID int, req []*model.UpdateRequest) ( *model.AdvisorInsight, *Response, error, )
EditInsight updates an advisor insight by its identifier.
Request body: - op - operation to perform. Enum: replace, test. - path (json-pointer) - path to the field to update. Enum: "/isDismissed". - value (bool) - new value for the field.
https://developer.crowdin.com/api/v2/#operation/api.projects.advisors.insights.patch
func (*AdvisorsService) GetCheck ¶ added in v0.19.0
func (s *AdvisorsService) GetCheck(ctx context.Context, projectID int, checkID string) ( *model.AdvisorCheck, *Response, error, )
GetCheck returns the status of an advisor check job.
https://developer.crowdin.com/api/v2/#operation/api.projects.advisors.checks.get
func (*AdvisorsService) ListInsights ¶ added in v0.19.0
func (s *AdvisorsService) ListInsights(ctx context.Context, projectID int, opts *model.AdvisorInsightsListOptions) ( []*model.AdvisorInsight, *Response, error, )
ListInsights returns a list of advisor insights of the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.advisors.insights.getMany
type ApplicationsService ¶ added in v0.5.0
type ApplicationsService struct {
// contains filtered or unexported fields
}
Crowdin Apps are web applications that can be integrated with Crowdin to extend its functionality.
Use the API to manage the necessary app data.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Applications
func (*ApplicationsService) AddConsent ¶ added in v0.19.0
func (s *ApplicationsService) AddConsent(ctx context.Context, req *model.ApplicationConsentAddRequest) ( *model.ApplicationConsent, *Response, error, )
AddConsent records the current user's consent decision for an application installed by another user.
Note: This endpoint is available only in Crowdin.
https://developer.crowdin.com/api/v2/#operation/api.applications.consents.post
func (*ApplicationsService) AddData ¶ added in v0.5.0
func (s *ApplicationsService) AddData(ctx context.Context, applicationID, path string, req map[string]any) ( any, *Response, error, )
AddData adds application data.
https://developer.crowdin.com/api/v2/#operation/api.applications.api.post
func (*ApplicationsService) AddKVRecord ¶ added in v0.19.0
func (s *ApplicationsService) AddKVRecord(ctx context.Context, applicationID string, req *model.ApplicationKVRecordAddRequest) ( *model.ApplicationKVRecord, *Response, error, )
AddKVRecord adds a new KV record to the application installation's storage. If the key already exists, the API returns 409.
Note: Requires the application's own access token.
https://developer.crowdin.com/api/v2/#operation/api.applications.storage.kv.records.post
func (*ApplicationsService) ApplyInstallationUpdate ¶ added in v0.19.0
func (s *ApplicationsService) ApplyInstallationUpdate(ctx context.Context, applicationID string, req *model.InstallationUpdateApplyRequest) ( *model.Installation, *Response, error, )
ApplyInstallationUpdate applies the latest cached manifest to an installed application. It requires `manifestHash` from a recent GetInstallationUpdate call. If the cached manifest has changed since, the API returns 409.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.update.post
func (*ApplicationsService) CancelIntegrationJob ¶ added in v0.19.0
func (s *ApplicationsService) CancelIntegrationJob(ctx context.Context, applicationID string, projectID int, jobID string) (*Response, error)
CancelIntegrationJob cancels an integration job.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.job.cancel
func (*ApplicationsService) DeleteConsent ¶ added in v0.19.0
DeleteConsent forgets the current user's consent decision for an application. The next call from that application will prompt for consent again.
Note: This endpoint is available only in Crowdin.
https://developer.crowdin.com/api/v2/#operation/api.applications.consents.delete
func (*ApplicationsService) DeleteData ¶ added in v0.5.0
func (s *ApplicationsService) DeleteData(ctx context.Context, applicationID, path string) (*Response, error)
DeleteData deletes application data.
https://developer.crowdin.com/api/v2/#operation/api.applications.api.delete
func (*ApplicationsService) DeleteInstallation ¶ added in v0.5.0
func (s *ApplicationsService) DeleteInstallation(ctx context.Context, applicationID string, force bool) (*Response, error)
DeleteInstallation deletes an application installation.
id: application identifier force: if true, force to delete application installation
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.delete
func (*ApplicationsService) DeleteKVRecord ¶ added in v0.19.0
func (s *ApplicationsService) DeleteKVRecord(ctx context.Context, applicationID, key string) (*Response, error)
DeleteKVRecord deletes a KV record.
Note: Requires the application's own access token.
https://developer.crowdin.com/api/v2/#operation/api.applications.storage.kv.records.delete
func (*ApplicationsService) EditConsent ¶ added in v0.19.0
func (s *ApplicationsService) EditConsent(ctx context.Context, consentID int, req []*model.UpdateRequest) ( *model.ApplicationConsent, *Response, error, )
EditConsent changes an existing consent decision.
Request body:
- op (string): operation to perform. Enum: replace.
- path (string <json-pointer>): path to the field to update. Enum: "/status", "/scopes".
- value (string|[]string): a status (`granted`/`denied`) for "/status", or an array of scope identifiers for "/scopes".
Note: This endpoint is available only in Crowdin.
https://developer.crowdin.com/api/v2/#operation/api.applications.consents.patch
func (*ApplicationsService) EditData ¶ added in v0.5.0
func (s *ApplicationsService) EditData(ctx context.Context, applicationID, path string, req map[string]any) ( any, *Response, error, )
EditData updates application data.
https://developer.crowdin.com/api/v2/#operation/api.applications.api.patch
func (*ApplicationsService) EditInstallation ¶ added in v0.5.0
func (s *ApplicationsService) EditInstallation(ctx context.Context, applicationID string, req []*model.UpdateRequest) ( *model.Installation, *Response, error, )
EditInstallation updates an application installation.
Request body:
- op (string): operation to perform. Enum: replace.
- path (string <json-pointer>): path to the field to update. Enum: "/permissions", "/modules/{moduleKey}/permissions", "/manifest". The "/manifest" path is available only for applications installed from manifest content.
- value (model.InstallationReplaceValue): object with values to update, or model.ApplicationManifest for the "/manifest" path.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.patch
func (*ApplicationsService) EditKVRecord ¶ added in v0.19.0
func (s *ApplicationsService) EditKVRecord(ctx context.Context, applicationID, key string, req []*model.UpdateRequest) ( *model.ApplicationKVRecord, *Response, error, )
EditKVRecord replaces the value, the TTL, or both on an existing KV record.
Request body:
- op (string): operation to perform. Enum: replace.
- path (string <json-pointer>): path to the field to update. Enum: "/value", "/ttl".
- value (any): any JSON value for "/value", or a TTL in seconds (60-31536000) for "/ttl".
Use RemoveKVRecordTTL to remove the TTL and make the record permanent.
Note: Requires the application's own access token.
https://developer.crowdin.com/api/v2/#operation/api.applications.storage.kv.records.patch
func (*ApplicationsService) GetData ¶ added in v0.5.0
func (s *ApplicationsService) GetData(ctx context.Context, applicationID, path string) (any, *Response, error)
GetData returns application data.
https://developer.crowdin.com/api/v2/#operation/api.applications.api.get
func (*ApplicationsService) GetInstallation ¶ added in v0.5.0
func (s *ApplicationsService) GetInstallation(ctx context.Context, applicationID string) (*model.Installation, *Response, error)
GetInstallation returns information about an application installation.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.get
func (*ApplicationsService) GetInstallationUpdate ¶ added in v0.19.0
func (s *ApplicationsService) GetInstallationUpdate(ctx context.Context, applicationID string) ( *model.InstallationUpdate, *Response, error, )
GetInstallationUpdate returns the diff between the currently installed application and the latest cached manifest, tagged with `manifestHash` for optimistic locking on apply.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.update.get
func (*ApplicationsService) GetIntegrationFileProgress ¶ added in v0.19.0
func (s *ApplicationsService) GetIntegrationFileProgress(ctx context.Context, applicationID string, projectID, fileID int) ( *model.TranslationProgress, *Response, error, )
GetIntegrationFileProgress returns the translation progress of a Crowdin file of an integration application.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.file.progress
func (*ApplicationsService) GetIntegrationJobInfo ¶ added in v0.19.0
func (s *ApplicationsService) GetIntegrationJobInfo(ctx context.Context, applicationID string, projectID int, jobID string) ( []*model.IntegrationJob, *Response, error, )
GetIntegrationJobInfo returns information about an integration job.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.job.info
func (*ApplicationsService) GetIntegrationJobs ¶ added in v0.19.0
func (s *ApplicationsService) GetIntegrationJobs(ctx context.Context, applicationID string, projectID int, jobID string) ( []*model.IntegrationJob, *Response, error, )
GetIntegrationJobs returns information about integration jobs. The jobID is optional; pass an empty string to omit it.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.job.get
func (*ApplicationsService) GetIntegrationSettings ¶ added in v0.19.0
func (s *ApplicationsService) GetIntegrationSettings(ctx context.Context, applicationID string, projectID int) ( map[string]any, *Response, error, )
GetIntegrationSettings returns the settings of an integration application. The settings are a free-form object.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.settings.get
func (*ApplicationsService) GetIntegrationSyncSettings ¶ added in v0.19.0
func (s *ApplicationsService) GetIntegrationSyncSettings(ctx context.Context, applicationID string, projectID int, provider model.IntegrationSyncProvider, ) (any, *Response, error)
GetIntegrationSyncSettings returns the sync settings of an integration application. The result is either an object (file ID to language IDs) or an array of file objects.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.sync.settings.get
func (*ApplicationsService) GetKVRecord ¶ added in v0.19.0
func (s *ApplicationsService) GetKVRecord(ctx context.Context, applicationID, key string) ( *model.ApplicationKVRecord, *Response, error, )
GetKVRecord returns a single KV record.
Note: Requires the application's own access token.
https://developer.crowdin.com/api/v2/#operation/api.applications.storage.kv.records.get
func (*ApplicationsService) Install ¶ added in v0.5.0
func (s *ApplicationsService) Install(ctx context.Context, req *model.InstallApplicationRequest) ( *model.Installation, *Response, error, )
Install installs an application from a manifest URL or from inline manifest content.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.post
func (*ApplicationsService) IntegrationLogin ¶ added in v0.19.0
func (s *ApplicationsService) IntegrationLogin(ctx context.Context, applicationID string, req *model.IntegrationLoginRequest) (*Response, error)
IntegrationLogin logs in to an integration with the given credentials.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.integration.login
func (*ApplicationsService) ListConsents ¶ added in v0.19.0
func (s *ApplicationsService) ListConsents(ctx context.Context, opts *model.ApplicationConsentsListOptions) ( []*model.ApplicationConsent, *Response, error, )
ListConsents returns a list of the current user's application consent decisions.
Note: This endpoint is available only in Crowdin.
https://developer.crowdin.com/api/v2/#operation/api.applications.consents.getMany
func (*ApplicationsService) ListInstallations ¶ added in v0.5.0
func (s *ApplicationsService) ListInstallations(ctx context.Context, opt *model.ListOptions) ([]*model.Installation, *Response, error)
ListInstallations returns a list of application installations.
Use ListInstallationsWithOptions to filter and sort the installations.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.getMany
func (*ApplicationsService) ListInstallationsWithOptions ¶ added in v0.19.0
func (s *ApplicationsService) ListInstallationsWithOptions(ctx context.Context, opts *model.InstallationsListOptions) ( []*model.Installation, *Response, error, )
ListInstallationsWithOptions returns a list of application installations filtered and sorted by the given options.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.getMany
func (*ApplicationsService) ListIntegrationCrowdinFiles ¶ added in v0.19.0
func (s *ApplicationsService) ListIntegrationCrowdinFiles(ctx context.Context, applicationID string, projectID int) ( []map[string]any, *Response, error, )
ListIntegrationCrowdinFiles returns a list of Crowdin files of an integration application. Each file is a free-form object (e.g. id, name, parentId, type).
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.crowdin.files
func (*ApplicationsService) ListIntegrationFiles ¶ added in v0.19.0
func (s *ApplicationsService) ListIntegrationFiles(ctx context.Context, applicationID string, projectID int) ( []map[string]any, *Response, error, )
ListIntegrationFiles returns a list of integration files of an integration application. Each file is a free-form object (e.g. id, name, parentId, type, node_type).
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.integration.files
func (*ApplicationsService) ListIntegrationJobs ¶ added in v0.19.0
func (s *ApplicationsService) ListIntegrationJobs(ctx context.Context, applicationID string, projectID int, opts *model.ListOptions) ( []*model.IntegrationJob, *Response, error, )
ListIntegrationJobs returns a list of all jobs of an integration application.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.job.list
func (*ApplicationsService) ListIntegrationLoginFields ¶ added in v0.19.0
func (s *ApplicationsService) ListIntegrationLoginFields(ctx context.Context, applicationID string) ( []*model.IntegrationLoginField, *Response, error, )
ListIntegrationLoginFields returns the integration login form fields.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.integration.fields
func (*ApplicationsService) ListKVRecords ¶ added in v0.19.0
func (s *ApplicationsService) ListKVRecords(ctx context.Context, applicationID string, opts *model.ApplicationKVRecordsListOptions) ( []*model.ApplicationKVRecord, *Response, error, )
ListKVRecords returns a list of the KV records in the application installation's storage that are visible to the current user.
Note: Requires the application's own access token.
https://developer.crowdin.com/api/v2/#operation/api.applications.storage.kv.records.getMany
func (*ApplicationsService) RemoveKVRecordTTL ¶ added in v0.19.0
func (s *ApplicationsService) RemoveKVRecordTTL(ctx context.Context, applicationID, key string) ( *model.ApplicationKVRecord, *Response, error, )
RemoveKVRecordTTL removes the TTL of an existing KV record and makes it permanent (sends a replace operation for the "/ttl" path with a null value).
Note: Requires the application's own access token.
https://developer.crowdin.com/api/v2/#operation/api.applications.storage.kv.records.patch
func (*ApplicationsService) UpdateIntegrationCrowdinFiles ¶ added in v0.19.0
func (s *ApplicationsService) UpdateIntegrationCrowdinFiles(ctx context.Context, applicationID string, req *model.IntegrationCrowdinFilesUpdateRequest) ( *model.IntegrationJobResult, *Response, error, )
UpdateIntegrationCrowdinFiles updates Crowdin files from the integration. It returns the identifier of the started job.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.crowdin.update
func (*ApplicationsService) UpdateIntegrationFiles ¶ added in v0.19.0
func (s *ApplicationsService) UpdateIntegrationFiles(ctx context.Context, applicationID string, req *model.IntegrationFilesUpdateRequest) ( *model.IntegrationJobResult, *Response, error, )
UpdateIntegrationFiles updates integration files from Crowdin. It returns the identifier of the started job.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.integration.update
func (*ApplicationsService) UpdateIntegrationSettings ¶ added in v0.19.0
func (s *ApplicationsService) UpdateIntegrationSettings(ctx context.Context, applicationID string, req *model.IntegrationSettingsUpdateRequest) ( *Response, error, )
UpdateIntegrationSettings updates the settings of an integration application.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.settings.update
func (*ApplicationsService) UpdateIntegrationSyncSettings ¶ added in v0.19.0
func (s *ApplicationsService) UpdateIntegrationSyncSettings(ctx context.Context, applicationID string, req *model.IntegrationSyncSettingsUpdateRequest) ( *Response, error, )
UpdateIntegrationSyncSettings updates the sync settings of an integration application.
https://developer.crowdin.com/api/v2/#operation/api.applications.integrations.sync.settings.update
func (*ApplicationsService) UpdateOrRestoreData ¶ added in v0.5.0
func (s *ApplicationsService) UpdateOrRestoreData(ctx context.Context, applicationID, path string, req map[string]any) ( any, *Response, error, )
UpdateOrRestoreData updates or restores application data.
https://developer.crowdin.com/api/v2/#operation/api.applications.api.put
func (*ApplicationsService) UploadBundle ¶ added in v0.19.0
func (s *ApplicationsService) UploadBundle(ctx context.Context, applicationID string, req *model.ApplicationBundleUploadRequest) ( *model.Installation, *Response, error, )
UploadBundle uploads a bundle archive for a serverless app installed from manifest content. The bundle must be a ZIP archive that contains a non-empty `app.js` entry point at its root.
https://developer.crowdin.com/api/v2/#operation/api.applications.installations.bundles.post
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) CheckDeleteStatus ¶ added in v0.19.0
func (s *BranchesService) CheckDeleteStatus(ctx context.Context, projectID, branchID int, jobID string) ( *model.NodeDeleteJob, *Response, error, )
CheckDeleteStatus checks the status of an asynchronous branch deletion.
https://developer.crowdin.com/api/v2/#operation/api.projects.branches.jobs.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) DeleteAsync ¶ added in v0.19.0
func (s *BranchesService) DeleteAsync(ctx context.Context, projectID, branchID int) (*model.NodeDeleteJob, *Response, error)
DeleteAsync deletes a project branch asynchronously. It sends the `Prefer: respond-async` header and returns a delete job. Use CheckDeleteStatus to poll the status of the job.
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", "/isProtected" (string-based projects only). - 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.
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
func (*BranchesService) Search ¶ added in v0.19.0
func (s *BranchesService) Search(ctx context.Context, opts *model.BranchesSearchOptions) ([]*model.Branch, *Response, error)
Search searches branches by name or title across multiple projects. The `filter` option is required.
https://developer.crowdin.com/api/v2/#operation/api.branches.getMany
type BundlesService ¶ added in v0.2.0
type BundlesService struct {
// contains filtered or unexported fields
}
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Bundles
func (*BundlesService) Add ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
Delete removes the bundle.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.delete
func (*BundlesService) Download ¶ added in v0.2.0
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 ¶ added in v0.2.0
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", "/includeInContextPseudoLanguage", "/excludeLabelIds", "/labelMatchRule", "/excludeLabelMatchRule".
- 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 ¶ added in v0.2.0
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) ExportWithRequest ¶ added in v0.19.0
func (s *BundlesService) ExportWithRequest(ctx context.Context, projectID, bundleID int, req *model.BundleExportRequest) ( *model.BundleExport, *Response, error, )
ExportWithRequest starts the export process for the bundle with the given export options (target languages, untranslated strings/files handling, approvals, workflow). A nil request exports the bundle with the default options.
https://developer.crowdin.com/api/v2/#operation/api.projects.bundles.exports.post
func (*BundlesService) Get ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 {
GraphQL *GraphQL
AI *AIService
Advisors *AdvisorsService
Applications *ApplicationsService
Branches *BranchesService
Bundles *BundlesService
Clients *ClientsService
CustomPlaceholders *CustomPlaceholdersService
CustomSpellcheckers *CustomSpellcheckersService
Dictionaries *DictionariesService
Distributions *DistributionsService
ExternalQAChecks *ExternalQAChecksService
Fields *FieldsService
Groups *GroupsService
Glossaries *GlossariesService
Labels *LabelsService
Languages *LanguagesService
MachineTranslationEngines *MachineTranslationEnginesService
Notifications *NotificationsService
Organization *OrganizationService
OrganizationWebhooks *OrganizationWebhooksService
ProjectPlaceholders *ProjectPlaceholdersService
Projects *ProjectsService
Reports *ReportsService
Screenshots *ScreenshotsService
SecurityLogs *SecurityLogsService
SourceFiles *SourceFilesService
SourceStrings *SourceStringsService
Storages *StorageService
StringComments *StringCommentsService
StringCorrections *StringCorrectionsService
StringTranslations *StringTranslationsService
StyleGuides *StyleGuidesService
Tasks *TasksService
Teams *TeamsService
TranslationMemory *TranslationMemoryService
TranslationStatus *TranslationStatusService
Translations *TranslationsService
Users *UsersService
Vendors *VendorsService
Webhooks *WebhooksService
Workflows *WorkflowsService
// 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.
func (*Client) Post ¶
func (c *Client) Post(ctx context.Context, path string, body, v any, opts ...RequestOption) (*Response, error)
Post makes a POST 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 ClientsService ¶ added in v0.19.0
type ClientsService struct {
// contains filtered or unexported fields
}
ClientsService provides access to the Clients API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Clients
func (*ClientsService) List ¶ added in v0.19.0
func (s *ClientsService) List(ctx context.Context, opts *model.ListOptions) ([]*model.Client, *Response, error)
List returns a list of clients of the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.clients.getMany
type CustomPlaceholdersService ¶ added in v0.19.0
type CustomPlaceholdersService struct {
// contains filtered or unexported fields
}
CustomPlaceholdersService provides access to the Custom Placeholders API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Custom-Placeholders
func (*CustomPlaceholdersService) Add ¶ added in v0.19.0
func (s *CustomPlaceholdersService) Add(ctx context.Context, req *model.CustomPlaceholderAddRequest) ( *model.CustomPlaceholder, *Response, error, )
Add creates a custom placeholder for the organization. Assign it to a project with ProjectPlaceholdersService.Add.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-placeholders.post
func (*CustomPlaceholdersService) Delete ¶ added in v0.19.0
func (s *CustomPlaceholdersService) Delete(ctx context.Context, customPlaceholderID int) (*Response, error)
Delete deletes a custom placeholder of the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-placeholders.delete
func (*CustomPlaceholdersService) Edit ¶ added in v0.19.0
func (s *CustomPlaceholdersService) Edit(ctx context.Context, customPlaceholderID int, req []*model.UpdateRequest) ( *model.CustomPlaceholder, *Response, error, )
Edit updates a custom placeholder of the organization.
Request body:
- op: The operation to perform. Enum: replace, test.
- path: A JSON Pointer as defined in RFC 6901. Enum: "/description", "/definition", "/argumentDelimiter".
- value: The value to be used within the operations. The value must be a string.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-placeholders.patch
func (*CustomPlaceholdersService) Get ¶ added in v0.19.0
func (s *CustomPlaceholdersService) Get(ctx context.Context, customPlaceholderID int) ( *model.CustomPlaceholder, *Response, error, )
Get returns a custom placeholder of the organization by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-placeholders.get
func (*CustomPlaceholdersService) List ¶ added in v0.19.0
func (s *CustomPlaceholdersService) List(ctx context.Context, opts *model.ListOptions) ( []*model.CustomPlaceholder, *Response, error, )
List returns a list of the custom placeholders of the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-placeholders.getMany
type CustomSpellcheckersService ¶ added in v0.19.0
type CustomSpellcheckersService struct {
// contains filtered or unexported fields
}
CustomSpellcheckersService provides access to the Custom Spellcheckers API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Custom-Spellcheckers
func (*CustomSpellcheckersService) Get ¶ added in v0.19.0
func (s *CustomSpellcheckersService) Get(ctx context.Context, customSpellcheckerID int) ( *model.CustomSpellchecker, *Response, error, )
Get returns a custom spellchecker by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-spellcheckers.get
func (*CustomSpellcheckersService) List ¶ added in v0.19.0
func (s *CustomSpellcheckersService) List(ctx context.Context, opts *model.ListOptions) ( []*model.CustomSpellchecker, *Response, error, )
List returns a list of the custom spellcheckers of the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.custom-spellcheckers.getMany
type DictionariesService ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (s *DictionariesService) List(ctx context.Context, projectID int, opts *model.DictionariesListOptions) ( []*model.Dictionary, *Response, error, )
List returns a list of project dictionaries.
https://developer.crowdin.com/api/v2/#operation/api.projects.dictionaries.getMany
type DistributionsService ¶ added in v0.4.0
type DistributionsService struct {
// contains filtered or unexported fields
}
DistributionsService provides access to the Distributions API methods.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Distributions
func (*DistributionsService) Add ¶ added in v0.4.0
func (s *DistributionsService) Add(ctx context.Context, projectID int, req *model.DistributionAddRequest) ( *model.Distribution, *Response, error, )
Add creates a new distribution.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.post
func (*DistributionsService) Delete ¶ added in v0.4.0
func (s *DistributionsService) Delete(ctx context.Context, projectID int, hash string) (*Response, error)
Delete removes a distribution from the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.delete
func (*DistributionsService) Edit ¶ added in v0.4.0
func (s *DistributionsService) Edit(ctx context.Context, projectID int, hash string, req []*model.UpdateRequest) ( *model.Distribution, *Response, error, )
Edit updates a distribution in the project.
Request body:
- Op (string) - Operation to perform. Enum: replace.
- Path (string) - JSON path to the field to update. Enum: "/exportMode", "/name", "/fileIds", "/bundleIds".
- Value (string) - New alue to set.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.patch
func (*DistributionsService) Get ¶ added in v0.4.0
func (s *DistributionsService) Get(ctx context.Context, projectID int, hash string) (*model.Distribution, *Response, error)
Get returns information about a distribution.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.get
func (*DistributionsService) GetRelease ¶ added in v0.4.0
func (s *DistributionsService) GetRelease(ctx context.Context, projectID int, hash string) ( *model.DistributionRelease, *Response, error, )
GetRelease returns information about the distribution release.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.release.get
func (*DistributionsService) List ¶ added in v0.4.0
func (s *DistributionsService) List(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.Distribution, *Response, error, )
List returns a list of distributions in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.getMany
func (*DistributionsService) Release ¶ added in v0.4.0
func (s *DistributionsService) Release(ctx context.Context, projectID int, hash string) ( *model.DistributionRelease, *Response, error, )
Release releases the distribution.
https://developer.crowdin.com/api/v2/#operation/api.projects.distributions.release.post
type ExternalQAChecksService ¶ added in v0.19.0
type ExternalQAChecksService struct {
// contains filtered or unexported fields
}
ExternalQAChecksService provides access to the External QA Checks API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/External-QA-Checks
func (*ExternalQAChecksService) Get ¶ added in v0.19.0
func (s *ExternalQAChecksService) Get(ctx context.Context, externalQACheckID int) ( *model.ExternalQACheck, *Response, error, )
Get returns an external QA check by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.external-qa-checks.get
func (*ExternalQAChecksService) List ¶ added in v0.19.0
func (s *ExternalQAChecksService) List(ctx context.Context, opts *model.ListOptions) ( []*model.ExternalQACheck, *Response, error, )
List returns a list of the external QA checks of the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.external-qa-checks.getMany
type FieldsService ¶ added in v0.4.0
type FieldsService struct {
// contains filtered or unexported fields
}
FieldsService provides access to the Fields API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Fields
func (*FieldsService) Add ¶ added in v0.4.0
func (s *FieldsService) Add(ctx context.Context, req *model.FieldAddRequest) (*model.Field, *Response, error)
Add creates a new field.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.fields.post
func (*FieldsService) Delete ¶ added in v0.4.0
Delete deletes a field.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.fields.delete
func (*FieldsService) Edit ¶ added in v0.4.0
func (s *FieldsService) Edit(ctx context.Context, fieldID int, req []*model.UpdateRequest) (*model.Field, *Response, error)
Edit updates a field.
Request body:
- Op (string): operation to perform. Enum: replace.
- Path (string <json-pointer>): path to the field to update. Enum: "/name", "/description", "/config", "/entities".
- Value (string): new value to set.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.fields.patch
func (*FieldsService) Get ¶ added in v0.4.0
Get returns a field by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.fields.get
func (*FieldsService) List ¶ added in v0.4.0
func (s *FieldsService) List(ctx context.Context, opts *model.FieldsListOptions) ([]*model.Field, *Response, error)
List returns a list of fields.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.fields.getMany
type GlossariesService ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) ConcordanceSearchAll ¶ added in v0.19.0
func (s *GlossariesService) ConcordanceSearchAll(ctx context.Context, req *model.GlossaryConcordanceSearchAllRequest) ( []*model.ConcordanceSearch, *Response, error, )
ConcordanceSearchAll searches for concordance in all glossaries available to the user (organization-level search, not limited to a single project).
Note: The `userId` request field is supported only in Crowdin.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.concordance.post
func (*GlossariesService) DeleteConcept ¶ added in v0.3.0
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 ¶ added in v0.3.0
DeleteGlossary deletes a specific glossary.
https://developer.crowdin.com/api/v2/#operation/api.glossaries.delete
func (*GlossariesService) DeleteTerm ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 GraphQL ¶ added in v0.10.0
type GraphQL struct {
// contains filtered or unexported fields
}
func (*GraphQL) NewRequest ¶ added in v0.10.0
NewRequest creates a new GraphQL request with the given query.
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", "/savingsReportSettingsTemplateId".
- 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.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.groups.getMany
type LabelsService ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
Delete removes a label by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.labels.delete
func (*LabelsService) Edit ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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.
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 ¶ added in v0.3.0
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 and Amazon 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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 NotificationsService ¶ added in v0.5.0
type NotificationsService struct {
// contains filtered or unexported fields
}
NotificationsService provides access to the Notifications API methods.
func (*NotificationsService) Notify ¶ added in v0.5.0
func (s *NotificationsService) Notify(ctx context.Context, req *model.Notification) (*Response, error)
Notify sends a notification to authenticated user or organization members.
To send a notification to an authenticated user, pass the request body with the `Message`. To send a notification to organization members, pass the request body with the `Message` and `UserIDs` or `Role`.
Send a notification to an authenticated user.
&model.Notification{
Message: "notification message",
}
Send a notification to organization members by user IDs (for enterprise client).
&model.Notification{
UserIDs: []int{1, 2, 3},
Message: "notification message",
}
Send a notification to organization members by role (for enterprise client).
&model.Notification{
Role: "owner",
Message: "notification message",
}
https://developer.crowdin.com/enterprise/api/v2/#operation/api.notify.post
func (*NotificationsService) NotifyProjectMembers ¶ added in v0.5.0
func (s *NotificationsService) NotifyProjectMembers(ctx context.Context, projectID int, req *model.Notification) ( *Response, error, )
NotifyProjectMembers sends a notification to project members.
The request body can be either by user IDs or by role. To send by user IDs, pass the request body with the `UserIDs` and `Message`. To send by role, pass the request body with the `Role` and `Message`.
https://developer.crowdin.com/api/v2/#operation/api.projects.notify.post
type OrganizationService ¶ added in v0.19.0
type OrganizationService struct {
// contains filtered or unexported fields
}
OrganizationService provides access to the Organization API.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Organization
func (*OrganizationService) GetAuthSettings ¶ added in v0.19.0
func (s *OrganizationService) GetAuthSettings(ctx context.Context) (*model.OrganizationAuthSettings, *Response, error)
GetAuthSettings returns the authentication settings of the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.organization.auth-settings.get
func (*OrganizationService) GetInfo ¶ added in v0.19.0
func (s *OrganizationService) GetInfo(ctx context.Context) (*model.OrganizationInfo, *Response, error)
GetInfo returns the information about the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.organization.get
type OrganizationWebhooksService ¶ added in v0.4.0
type OrganizationWebhooksService struct {
// contains filtered or unexported fields
}
Webhooks allow to collect information about events that happen in your Crowdin account. It is possible to select request type, content type, and add custom payload, which allows to create integrations with other systems on your own.
Webhooks can be configured for the following events:
- Project is created
- Project is deleted
Use API to create, modify, and delete specific webhooks.
CrowdIn API docs: https://developer.crowdin.com/api/v2/#tag/Organization-Webhooks
func (*OrganizationWebhooksService) Add ¶ added in v0.4.0
func (s *OrganizationWebhooksService) Add(ctx context.Context, projectID int, req *model.WebhookAddRequest) ( *model.Webhook, *Response, error, )
Add creates a new webhook.
https://developer.crowdin.com/api/v2/#operation/api.webhooks.post
func (*OrganizationWebhooksService) Delete ¶ added in v0.4.0
func (s *OrganizationWebhooksService) Delete(ctx context.Context, organizationWebhookID int) (*Response, error)
Delete removes a webhook.
https://developer.crowdin.com/api/v2/#operation/api.webhooks.delete
func (*OrganizationWebhooksService) Edit ¶ added in v0.4.0
func (s *OrganizationWebhooksService) Edit(ctx context.Context, organizationWebhookID int, req []*model.UpdateRequest) ( *model.Webhook, *Response, error, )
Edit modifies a webhook.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string <json-pointer>): a JSON Pointer to the target location. Enum: "/name", "/url", "/isActive", "/batchingEnabled", "/contentType", "/events", "/headers", "/requestType", "/payload".
- Value (any): new value to set.
https://developer.crowdin.com/api/v2/#operation/api.webhooks.patch
func (*OrganizationWebhooksService) Get ¶ added in v0.4.0
func (s *OrganizationWebhooksService) Get(ctx context.Context, organizationWebhookID int) (*model.Webhook, *Response, error)
Get returns a specific webhook for an organization.
https://developer.crowdin.com/api/v2/#operation/api.webhooks.get
func (*OrganizationWebhooksService) List ¶ added in v0.4.0
func (s *OrganizationWebhooksService) List(ctx context.Context, opts *model.ListOptions) ( []*model.Webhook, *Response, error, )
List returns a list of webhooks for an organization.
https://developer.crowdin.com/api/v2/#operation/api.webhooks.getMany
type ProjectPlaceholdersService ¶ added in v0.19.0
type ProjectPlaceholdersService struct {
// contains filtered or unexported fields
}
ProjectPlaceholdersService provides access to the project placeholders (custom placeholders assigned to a project and system placeholders) of the Projects API.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Projects
func (*ProjectPlaceholdersService) Add ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) Add(ctx context.Context, projectID int, req *model.ProjectPlaceholderAddRequest) ( *model.ProjectPlaceholder, *Response, error, )
Add assigns a custom placeholder of the organization to the project.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.placeholders.post
func (*ProjectPlaceholdersService) Delete ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) Delete(ctx context.Context, projectID, projectPlaceholderID int) (*Response, error)
Delete unassigns a custom placeholder from the project. The placeholder itself stays defined for the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.placeholders.delete
func (*ProjectPlaceholdersService) Edit ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) Edit(ctx context.Context, projectID, projectPlaceholderID int, req []*model.UpdateRequest) ( *model.ProjectPlaceholder, *Response, error, )
Edit updates the settings a custom placeholder has in the project. The placeholder definition itself is not edited here.
Request body:
- op: The operation to perform. Enum: replace, test.
- path: A JSON Pointer as defined in RFC 6901. Enum: "/index", "/type", "/isBlocking", "/formats".
- value: The value to be used within the operations.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.placeholders.patch
func (*ProjectPlaceholdersService) Get ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) Get(ctx context.Context, projectID, projectPlaceholderID int) ( *model.ProjectPlaceholder, *Response, error, )
Get returns one custom placeholder assigned to the project, with the settings it has there.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.placeholders.get
func (*ProjectPlaceholdersService) List ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) List(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.ProjectPlaceholder, *Response, error, )
List returns a list of the custom placeholders assigned to the project. The placeholders Crowdin ships are listed by ListSystemPlaceholders.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.placeholders.getMany
func (*ProjectPlaceholdersService) ListSystemPlaceholders ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) ListSystemPlaceholders(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.ProjectSystemPlaceholder, *Response, error, )
ListSystemPlaceholders returns every placeholder Crowdin ships, with the state it has in the project.
https://developer.crowdin.com/api/v2/#operation/api.projects.system-placeholders.getMany
func (*ProjectPlaceholdersService) SystemPlaceholderBatchOperations ¶ added in v0.19.0
func (s *ProjectPlaceholdersService) SystemPlaceholderBatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ( []*model.ProjectSystemPlaceholder, *Response, error, )
SystemPlaceholderBatchOperations turns system placeholders on and off in the project. It returns the placeholders it changed.
Request body:
- op: The operation to perform. Enum: replace, test.
- path: A JSON Pointer as defined in RFC 6901. The first segment is the key of the system placeholder, and "/isEnabled" is the only property it accepts (e.g. "/printfSpecifier/isEnabled").
- value: Whether Crowdin recognizes the placeholder in the project (boolean).
https://developer.crowdin.com/api/v2/#operation/api.projects.system-placeholders.batchPatch
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.
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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) AddUserSettingsTemplate ¶ added in v0.14.0
func (s *ReportsService) AddUserSettingsTemplate(ctx context.Context, userID int, req *model.ReportSettingsTemplateAddRequest) ( *model.ReportSettingsTemplate, *Response, error, )
AddUserSettingsTemplate creates a new user report settings template.
func (*ReportsService) CheckArchiveExportStatus ¶ added in v0.4.0
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
https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.reports.archives.exports.get
func (*ReportsService) CheckGroupReportStatus ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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
https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.reports.archives.delete
func (*ReportsService) DeleteSettingsTemplate ¶ added in v0.4.0
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) DeleteUserSettingsTemplate ¶ added in v0.14.0
func (s *ReportsService) DeleteUserSettingsTemplate(ctx context.Context, userID, settingsTemplateID int) (*Response, error)
DeleteUserSettingsTemplate removes a user report settings template.
func (*ReportsService) Download ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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. Crowdin: "/name", "/currency", "/unit", "/mode", "/config". Enterprise: "/name", "/currency", "/unit", "/config", "/isPublic".
- Value (any): new value to set.
https://developer.crowdin.com/api/v2/#operation/api.projects.reports.settings-templates.patch
func (*ReportsService) EditUserSettingsTemplate ¶ added in v0.14.0
func (s *ReportsService) EditUserSettingsTemplate(ctx context.Context, userID, settingsTemplateID int, req []*model.UpdateRequest) ( *model.ReportSettingsTemplate, *Response, error, )
EditUserSettingsTemplate updates a user report settings template.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string <json-pointer>): path to the field to update. Enum: "/name", "/currency", "/unit", "/config".
- Value (string|int): new value to set.
func (*ReportsService) ExportArchive ¶ added in v0.4.0
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
https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.reports.archives.exports.post
func (*ReportsService) Generate ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (s *ReportsService) GetArchive(ctx context.Context, userID, archiveID int) (*model.ReportArchive, *Response, error)
GetArchive returns 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.get
https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.reports.archives.get
func (*ReportsService) GetSettingsTemplate ¶ added in v0.4.0
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) GetUserSettingsTemplate ¶ added in v0.14.0
func (s *ReportsService) GetUserSettingsTemplate(ctx context.Context, userID, settingsTemplateID int) ( *model.ReportSettingsTemplate, *Response, error, )
GetUserSettingsTemplate returns a user report settings template by its identifier.
func (*ReportsService) ListArchives ¶ added in v0.4.0
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
https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.reports.archives.getMany
func (*ReportsService) ListSettingsTemplates ¶ added in v0.4.0
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
func (*ReportsService) ListUserSettingsTemplates ¶ added in v0.14.0
func (s *ReportsService) ListUserSettingsTemplates(ctx context.Context, userID int, opts *model.ListOptions) ( []*model.ReportSettingsTemplate, *Response, error, )
ListUserSettingsTemplates returns a list of user report settings templates.
type Request ¶ added in v0.10.0
type Request struct {
// contains filtered or unexported fields
}
Request represents a GraphQL request.
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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 SecurityLogsService ¶ added in v0.4.0
type SecurityLogsService struct {
// contains filtered or unexported fields
}
SecurityLogsService provides access to the Security Logs API methods.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Security-Logs
func (*SecurityLogsService) GetOrganizationLog ¶ added in v0.4.0
func (s *SecurityLogsService) GetOrganizationLog(ctx context.Context, logID int) (*model.SecurityLog, *Response, error)
GetOrganizationLog returns a single organization security log by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.security-logs.get
func (*SecurityLogsService) GetUserLog ¶ added in v0.4.0
func (s *SecurityLogsService) GetUserLog(ctx context.Context, userID, logID int) (*model.SecurityLog, *Response, error)
GetUserLog returns a single user security log by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.users.security-logs.get
func (*SecurityLogsService) ListOrganizationLogs ¶ added in v0.4.0
func (s *SecurityLogsService) ListOrganizationLogs(ctx context.Context, opts *model.SecurityLogsListOptions) ( []*model.SecurityLog, *Response, error, )
ListOrganizationLogs returns a list of the organization security logs.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.security-logs.getMany
func (*SecurityLogsService) ListUserLogs ¶ added in v0.4.0
func (s *SecurityLogsService) ListUserLogs(ctx context.Context, userID int, opts *model.SecurityLogsListOptions) ( []*model.SecurityLog, *Response, error, )
ListUserLogs returns a list of the user security logs.
https://developer.crowdin.com/api/v2/#operation/api.users.security-logs.getMany
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) AddAssetReference ¶ added in v0.19.0
func (s *SourceFilesService) AddAssetReference(ctx context.Context, projectID, fileID int, req *model.AssetReferenceAddRequest) ( *model.AssetReference, *Response, error, )
AddAssetReference adds a new reference to an asset file.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.references.post
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) CheckDirectoryDeleteStatus ¶ added in v0.19.0
func (s *SourceFilesService) CheckDirectoryDeleteStatus(ctx context.Context, projectID, directoryID int, jobID string) ( *model.NodeDeleteJob, *Response, error, )
CheckDirectoryDeleteStatus checks the status of an asynchronous directory deletion.
https://developer.crowdin.com/api/v2/#operation/api.projects.directories.jobs.get
func (*SourceFilesService) CheckFileDeleteStatus ¶ added in v0.19.0
func (s *SourceFilesService) CheckFileDeleteStatus(ctx context.Context, projectID, fileID int, jobID string) ( *model.NodeDeleteJob, *Response, error, )
CheckFileDeleteStatus checks the status of an asynchronous file deletion.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.jobs.get
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) DeleteAssetReference ¶ added in v0.19.0
func (s *SourceFilesService) DeleteAssetReference(ctx context.Context, projectID, fileID, referenceID int) (*Response, error)
DeleteAssetReference deletes a reference of an asset file.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.references.delete
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) DeleteDirectoryAsync ¶ added in v0.19.0
func (s *SourceFilesService) DeleteDirectoryAsync(ctx context.Context, projectID, directoryID int) ( *model.NodeDeleteJob, *Response, error, )
DeleteDirectoryAsync deletes a directory in the project asynchronously. It sends the `Prefer: respond-async` header and returns a delete job. Use CheckDirectoryDeleteStatus to poll the status of the job.
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) DeleteFileAsync ¶ added in v0.19.0
func (s *SourceFilesService) DeleteFileAsync(ctx context.Context, projectID, fileID int) (*model.NodeDeleteJob, *Response, error)
DeleteFileAsync deletes a file in the project asynchronously. It sends the `Prefer: respond-async` header and returns a delete job. Use CheckFileDeleteStatus to poll the status of the job.
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) GetAssetReference ¶ added in v0.19.0
func (s *SourceFilesService) GetAssetReference(ctx context.Context, projectID, fileID, referenceID int) ( *model.AssetReference, *Response, error, )
GetAssetReference returns a single reference of an asset file.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.references.get
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) ListAssetReferences ¶ added in v0.19.0
func (s *SourceFilesService) ListAssetReferences(ctx context.Context, projectID, fileID int, opts *model.ListOptions) ( []*model.AssetReference, *Response, error, )
ListAssetReferences returns a list of references of an asset file.
https://developer.crowdin.com/api/v2/#operation/api.projects.files.references.getMany
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.
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.
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) SearchDirectories ¶ added in v0.19.0
func (s *SourceFilesService) SearchDirectories(ctx context.Context, opts *model.DirectoriesSearchOptions) ( []*model.Directory, *Response, error, )
SearchDirectories searches directories by name or title across multiple projects. The `filter` option is required.
https://developer.crowdin.com/api/v2/#operation/api.directories.getMany
func (*SourceFilesService) SearchFiles ¶ added in v0.19.0
func (s *SourceFilesService) SearchFiles(ctx context.Context, opts *model.FilesSearchOptions) ( []*model.File, *Response, error, )
SearchFiles searches files by name or title across multiple projects. The `filter` option is required.
https://developer.crowdin.com/api/v2/#operation/api.files.getMany
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) BatchOperationsWithOptions ¶ added in v0.19.0
func (s *SourceStringsService) BatchOperationsWithOptions(ctx context.Context, projectID int, req []*model.UpdateRequest, opts *model.SourceStringsEditOptions, ) ([]*model.SourceString, *Response, error)
BatchOperationsWithOptions allows performing multiple operations on source strings with additional query parameters (for example, `updateOption`). See BatchOperations for the request body description.
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) EditWithOptions ¶ added in v0.19.0
func (s *SourceStringsService) EditWithOptions(ctx context.Context, projectID, stringID int, req []*model.UpdateRequest, opts *model.SourceStringsEditOptions, ) (*model.SourceString, *Response, error)
EditWithOptions updates a specific string by its identifier with additional query parameters (for example, `updateOption`). See Edit for the request body description.
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) Search ¶ added in v0.19.0
func (s *SourceStringsService) Search(ctx context.Context, opts *model.SourceStringsSearchOptions) ( []*model.SourceString, *Response, error, )
Search searches strings across multiple projects. The `filter` option is required.
https://developer.crowdin.com/api/v2/#operation/api.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 ¶ added in v0.2.0
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 ¶ added in v0.2.0
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) BatchOperations ¶ added in v0.16.0
func (s *StringCommentsService) BatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ( []*model.StringComment, *Response, error, )
String Comment Batch Operations.
Request body:
- op: The operation to perform. Enum: replace, remove, add.
- path: A JSON Pointer as defined by RFC 6901. Enum: "/{commentId}/text", "/{commentId}/issueStatus".
- value: The value to be used within the operations. The value must be string.
func (*StringCommentsService) Delete ¶ added in v0.2.0
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) DeleteAttachment ¶ added in v0.19.0
func (s *StringCommentsService) DeleteAttachment(ctx context.Context, projectID, commentID, attachmentID int) ( *model.StringComment, *Response, error, )
DeleteAttachment removes an attachment from a string comment. It returns the updated string comment.
https://developer.crowdin.com/api/v2/#operation/api.projects.comments.attachments.delete
func (*StringCommentsService) Edit ¶ added in v0.2.0
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 ¶ added in v0.2.0
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.get
func (*StringCommentsService) List ¶ added in v0.2.0
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 StringCorrectionsService ¶ added in v0.19.0
type StringCorrectionsService struct {
// contains filtered or unexported fields
}
StringCorrectionsService provides access to the String Corrections API methods. Corrections allow you to suggest changes to source strings.
Note: Crowdin Enterprise only.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/String-Corrections
func (*StringCorrectionsService) Add ¶ added in v0.19.0
func (s *StringCorrectionsService) Add(ctx context.Context, projectID int, req *model.StringCorrectionAddRequest) ( *model.StringCorrection, *Response, error, )
Add adds a new correction to a string.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.corrections.post
func (*StringCorrectionsService) Delete ¶ added in v0.19.0
func (s *StringCorrectionsService) Delete(ctx context.Context, projectID, correctionID int) (*Response, error)
Delete deletes a string correction by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.corrections.delete
func (*StringCorrectionsService) DeleteMany ¶ added in v0.19.0
func (s *StringCorrectionsService) DeleteMany(ctx context.Context, projectID, stringID int) (*Response, error)
DeleteMany deletes all corrections of a string.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.corrections.deleteMany
func (*StringCorrectionsService) Get ¶ added in v0.19.0
func (s *StringCorrectionsService) Get(ctx context.Context, projectID, correctionID int, opts *model.TranslationGetOptions) ( *model.StringCorrection, *Response, error, )
Get returns a string correction by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.corrections.get
func (*StringCorrectionsService) List ¶ added in v0.19.0
func (s *StringCorrectionsService) List(ctx context.Context, projectID int, opts *model.StringCorrectionsListOptions) ( []*model.StringCorrection, *Response, error, )
List returns a list of corrections of a string. The `StringID` option is required.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.corrections.getMany
func (*StringCorrectionsService) Restore ¶ added in v0.19.0
func (s *StringCorrectionsService) Restore(ctx context.Context, projectID, correctionID int) ( *model.StringCorrection, *Response, error, )
Restore restores a string correction by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.corrections.put
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) AddCorrectionApproval ¶ added in v0.19.0
func (s *StringTranslationsService) AddCorrectionApproval(ctx context.Context, projectID, correctionID int) ( *model.Approval, *Response, error, )
AddCorrectionApproval adds a new approval for a correction. Available only for Crowdin Enterprise projects with advanced workflow.
https://developer.crowdin.com/enterprise/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) ApprovalBatchOperations ¶ added in v0.16.0
func (s *StringTranslationsService) ApprovalBatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ( []*model.Approval, *Response, error, )
Approval Batch Operations
Request body:
- op: The operation to perform. Enum: remove, add.
- path: A JSON Pointer as defined by RFC 6901. Example: "/{approvalId}".
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) RemoveStringApprovals ¶ added in v0.8.0
func (s *StringTranslationsService) RemoveStringApprovals(ctx context.Context, projectID, stringID int) (*Response, error)
RemoveStringApprovals removes translation approvals by its string identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.approvals.deleteMany
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) SearchTranslations ¶ added in v0.19.0
func (s *StringTranslationsService) SearchTranslations(ctx context.Context, opts *model.SearchTranslationsListOptions) ( []*model.SearchTranslation, *Response, error, )
SearchTranslations searches target-language translations by text across projects. The `filter` option is required. Provide up to 50 `projectIds`, or omit them to search all accessible projects. On Crowdin, `userId` can be used to search another owner's accessible projects.
https://developer.crowdin.com/api/v2/#operation/api.translations.getMany
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
func (*StringTranslationsService) TranslationBatchOperations ¶ added in v0.16.0
func (s *StringTranslationsService) TranslationBatchOperations(ctx context.Context, projectID int, req []*model.UpdateRequest) ( []*model.Translation, *Response, error, )
Translation Batch Operations
Request body:
- op: The operation to perform. Enum: remove, add.
- path: A JSON Pointer as defined by RFC 6901. Example: "/{translationId}".
type StyleGuidesService ¶ added in v0.19.0
type StyleGuidesService struct {
// contains filtered or unexported fields
}
StyleGuidesService provides access to the Style Guides API methods. Style guides define rules that translators and AI models follow when translating project content.
Crowdin API docs: https://developer.crowdin.com/api/v2/#tag/Style-Guides
func (*StyleGuidesService) Create ¶ added in v0.19.0
func (s *StyleGuidesService) Create(ctx context.Context, req *model.StyleGuideCreateRequest) ( *model.StyleGuide, *Response, error, )
Create creates a new style guide.
https://developer.crowdin.com/api/v2/#operation/api.style-guides.post
func (*StyleGuidesService) Delete ¶ added in v0.19.0
Delete removes a style guide by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.style-guides.delete
func (*StyleGuidesService) Edit ¶ added in v0.19.0
func (s *StyleGuidesService) Edit(ctx context.Context, styleGuideID int, req []*model.UpdateRequest) ( *model.StyleGuide, *Response, error, )
Edit updates a style guide by its identifier.
Request body: - op - operation to perform. Enum: replace, test. - path (json-pointer) - path to the field to update. Enum: "/name", "/aiInstructions", "/languageIds", "/projectIds", "/isShared", "/storageId", "/groupId" (Enterprise only). - value - new value for the field.
https://developer.crowdin.com/api/v2/#operation/api.style-guides.patch
func (*StyleGuidesService) Get ¶ added in v0.19.0
func (s *StyleGuidesService) Get(ctx context.Context, styleGuideID int) (*model.StyleGuide, *Response, error)
Get returns a style guide by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.style-guides.get
func (*StyleGuidesService) List ¶ added in v0.19.0
func (s *StyleGuidesService) List(ctx context.Context, opts *model.StyleGuidesListOptions) ( []*model.StyleGuide, *Response, error, )
List returns a list of style guides.
https://developer.crowdin.com/api/v2/#operation/api.style-guides.getMany
type TasksService ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (s *TasksService) Add(ctx context.Context, projectID int, req model.TaskAddRequester) (*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) AddComment ¶ added in v0.17.0
func (s *TasksService) AddComment(ctx context.Context, projectID, taskID int, req *model.TaskCommentAddRequest) ( *model.TaskComment, *Response, error, )
AddComment creates a new comment for a specific task in a project.
https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.post
func (*TasksService) AddSettingsTemplate ¶ added in v0.3.0
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 ¶ added in v0.3.0
Delete removes a task from a project by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.projects.tasks.delete
func (*TasksService) DeleteComment ¶ added in v0.17.0
func (s *TasksService) DeleteComment(ctx context.Context, projectID, taskID, commentID int) (*Response, error)
DeleteComment removes a comment from a specific task in a project by its identifier.
https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.delete
func (*TasksService) DeleteSettingsTemplate ¶ added in v0.3.0
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 ¶ added in v0.3.0
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", "/directoryIds", "/branchIds", "/stringIds", "/assignees", "/dateFrom", "/dateTo", "/translationsUpdatedDateFrom", "/translationsUpdatedDateTo", "/labelIds", "/labelMatchRule", "/excludeLabelIds", "/excludeLabelMatchRule", "/skipAssignedStrings", "/resetScope", "/generateCostEstimate", "/generateTranslationCost", "/reportSettingsTemplateId", "/batchId". Enterprise also supports: "/assignedTeams", "/skipAssignedStringsScope", "/fields", "/fields/{fieldSlug}".
- 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", "/status". Enterprise: "/title", "/description", "/fileIds", "/stringIds", "/dateFrom", "/dateTo", "/translationsUpdatedDateFrom", "/translationsUpdatedDateTo", "/deadline", "/startedAt", "/resolvedAt", "/labelIds", "/labelMatchRule", "/excludeLabelIds", "/excludeLabelMatchRule", "/generateCostEstimate", "/generateTranslationCost", "/reportSettingsTemplateId".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
3. InterOrganizationTaskOperation (Enterprise only)
- op (string): Operation to perform. Enum: replace, test.
- path (string <json-pointer>): JSON path to the field to be updated. Enum: "/assignee", "/assignedTeams", "/splitFiles", "/splitContent", "/status", "/generateCostEstimate", "/generateTranslationCost", "/reportSettingsTemplateId".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
4. 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". Enterprise also supports "/assignedTeams".
- value (any): Value to be set. Enum: string, bool, array of integers, array of objects.
5. VendorPendingTaskOperation (Crowdin only)
- 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 ¶ added in v0.3.0
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) EditComment ¶ added in v0.17.0
func (s *TasksService) EditComment(ctx context.Context, projectID, taskID, commentID int, req []*model.UpdateRequest) ( *model.TaskComment, *Response, error, )
EditComment updates a comment for a specific task in a project by its identifier.
https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.patch
func (*TasksService) EditSettingsTemplate ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) GetComment ¶ added in v0.17.0
func (s *TasksService) GetComment(ctx context.Context, projectID, taskID, commentID int) ( *model.TaskComment, *Response, error, )
GetComment returns a single task comment in a project by its identifier.
https://support.crowdin.com/developer/api/v2/#tag/Tasks/operation/api.projects.tasks.comments.get
func (*TasksService) GetSettingsTemplate ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) ListAll ¶ added in v0.19.0
func (s *TasksService) ListAll(ctx context.Context, userID int, opts *model.AllTasksListOptions) ([]*model.Task, *Response, error)
ListAll returns a list of tasks across projects.
For the Crowdin client, it lists all of the user's project tasks (GET /users/{userId}/tasks). For the Enterprise client, set the userID to 0 to list all organization tasks (GET /tasks).
https://support.crowdin.com/developer/api/v2/#operation/api.users.tasks.getMany
https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.tasks.getMany
func (*TasksService) ListComments ¶ added in v0.17.0
func (s *TasksService) ListComments(ctx context.Context, projectID, taskID int, opts *model.ListOptions) ( []*model.TaskComment, *Response, error, )
ListComments returns a list of task comments in a project.
func (*TasksService) ListSettingsTemplates ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 TeamsService ¶ added in v0.4.0
type TeamsService struct {
// contains filtered or unexported fields
}
TeamsService provides access to the organizaion teams API.
CrowdIn API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Teams
func (*TeamsService) Add ¶ added in v0.4.0
func (s *TeamsService) Add(ctx context.Context, req *model.TeamAddRequest) (*model.Team, *Response, error)
Add creates a new team.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.post
func (*TeamsService) AddMember ¶ added in v0.4.0
func (s *TeamsService) AddMember(ctx context.Context, teamID int, req *model.TeamMemberAddRequest) ( map[string][]*model.TeamMember, *Response, error, )
AddMember adds a new member to the team.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.members.post
func (*TeamsService) AddToProject ¶ added in v0.4.0
func (s *TeamsService) AddToProject(ctx context.Context, projectID int, req *model.ProjectTeamAddRequest) ( map[string]*model.ProjectTeam, *Response, error, )
AddToProject adds a team to the project.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.teams.post
func (*TeamsService) Delete ¶ added in v0.4.0
Delete removes a team.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.delete
func (*TeamsService) DeleteMember ¶ added in v0.4.0
DeleteMember removes a member from the team.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.members.delete
func (*TeamsService) DeleteMembers ¶ added in v0.4.0
DeleteMembers deletes all members from the team.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.members.deleteMany
func (*TeamsService) Edit ¶ added in v0.4.0
func (s *TeamsService) Edit(ctx context.Context, teamID int, req []*model.UpdateRequest) (*model.Team, *Response, error)
Edit updates a team.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.patch
func (*TeamsService) EditGroupTeams ¶ added in v0.15.0
func (s *TeamsService) EditGroupTeams(ctx context.Context, groupID int, req []*model.UpdateRequest) ([]*model.GroupsTeam, *Response, error)
EditGroupTeams edit groups of teams.
https://support.crowdin.com/developer/enterprise/api/v2/#tag/Teams/operation/api.groups.teams.patch
func (*TeamsService) EditProjectsPermissions ¶ added in v0.19.0
func (s *TeamsService) EditProjectsPermissions(ctx context.Context, teamID int, req []*model.UpdateRequest) ( []*model.TeamProjectPermissions, *Response, error, )
EditProjectsPermissions updates the team's permissions in projects (batch operations).
Request body:
- op (string): Operation to perform. Enum: add, replace, remove.
- path (string <json-pointer>): Path to the field to update. Enum: "/{projectId}/roles".
- value (array of roles): Roles to set. Required for `add` and `replace` operations.
func (*TeamsService) Get ¶ added in v0.4.0
Get returns a team by its identifier.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.get
func (*TeamsService) GetGroupTeam ¶ added in v0.15.0
func (s *TeamsService) GetGroupTeam(ctx context.Context, groupID, teamID int) (*model.GroupsTeam, *Response, error)
GetGroupTeam returns a group of team by its identifier.
https://support.crowdin.com/developer/enterprise/api/v2/#tag/Teams/operation/api.groups.teams.get
func (*TeamsService) List ¶ added in v0.4.0
func (s *TeamsService) List(ctx context.Context, opts *model.TeamsListOptions) ([]*model.Team, *Response, error)
List returns a list of teams in the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.getMany
func (*TeamsService) ListGroupTeams ¶ added in v0.15.0
func (s *TeamsService) ListGroupTeams(ctx context.Context, groupID int, opts *model.TeamsListOptions) ([]*model.GroupsTeam, *Response, error)
ListGroupTeams returns a list of groups teams.
func (*TeamsService) ListMembers ¶ added in v0.4.0
func (s *TeamsService) ListMembers(ctx context.Context, teamID int, opts *model.ListOptions) ( []*model.TeamMember, *Response, error, )
ListMembers returns a list of team members.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.teams.members.getMany
func (*TeamsService) ListProjectsPermissions ¶ added in v0.19.0
func (s *TeamsService) ListProjectsPermissions(ctx context.Context, teamID int, opts *model.ListOptions) ( []*model.TeamProjectPermissions, *Response, error, )
ListProjectsPermissions returns a list of the team's permissions in projects.
type TranslationMemoryService ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
ClearTM removes all segments from a specific translation memory.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.clear
func (*TranslationMemoryService) ConcordanceSearch ¶ added in v0.3.0
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) ConcordanceSearchAll ¶ added in v0.19.0
func (s *TranslationMemoryService) ConcordanceSearchAll(ctx context.Context, req *model.TMConcordanceSearchAllRequest) ( []*model.TMConcordanceSearch, *Response, error, )
ConcordanceSearchAll searches for concordance in all translation memories available to the user (organization-level search, not limited to a single project).
Note: The `userId` request field is supported only in Crowdin.
https://developer.crowdin.com/api/v2/#operation/api.tms.concordance.post
func (*TranslationMemoryService) CreateTMSegment ¶ added in v0.3.0
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 ¶ added in v0.3.0
DeleteTM removes a specific translation memory by its identifier.
https://developer.crowdin.com/api/v2/#operation/api.tms.delete
func (*TranslationMemoryService) DeleteTMSegment ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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
func (*TranslationMemoryService) TMSegmentBatchOperations ¶ added in v0.19.0
func (s *TranslationMemoryService) TMSegmentBatchOperations(ctx context.Context, tmID int, req []*model.UpdateRequest) ( []*model.TMSegment, *Response, error, )
TMSegmentBatchOperations performs batch operations on translation memory segments and returns the updated segments.
Request body (array of JSON Patch operations):
- op: "add", path: "/-", value: {"records": [{"languageId": "uk", "text": "..."}]} – create a new segment.
- op: "add", path: "/{segmentId}/records/-", value: {"languageId": "it", "text": "..."} – append a record to an existing segment.
- op: "remove", path: "/{segmentId}" – delete a segment.
- op: "remove", path: "/{segmentId}/records/{recordId}" – delete a single record.
- op: "replace", path: "/{segmentId}/records/{recordId}/text", value: "..." – update record text.
https://developer.crowdin.com/api/v2/#operation/api.tms.segments.patchBatch
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) CancelQAChecksRevalidation ¶ added in v0.19.0
func (s *TranslationStatusService) CancelQAChecksRevalidation(ctx context.Context, projectID int, revalidationID string) (*Response, error)
CancelQAChecksRevalidation cancels a QA checks revalidation job.
https://developer.crowdin.com/api/v2/#operation/api.projects.qa-checks.revalidate.delete
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.
https://developer.crowdin.com/api/v2/#operation/api.projects.languages.progress.getMany
func (*TranslationStatusService) GetQAChecksRevalidationStatus ¶ added in v0.19.0
func (s *TranslationStatusService) GetQAChecksRevalidationStatus(ctx context.Context, projectID int, revalidationID string) ( *model.QACheckRevalidation, *Response, error, )
GetQAChecksRevalidationStatus returns the status of a QA checks revalidation job.
https://developer.crowdin.com/api/v2/#operation/api.projects.qa-checks.revalidate.get
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.
https://developer.crowdin.com/api/v2/#operation/api.projects.qa-checks.getMany
func (*TranslationStatusService) RevalidateQAChecks ¶ added in v0.19.0
func (s *TranslationStatusService) RevalidateQAChecks(ctx context.Context, projectID int, req *model.QACheckRevalidationRequest) ( *model.QACheckRevalidation, *Response, error, )
RevalidateQAChecks triggers revalidation of QA checks for the project. It is an asynchronous operation. Use GetQAChecksRevalidationStatus to check the progress.
https://developer.crowdin.com/api/v2/#operation/api.projects.qa-checks.revalidate.post
func (*TranslationStatusService) ValidateQAChecks ¶ added in v0.19.0
func (s *TranslationStatusService) ValidateQAChecks(ctx context.Context, projectID int, req []*model.QACheckValidateRequest) ( []*model.QACheckValidation, *Response, error, )
ValidateQAChecks validates text by QA checks without saving translations. Returns the list of found QA check issues.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.validate-qa-checks.post
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) BatchPreTranslation ¶ added in v0.19.0
func (s *TranslationsService) BatchPreTranslation(ctx context.Context, projectID int, req []*model.UpdateRequest) ( []*model.PreTranslation, *Response, error, )
BatchPreTranslation executes a batch pre-translation operation for the given project
https://developer.crowdin.com/api/v2/#operation/api.projects.pre-translations.patchBatch
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.BuildProjectTranslationRequester) ( *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) EditPreTranslation ¶ added in v0.9.0
func (s *TranslationsService) EditPreTranslation( ctx context.Context, projectID int, preTranslationID string, req []*model.UpdateRequest, ) (*model.PreTranslation, *Response, error)
Edit Pre-Translation updates a specific pre-translation 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.
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) ImportTranslations ¶ added in v0.19.0
func (s *TranslationsService) ImportTranslations(ctx context.Context, projectID int, req *model.TranslationImportRequest) ( *model.TranslationImport, *Response, error, )
ImportTranslations imports translations from a storage into the project. It is an asynchronous operation. Use ImportTranslationsStatus to check the progress.
func (*TranslationsService) ImportTranslationsReport ¶ added in v0.19.0
func (s *TranslationsService) ImportTranslationsReport(ctx context.Context, projectID int, importID string) ( *model.TranslationImportReport, *Response, error, )
ImportTranslationsReport returns the report of a translation import by its identifier.
func (*TranslationsService) ImportTranslationsStatus ¶ added in v0.19.0
func (s *TranslationsService) ImportTranslationsStatus(ctx context.Context, projectID int, importID string) ( *model.TranslationImport, *Response, error, )
ImportTranslationsStatus returns the status of a translation import by its identifier.
func (*TranslationsService) ListPreTranslations ¶ added in v0.9.0
func (s *TranslationsService) ListPreTranslations(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.PreTranslation, *Response, error, )
List Pre-Translations returns a list of pre-translations for a specific project.
func (*TranslationsService) ListPreTranslationsWithOptions ¶ added in v0.19.0
func (s *TranslationsService) ListPreTranslationsWithOptions(ctx context.Context, projectID int, opts *model.PreTranslationsListOptions) ( []*model.PreTranslation, *Response, error, )
ListPreTranslationsWithOptions returns a list of pre-translations for a specific project. Unlike ListPreTranslations, it supports sorting via the `orderBy` query parameter.
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.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.builds.getMany
func (*TranslationsService) PreTranslationReport ¶ added in v0.18.0
func (s *TranslationsService) PreTranslationReport( ctx context.Context, projectID int, preTranslationID string, ) (*model.PreTranslationReport, *Response, error)
PreTranslationReport returns report data for a specific pre-translation.
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
deprecated
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.
Deprecated: use ImportTranslations instead.
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.postOnLanguage
type UsersService ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
Delete removes a user from the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.delete
func (*UsersService) DeleteProjectMember ¶ added in v0.3.0
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 ¶ added in v0.3.0
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", "/avatarStorageId".
- value (string): Value to set.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.patch
func (*UsersService) EditAuthenticated ¶ added in v0.19.0
func (s *UsersService) EditAuthenticated(ctx context.Context, req []*model.UpdateRequest) (*model.User, *Response, error)
EditAuthenticated updates information about the authenticated user.
Request body:
- op (string): Operation to perform. Enum: replace.
- path (string <json-pointer>): Path to the field to update. Enum: "/username", "/fullName", "/timezone", "/avatarStorageId".
- value (string): Value to set.
https://support.crowdin.com/developer/api/v2/#operation/api.user.patch
func (*UsersService) EditManagers ¶ added in v0.15.0
func (s *UsersService) EditManagers(ctx context.Context, groupID int, req []*model.UpdateRequest) ([]*model.Manager, *Response, error)
Update a manager.
func (*UsersService) EditProjectsPermissions ¶ added in v0.19.0
func (s *UsersService) EditProjectsPermissions(ctx context.Context, userID int, req []*model.UpdateRequest) ( []*model.UserProjectPermissions, *Response, error, )
EditProjectsPermissions updates the user's permissions in projects (batch operations).
Request body:
- op (string): Operation to perform. Enum: add, replace, remove.
- path (string <json-pointer>): Path to the field to update. Enum: "/{projectId}/roles".
- value (array of roles): Roles to set. Required for `add` and `replace` operations.
func (*UsersService) Get ¶ added in v0.3.0
Get returns information about a specific user.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.users.getById
func (*UsersService) GetAuthenticated ¶ added in v0.3.0
GetAuthenticated returns information about the authenticated user.
https://developer.crowdin.com/api/v2/#operation/api.user.get
func (*UsersService) GetManager ¶ added in v0.19.0
func (s *UsersService) GetManager(ctx context.Context, groupID, userID int) (*model.Manager, *Response, error)
GetManager returns a group manager by the user identifier.
https://support.crowdin.com/developer/enterprise/api/v2/#tag/Users/operation/api.groups.managers.get
func (*UsersService) GetManagers
deprecated
added in
v0.15.0
func (s *UsersService) GetManagers(ctx context.Context, groupID int) (*model.Manager, *Response, error)
GetManagers returns a manager of the group.
Deprecated: this method requests the managers collection path without a user identifier. Use GetManager instead.
https://support.crowdin.com/developer/enterprise/api/v2/#tag/Users/operation/api.groups.managers.get
func (*UsersService) GetProjectMember ¶ added in v0.3.0
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 ¶ added in v0.3.0
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 ¶ added in v0.3.0
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) ListManagers ¶ added in v0.15.0
func (s *UsersService) ListManagers(ctx context.Context, groupID int, opts *model.ManagerListOptions) ([]*model.Manager, *Response, error)
List returns a list of managers.
func (*UsersService) ListProjectMembers ¶ added in v0.3.0
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) ListProjectsContributions ¶ added in v0.19.0
func (s *UsersService) ListProjectsContributions(ctx context.Context, userID int, opts *model.ListOptions) ( []*model.UserProjectContribution, *Response, error, )
ListProjectsContributions returns a list of the user's contributions in projects.
func (*UsersService) ListProjectsPermissions ¶ added in v0.19.0
func (s *UsersService) ListProjectsPermissions(ctx context.Context, userID int, opts *model.ListOptions) ( []*model.UserProjectPermissions, *Response, error, )
ListProjectsPermissions returns a list of the user's permissions in projects.
func (*UsersService) ReplaceProjectMemberPermissions ¶ added in v0.3.0
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
type VendorsService ¶ added in v0.4.0
type VendorsService struct {
// contains filtered or unexported fields
}
Vendors are the organizations that provide professional translation services. To assign a Vendor to a project workflow you should invite an existing Organization to be a Vendor for you.
Use API to get the list of the Vendors you already invited to your organization.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Vendors
func (*VendorsService) List ¶ added in v0.4.0
func (s *VendorsService) List(ctx context.Context, opt *model.ListOptions) ([]*model.Vendor, *Response, error)
List returns a list of vendors.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.vendors.getMany
type WebhooksService ¶ added in v0.4.0
type WebhooksService struct {
// contains filtered or unexported fields
}
Webhooks allow to collect information about events that happen in your Crowdin projects. It is possible to select request type, content type, and add custom payload, which allows to create integrations with other systems on your own.
Webhooks can be configured for the following events:
- Project file is fully translated
- Project file is fully reviewed
- All strings in project are translated
- All strings in project are reviewed
- Final translation of string is updated (using Replace in suggestions feature)
- Source string is added
- Source string is updated
- Source string is deleted
- Source string is translated
- Translation for source string is updated (using Replace in suggestions feature)
- One of translations is deleted
- Translation for string is approved
- Approval for previously added translation is removed
Use API to create, modify, and delete specific webhooks.
CrowdIn API docs: https://developer.crowdin.com/api/v2/#tag/Webhooks
func (*WebhooksService) Add ¶ added in v0.4.0
func (s *WebhooksService) Add(ctx context.Context, projectID int, req *model.WebhookAddRequest) ( *model.Webhook, *Response, error, )
Add creates a new webhook.
https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.post
func (*WebhooksService) Delete ¶ added in v0.4.0
Delete removes a specific webhook.
https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.delete
func (*WebhooksService) Edit ¶ added in v0.4.0
func (s *WebhooksService) Edit(ctx context.Context, projectID, webhookID int, req []*model.UpdateRequest) ( *model.Webhook, *Response, error, )
Edit modifies a specific webhook.
Request body:
- Op (string): operation to perform. Enum: replace, test.
- Path (string <json-pointer>): a JSON Pointer to the target location. Enum: "/name", "/url", "/isActive", "/batchingEnabled", "/contentType", "/events", "/headers", "/requestType", "/payload".
- Value (any): new value to set.
https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.patch
func (*WebhooksService) Get ¶ added in v0.4.0
func (s *WebhooksService) Get(ctx context.Context, projectID, webhookID int) (*model.Webhook, *Response, error)
Get returns a specific webhook for a project.
https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.get
func (*WebhooksService) List ¶ added in v0.4.0
func (s *WebhooksService) List(ctx context.Context, projectID int, opts *model.ListOptions) ( []*model.Webhook, *Response, error, )
List returns a list of webhooks for a project.
https://developer.crowdin.com/api/v2/#operation/api.projects.webhooks.getMany
type WorkflowsService ¶ added in v0.4.0
type WorkflowsService struct {
// contains filtered or unexported fields
}
Workflows are the sequences of steps that content in your project should go through (e.g. pre-translation, translation, proofreading). You can use a default template or create the one that works best for you and assign it to the needed projects.
Use API to get the list of workflow templates available in your organization and to check the details of a specific template.
Crowdin API docs: https://developer.crowdin.com/enterprise/api/v2/#tag/Workflows
func (*WorkflowsService) GetStep ¶ added in v0.4.0
func (s *WorkflowsService) GetStep(ctx context.Context, projectID, stepID int) (*model.WorkflowStep, *Response, error)
GetStep returns a specific workflow step.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.workflow-steps.get
func (*WorkflowsService) GetTemplate ¶ added in v0.4.0
func (s *WorkflowsService) GetTemplate(ctx context.Context, templateID int) (*model.WorkflowTemplate, *Response, error)
GetTemplate returns a specific workflow template.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.workflow-templates.get
func (*WorkflowsService) ListStepStrings ¶ added in v0.11.0
func (s *WorkflowsService) ListStepStrings(ctx context.Context, projectID, stepID int, opts *model.WorkflowStepStringsListOptions) ( []*model.SourceString, *Response, error, )
ListStepStrings returns a list of strings on the workflow step.
func (*WorkflowsService) ListSteps ¶ added in v0.4.0
func (s *WorkflowsService) ListSteps(ctx context.Context, projectID string) ([]*model.WorkflowStep, *Response, error)
ListSteps returns a list of workflow steps available in the project.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.projects.workflow-steps.getMany
func (*WorkflowsService) ListTemplates ¶ added in v0.4.0
func (s *WorkflowsService) ListTemplates(ctx context.Context, opts *model.WorkflowTemplatesListOptions) ( []*model.WorkflowTemplate, *Response, error, )
ListTemplates returns a list of workflow templates available in the organization.
https://developer.crowdin.com/enterprise/api/v2/#operation/api.workflow-templates.getMany
Source Files
¶
- advisors.go
- ai.go
- applications.go
- branches.go
- bundles.go
- clients.go
- crowdin.go
- custom_placeholders.go
- custom_spellcheckers.go
- dictionaries.go
- distributions.go
- external_qa_checks.go
- fields.go
- glossaries.go
- graphql.go
- groups.go
- labels.go
- languages.go
- machine_translation_engines.go
- notifications.go
- organization.go
- project_placeholders.go
- projects.go
- reports.go
- screenshots.go
- security_logs.go
- source_files.go
- source_strings.go
- storage.go
- string_comments.go
- string_corrections.go
- string_translations.go
- style_guides.go
- tasks.go
- teams.go
- translation_memory.go
- translation_status.go
- translations.go
- users.go
- vendors.go
- webhooks.go
- webhooks_organization.go
- workflows.go