phrase

package module
v1.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 24 Imported by: 0

README

Go API client for phrase

Phrase is a translation management platform for software projects. You can collaborate on language file translation with your team or order translations through our platform. The API allows you to import locale files, download locale files, tag keys or interact in other ways with the localization data stored in Phrase for your account.

Installation

go get github.com/phrase/phrase-go

Getting Started

package main

import (
	"context"
	"fmt"

	phrase "github.com/phrase/phrase-go"
)

func main() {
	auth := context.WithValue(context.Background(), phrase.ContextAPIKey, phrase.APIKey{
		Key:    "YOUR_API_TOKEN",
		Prefix: "token",
	})

	cfg := phrase.NewConfiguration()
	client := phrase.NewAPIClient(cfg)

	var projectsListOpts phrase.ProjectsListOpts

	projects, apiResponse, err := client.ProjectsApi.ProjectsList(auth, &projectsListOpts)
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Printf("%+v\n", projects)
		fmt.Printf("%+v\n", apiResponse) // &{Response:0xc00011ccf0 NextPage:2 FirstPage:1 LastPage:4 Rate:{Limit:1000 Remaining:998 Reset:2020-04-25 00:35:00 +0200 CEST}}
	}
}

Documentation for API Endpoints

All URIs are relative to https://api.phrase.com/v2

Class Method HTTP request Description
AccountsApi AccountShow Get /accounts/{id} Get a single account
AccountsApi AccountsList Get /accounts List accounts
AuthorizationsApi AuthorizationCreate Post /authorizations Create an authorization
AuthorizationsApi AuthorizationDelete Delete /authorizations/{id} Delete an authorization
AuthorizationsApi AuthorizationShow Get /authorizations/{id} Get a single authorization
AuthorizationsApi AuthorizationUpdate Patch /authorizations/{id} Update an authorization
AuthorizationsApi AuthorizationsList Get /authorizations List authorizations
BitbucketSyncApi BitbucketSyncExport Post /bitbucket_syncs/{id}/export Export from Phrase to Bitbucket
BitbucketSyncApi BitbucketSyncImport Post /bitbucket_syncs/{id}/import Import to Phrase from Bitbucket
BitbucketSyncApi BitbucketSyncsList Get /bitbucket_syncs List Bitbucket syncs
BlacklistedKeysApi BlacklistedKeyCreate Post /projects/{project_id}/blacklisted_keys Create a blacklisted key
BlacklistedKeysApi BlacklistedKeyDelete Delete /projects/{project_id}/blacklisted_keys/{id} Delete a blacklisted key
BlacklistedKeysApi BlacklistedKeyShow Get /projects/{project_id}/blacklisted_keys/{id} Get a single blacklisted key
BlacklistedKeysApi BlacklistedKeyUpdate Patch /projects/{project_id}/blacklisted_keys/{id} Update a blacklisted key
BlacklistedKeysApi BlacklistedKeysList Get /projects/{project_id}/blacklisted_keys List blacklisted keys
BranchesApi BranchCompare Get /projects/{project_id}/branches/{name}/compare Compare branches
BranchesApi BranchCreate Post /projects/{project_id}/branches Create a branch
BranchesApi BranchDelete Delete /projects/{project_id}/branches/{name} Delete a branch
BranchesApi BranchMerge Patch /projects/{project_id}/branches/{name}/merge Merge a branch
BranchesApi BranchShow Get /projects/{project_id}/branches/{name} Get a single branch
BranchesApi BranchUpdate Patch /projects/{project_id}/branches/{name} Update a branch
BranchesApi BranchesList Get /projects/{project_id}/branches List branches
CommentsApi CommentCreate Post /projects/{project_id}/keys/{key_id}/comments Create a comment
CommentsApi CommentDelete Delete /projects/{project_id}/keys/{key_id}/comments/{id} Delete a comment
CommentsApi CommentMarkCheck Get /projects/{project_id}/keys/{key_id}/comments/{id}/read Check if comment is read
CommentsApi CommentMarkRead Patch /projects/{project_id}/keys/{key_id}/comments/{id}/read Mark a comment as read
CommentsApi CommentMarkUnread Delete /projects/{project_id}/keys/{key_id}/comments/{id}/read Mark a comment as unread
CommentsApi CommentShow Get /projects/{project_id}/keys/{key_id}/comments/{id} Get a single comment
CommentsApi CommentUpdate Patch /projects/{project_id}/keys/{key_id}/comments/{id} Update a comment
CommentsApi CommentsList Get /projects/{project_id}/keys/{key_id}/comments List comments
DistributionsApi DistributionCreate Post /accounts/{account_id}/distributions Create a distribution
DistributionsApi DistributionDelete Delete /accounts/{account_id}/distributions/{id} Delete a distribution
DistributionsApi DistributionShow Get /accounts/{account_id}/distributions/{id} Get a single distribution
DistributionsApi DistributionUpdate Patch /accounts/{account_id}/distributions/{id} Update a distribution
DistributionsApi DistributionsList Get /accounts/{account_id}/distributions List distributions
DocumentsApi DocumentDelete Delete /projects/{project_id}/documents/{id} Delete document
DocumentsApi DocumentsList Get /projects/{project_id}/documents List documents
FormatsApi FormatsList Get /formats List formats
GitHubSyncApi GithubSyncExport Post /github_syncs/export Export from Phrase to GitHub
GitHubSyncApi GithubSyncImport Post /github_syncs/import Import to Phrase from GitHub
GitLabSyncApi GitlabSyncDelete Delete /gitlab_syncs/{id} Delete single Sync Setting
GitLabSyncApi GitlabSyncExport Post /gitlab_syncs/{gitlab_sync_id}/export Export from Phrase to GitLab
GitLabSyncApi GitlabSyncHistory Get /gitlab_syncs/{gitlab_sync_id}/history History of single Sync Setting
GitLabSyncApi GitlabSyncImport Post /gitlab_syncs/{gitlab_sync_id}/import Import from GitLab to Phrase
GitLabSyncApi GitlabSyncList Get /gitlab_syncs List GitLab syncs
GitLabSyncApi GitlabSyncShow Get /gitlab_syncs/{id} Get single Sync Setting
GitLabSyncApi GitlabSyncUpdate Put /gitlab_syncs/{id} Update single Sync Setting
GlossariesApi GlossariesList Get /accounts/{account_id}/glossaries List glossaries
GlossariesApi GlossaryCreate Post /accounts/{account_id}/glossaries Create a glossary
GlossariesApi GlossaryDelete Delete /accounts/{account_id}/glossaries/{id} Delete a glossary
GlossariesApi GlossaryShow Get /accounts/{account_id}/glossaries/{id} Get a single glossary
GlossariesApi GlossaryUpdate Patch /accounts/{account_id}/glossaries/{id} Update a glossary
GlossaryTermTranslationsApi GlossaryTermTranslationCreate Post /accounts/{account_id}/glossaries/{glossary_id}/terms/{term_id}/translations Create a glossary term translation
GlossaryTermTranslationsApi GlossaryTermTranslationDelete Delete /accounts/{account_id}/glossaries/{glossary_id}/terms/{term_id}/translations/{id} Delete a glossary term translation
GlossaryTermTranslationsApi GlossaryTermTranslationUpdate Patch /accounts/{account_id}/glossaries/{glossary_id}/terms/{term_id}/translations/{id} Update a glossary term translation
GlossaryTermsApi GlossaryTermCreate Post /accounts/{account_id}/glossaries/{glossary_id}/terms Create a glossary term
GlossaryTermsApi GlossaryTermDelete Delete /accounts/{account_id}/glossaries/{glossary_id}/terms/{id} Delete a glossary term
GlossaryTermsApi GlossaryTermShow Get /accounts/{account_id}/glossaries/{glossary_id}/terms/{id} Get a single glossary term
GlossaryTermsApi GlossaryTermUpdate Patch /accounts/{account_id}/glossaries/{glossary_id}/terms/{id} Update a glossary term
GlossaryTermsApi GlossaryTermsList Get /accounts/{account_id}/glossaries/{glossary_id}/terms List glossary terms
InvitationsApi InvitationCreate Post /accounts/{account_id}/invitations Create a new invitation
InvitationsApi InvitationDelete Delete /accounts/{account_id}/invitations/{id} Delete an invitation
InvitationsApi InvitationResend Post /accounts/{account_id}/invitations/{id}/resend Resend an invitation
InvitationsApi InvitationShow Get /accounts/{account_id}/invitations/{id} Get a single invitation
InvitationsApi InvitationUpdate Patch /accounts/{account_id}/invitations/{id} Update an invitation
InvitationsApi InvitationUpdateSettings Patch /projects/{project_id}/invitations/{id} Update a member's invitation access
InvitationsApi InvitationsList Get /accounts/{account_id}/invitations List invitations
JobLocalesApi JobLocaleComplete Post /projects/{project_id}/jobs/{job_id}/locales/{id}/complete Complete a job locale
JobLocalesApi JobLocaleDelete Delete /projects/{project_id}/jobs/{job_id}/locales/{id} Delete a job locale
JobLocalesApi JobLocaleReopen Post /projects/{project_id}/jobs/{job_id}/locales/{id}/reopen Reopen a job locale
JobLocalesApi JobLocaleShow Get /projects/{project_id}/jobs/{job_id}/locale/{id} Get a single job locale
JobLocalesApi JobLocaleUpdate Patch /projects/{project_id}/jobs/{job_id}/locales/{id} Update a job locale
JobLocalesApi JobLocalesCreate Post /projects/{project_id}/jobs/{job_id}/locales Create a job locale
JobLocalesApi JobLocalesList Get /projects/{project_id}/jobs/{job_id}/locales List job locales
JobsApi JobComplete Post /projects/{project_id}/jobs/{id}/complete Complete a job
JobsApi JobCreate Post /projects/{project_id}/jobs Create a job
JobsApi JobDelete Delete /projects/{project_id}/jobs/{id} Delete a job
JobsApi JobKeysCreate Post /projects/{project_id}/jobs/{id}/keys Add keys to job
JobsApi JobKeysDelete Delete /projects/{project_id}/jobs/{id}/keys Remove keys from job
JobsApi JobReopen Post /projects/{project_id}/jobs/{id}/reopen Reopen a job
JobsApi JobShow Get /projects/{project_id}/jobs/{id} Get a single job
JobsApi JobStart Post /projects/{project_id}/jobs/{id}/start Start a job
JobsApi JobUpdate Patch /projects/{project_id}/jobs/{id} Update a job
JobsApi JobsByAccount Get /accounts/{account_id}/jobs List account jobs
JobsApi JobsList Get /projects/{project_id}/jobs List jobs
KeysApi KeyCreate Post /projects/{project_id}/keys Create a key
KeysApi KeyDelete Delete /projects/{project_id}/keys/{id} Delete a key
KeysApi KeyShow Get /projects/{project_id}/keys/{id} Get a single key
KeysApi KeyUpdate Patch /projects/{project_id}/keys/{id} Update a key
KeysApi KeysDeleteCollection Delete /projects/{project_id}/keys Delete collection of keys
KeysApi KeysList Get /projects/{project_id}/keys List keys
KeysApi KeysSearch Post /projects/{project_id}/keys/search Search keys
KeysApi KeysTag Patch /projects/{project_id}/keys/tag Add tags to collection of keys
KeysApi KeysUntag Patch /projects/{project_id}/keys/untag Remove tags from collection of keys
LocalesApi LocaleCreate Post /projects/{project_id}/locales Create a locale
LocalesApi LocaleDelete Delete /projects/{project_id}/locales/{id} Delete a locale
LocalesApi LocaleDownload Get /projects/{project_id}/locales/{id}/download Download a locale
LocalesApi LocaleShow Get /projects/{project_id}/locales/{id} Get a single locale
LocalesApi LocaleUpdate Patch /projects/{project_id}/locales/{id} Update a locale
LocalesApi LocalesList Get /projects/{project_id}/locales List locales
MembersApi MemberDelete Delete /accounts/{account_id}/members/{id} Remove a user from the account
MembersApi MemberShow Get /accounts/{account_id}/members/{id} Get single member
MembersApi MemberUpdate Patch /accounts/{account_id}/members/{id} Update a member
MembersApi MemberUpdateSettings Patch /projects/{project_id}/members/{id} Update a member's project settings
MembersApi MembersList Get /accounts/{account_id}/members List members
OrdersApi OrderConfirm Patch /projects/{project_id}/orders/{id}/confirm Confirm an order
OrdersApi OrderCreate Post /projects/{project_id}/orders Create a new order
OrdersApi OrderDelete Delete /projects/{project_id}/orders/{id} Cancel an order
OrdersApi OrderShow Get /projects/{project_id}/orders/{id} Get a single order
OrdersApi OrdersList Get /projects/{project_id}/orders List orders
ProjectsApi ProjectCreate Post /projects Create a project
ProjectsApi ProjectDelete Delete /projects/{id} Delete a project
ProjectsApi ProjectShow Get /projects/{id} Get a single project
ProjectsApi ProjectUpdate Patch /projects/{id} Update a project
ProjectsApi ProjectsList Get /projects List projects
ReleasesApi ReleaseCreate Post /accounts/{account_id}/distributions/{distribution_id}/releases Create a release
ReleasesApi ReleaseDelete Delete /accounts/{account_id}/distributions/{distribution_id}/releases/{id} Delete a release
ReleasesApi ReleasePublish Post /accounts/{account_id}/distributions/{distribution_id}/releases/{id}/publish Publish a release
ReleasesApi ReleaseShow Get /accounts/{account_id}/distributions/{distribution_id}/releases/{id} Get a single release
ReleasesApi ReleaseUpdate Patch /accounts/{account_id}/distributions/{distribution_id}/releases/{id} Update a release
ReleasesApi ReleasesList Get /accounts/{account_id}/distributions/{distribution_id}/releases List releases
ScreenshotMarkersApi ScreenshotMarkerCreate Post /projects/{project_id}/screenshots/{screenshot_id}/markers Create a screenshot marker
ScreenshotMarkersApi ScreenshotMarkerDelete Delete /projects/{project_id}/screenshots/{screenshot_id}/markers Delete a screenshot marker
ScreenshotMarkersApi ScreenshotMarkerShow Get /projects/{project_id}/screenshots/{screenshot_id}/markers/{id} Get a single screenshot marker
ScreenshotMarkersApi ScreenshotMarkerUpdate Patch /projects/{project_id}/screenshots/{screenshot_id}/markers Update a screenshot marker
ScreenshotMarkersApi ScreenshotMarkersList Get /projects/{project_id}/screenshots/{id}/markers List screenshot markers
ScreenshotsApi ScreenshotCreate Post /projects/{project_id}/screenshots Create a screenshot
ScreenshotsApi ScreenshotDelete Delete /projects/{project_id}/screenshots/{id} Delete a screenshot
ScreenshotsApi ScreenshotShow Get /projects/{project_id}/screenshots/{id} Get a single screenshot
ScreenshotsApi ScreenshotUpdate Patch /projects/{project_id}/screenshots/{id} Update a screenshot
ScreenshotsApi ScreenshotsList Get /projects/{project_id}/screenshots List screenshots
SpacesApi SpaceCreate Post /accounts/{account_id}/spaces Create a Space
SpacesApi SpaceDelete Delete /accounts/{account_id}/spaces/{id} Delete Space
SpacesApi SpaceShow Get /accounts/{account_id}/spaces/{id} Get Space
SpacesApi SpaceUpdate Patch /accounts/{account_id}/spaces/{id} Update Space
SpacesApi SpacesList Get /accounts/{account_id}/spaces List Spaces
SpacesApi SpacesProjectsCreate Post /accounts/{account_id}/spaces/{space_id}/projects Add Project
SpacesApi SpacesProjectsDelete Delete /accounts/{account_id}/spaces/{space_id}/projects/{id} Remove Project
SpacesApi SpacesProjectsList Get /accounts/{account_id}/spaces/{space_id}/projects List Projects
StyleGuidesApi StyleguideCreate Post /projects/{project_id}/styleguides Create a style guide
StyleGuidesApi StyleguideDelete Delete /projects/{project_id}/styleguides/{id} Delete a style guide
StyleGuidesApi StyleguideShow Get /projects/{project_id}/styleguides/{id} Get a single style guide
StyleGuidesApi StyleguideUpdate Patch /projects/{project_id}/styleguides/{id} Update a style guide
StyleGuidesApi StyleguidesList Get /projects/{project_id}/styleguides List style guides
TagsApi TagCreate Post /projects/{project_id}/tags Create a tag
TagsApi TagDelete Delete /projects/{project_id}/tags/{name} Delete a tag
TagsApi TagShow Get /projects/{project_id}/tags/{name} Get a single tag
TagsApi TagsList Get /projects/{project_id}/tags List tags
TeamsApi TeamCreate Post /accounts/{account_id}/teams Create a Team
TeamsApi TeamDelete Delete /accounts/{account_id}/teams/{team_id} Delete Team
TeamsApi TeamShow Get /accounts/{account_id}/teams/{team_id} Get Team
TeamsApi TeamUpdate Patch /accounts/{account_id}/teams/{team_id} Update Team
TeamsApi TeamsList Get /accounts/{account_id}/teams List Teams
TeamsApi TeamsProjectsCreate Post /accounts/{account_id}/teams/{team_id}/projects Add Project
TeamsApi TeamsProjectsDelete Delete /accounts/{account_id}/teams/{team_id}/projects/{id} Remove Project
TeamsApi TeamsSpacesCreate Post /accounts/{account_id}/teams/{team_id}/spaces Add Space
TeamsApi TeamsSpacesDelete Delete /accounts/{account_id}/teams/{team_id}/spaces/{id} Remove Space
TeamsApi TeamsUsersCreate Post /accounts/{account_id}/teams/{team_id}/users Add User
TeamsApi TeamsUsersDelete Delete /accounts/{account_id}/teams/{team_id}/users/{id} Remove User
TranslationsApi TranslationCreate Post /projects/{project_id}/translations Create a translation
TranslationsApi TranslationExclude Patch /projects/{project_id}/translations/{id}/exclude Exclude a translation from export
TranslationsApi TranslationInclude Patch /projects/{project_id}/translations/{id}/include Revoke exclusion of a translation in export
TranslationsApi TranslationReview Patch /projects/{project_id}/translations/{id}/review Review a translation
TranslationsApi TranslationShow Get /projects/{project_id}/translations/{id} Get a single translation
TranslationsApi TranslationUnverify Patch /projects/{project_id}/translations/{id}/unverify Mark a translation as unverified
TranslationsApi TranslationUpdate Patch /projects/{project_id}/translations/{id} Update a translation
TranslationsApi TranslationVerify Patch /projects/{project_id}/translations/{id}/verify Verify a translation
TranslationsApi TranslationsByKey Get /projects/{project_id}/keys/{key_id}/translations List translations by key
TranslationsApi TranslationsByLocale Get /projects/{project_id}/locales/{locale_id}/translations List translations by locale
TranslationsApi TranslationsExcludeCollection Patch /projects/{project_id}/translations/exclude Set exclude from export flag on translations selected by query
TranslationsApi TranslationsIncludeCollection Patch /projects/{project_id}/translations/include Remove exlude from import flag from translations selected by query
TranslationsApi TranslationsList Get /projects/{project_id}/translations List all translations
TranslationsApi TranslationsReviewCollection Patch /projects/{project_id}/translations/review Review translations selected by query
TranslationsApi TranslationsSearch Post /projects/{project_id}/translations/search Search translations
TranslationsApi TranslationsUnverifyCollection Patch /projects/{project_id}/translations/unverify Mark translations selected by query as unverified
TranslationsApi TranslationsVerifyCollection Patch /projects/{project_id}/translations/verify Verify translations selected by query
UploadsApi UploadCreate Post /projects/{project_id}/uploads Upload a new file
UploadsApi UploadShow Get /projects/{project_id}/uploads/{id} View upload details
UploadsApi UploadsList Get /projects/{project_id}/uploads List uploads
UsersApi ShowUser Get /user Show current User
VariablesApi VariableCreate Post /projects/{project_id}/variables Create a variable
VariablesApi VariableDelete Delete /projects/{project_id}/variables/{name} Delete a variable
VariablesApi VariableShow Get /projects/{project_id}/variables/{name} Get a single variable
VariablesApi VariableUpdate Patch /projects/{project_id}/variables/{name} Update a variable
VariablesApi VariablesList Get /projects/{project_id}/variables List variables
VersionsHistoryApi VersionShow Get /projects/{project_id}/translations/{translation_id}/versions/{id} Get a single version
VersionsHistoryApi VersionsList Get /projects/{project_id}/translations/{translation_id}/versions List all versions
WebhooksApi WebhookCreate Post /projects/{project_id}/webhooks Create a webhook
WebhooksApi WebhookDelete Delete /projects/{project_id}/webhooks/{id} Delete a webhook
WebhooksApi WebhookShow Get /projects/{project_id}/webhooks/{id} Get a single webhook
WebhooksApi WebhookTest Post /projects/{project_id}/webhooks/{id}/test Test a webhook
WebhooksApi WebhookUpdate Patch /projects/{project_id}/webhooks/{id} Update a webhook
WebhooksApi WebhooksList Get /projects/{project_id}/webhooks List webhooks

Documentation For Models

More Information

This API client was generated by the OpenAPI Generator project.

  • API version: 2.0.0
  • Package version: 1.0.20
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://developers.phrase.com/api/

Author

support@phrase.com

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

func ClientVersion added in v1.0.6

func ClientVersion() string

func ConvertToStringMap

func ConvertToStringMap(raw map[string]interface{}) (map[string]string, error)

func ParseYAMLToMap

func ParseYAMLToMap(unmarshal func(interface{}) error, keysToField map[string]interface{}) error

Calls the YAML parser function (see yaml.v2/Unmarshaler interface) with a map of string to interface. This map is then iterated to match against the given map of keys to fields, validates the type and sets the fields accordingly.

func ValidateIsBool

func ValidateIsBool(k string, v interface{}) (bool, error)

func ValidateIsInt

func ValidateIsInt(k string, v interface{}) (int, error)

func ValidateIsRawMap

func ValidateIsRawMap(k string, v interface{}) (map[string]interface{}, error)

func ValidateIsString

func ValidateIsString(k string, v interface{}) (string, error)

Types

type APIClient

type APIClient struct {
	AccountsApi *AccountsApiService

	AuthorizationsApi *AuthorizationsApiService

	BitbucketSyncApi *BitbucketSyncApiService

	BlacklistedKeysApi *BlacklistedKeysApiService

	BranchesApi *BranchesApiService

	CommentsApi *CommentsApiService

	DistributionsApi *DistributionsApiService

	DocumentsApi *DocumentsApiService

	FormatsApi *FormatsApiService

	GitHubSyncApi *GitHubSyncApiService

	GitLabSyncApi *GitLabSyncApiService

	GlossariesApi *GlossariesApiService

	GlossaryTermTranslationsApi *GlossaryTermTranslationsApiService

	GlossaryTermsApi *GlossaryTermsApiService

	InvitationsApi *InvitationsApiService

	JobLocalesApi *JobLocalesApiService

	JobsApi *JobsApiService

	KeysApi *KeysApiService

	LocalesApi *LocalesApiService

	MembersApi *MembersApiService

	OrdersApi *OrdersApiService

	ProjectsApi *ProjectsApiService

	ReleasesApi *ReleasesApiService

	ScreenshotMarkersApi *ScreenshotMarkersApiService

	ScreenshotsApi *ScreenshotsApiService

	SpacesApi *SpacesApiService

	StyleGuidesApi *StyleGuidesApiService

	TagsApi *TagsApiService

	TeamsApi *TeamsApiService

	TranslationsApi *TranslationsApiService

	UploadsApi *UploadsApiService

	UsersApi *UsersApiService

	VariablesApi *VariablesApiService

	VersionsHistoryApi *VersionsHistoryApiService

	WebhooksApi *WebhooksApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Phrase API Reference API v2.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response

	// These fields provide the page values for paginating through a set of
	// results. Any or all of these may be set to the zero value for
	// responses that are not part of a paginated set, or for which there
	// are no additional pages.
	//
	// These fields support what is called "offset pagination" and should
	// be used with the ListOptions struct.
	NextPage  int
	FirstPage int
	LastPage  int

	// Explicitly specify the Rate type so Rate's String() receiver doesn't
	// propagate to Response.
	Rate Rate
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

newResponse creates a new Response for the provided http.Response. r must not be nil.

type Account

type Account struct {
	Id        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
	Slug      string    `json:"slug,omitempty"`
	Company   string    `json:"company,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

Account struct for Account

type AccountDetails

type AccountDetails struct {
	Id        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
	Slug      string    `json:"slug,omitempty"`
	Company   string    `json:"company,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

AccountDetails struct for AccountDetails

type AccountDetails1

type AccountDetails1 struct {
	Slug string `json:"slug,omitempty"`
}

AccountDetails1 struct for AccountDetails1

type AccountShowOpts

type AccountShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

AccountShowOpts Optional parameters for the method 'AccountShow'

type AccountsApiService

type AccountsApiService service

AccountsApiService AccountsApi service

func (*AccountsApiService) AccountShow

func (a *AccountsApiService) AccountShow(ctx _context.Context, id string, localVarOptionals *AccountShowOpts) (AccountDetails, *APIResponse, error)

AccountShow Get a single account Get details on a single account.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *AccountShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AccountDetails

func (*AccountsApiService) AccountsList

func (a *AccountsApiService) AccountsList(ctx _context.Context, localVarOptionals *AccountsListOpts) ([]Account, *APIResponse, error)

AccountsList List accounts List all accounts the current user has access to.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *AccountsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Account

type AccountsListOpts

type AccountsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

AccountsListOpts Optional parameters for the method 'AccountsList'

type AffectedCount

type AffectedCount struct {
	RecordsAffected int32 `json:"records_affected,omitempty"`
}

AffectedCount struct for AffectedCount

type AffectedResources

type AffectedResources struct {
	RecordsAffected int32 `json:"records_affected,omitempty"`
}

AffectedResources struct for AffectedResources

type Authorization

type Authorization struct {
	Id             string    `json:"id,omitempty"`
	Note           string    `json:"note,omitempty"`
	TokenLastEight string    `json:"token_last_eight,omitempty"`
	HashedToken    string    `json:"hashed_token,omitempty"`
	Scopes         []string  `json:"scopes,omitempty"`
	ExpiresAt      time.Time `json:"expires_at,omitempty"`
	CreatedAt      time.Time `json:"created_at,omitempty"`
	UpdatedAt      time.Time `json:"updated_at,omitempty"`
}

Authorization struct for Authorization

type AuthorizationCreateOpts

type AuthorizationCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

AuthorizationCreateOpts Optional parameters for the method 'AuthorizationCreate'

type AuthorizationCreateParameters

type AuthorizationCreateParameters struct {
	// A note to help you remember what the access is used for.
	Note string `json:"note,omitempty"`
	// A list of scopes that the access can be used for.
	Scopes []string `json:"scopes,omitempty"`
	// Expiration date for the authorization token. Null means no expiration date (default).
	ExpiresAt time.Time `json:"expires_at,omitempty"`
}

AuthorizationCreateParameters struct for AuthorizationCreateParameters

type AuthorizationDeleteOpts

type AuthorizationDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

AuthorizationDeleteOpts Optional parameters for the method 'AuthorizationDelete'

type AuthorizationShowOpts

type AuthorizationShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

AuthorizationShowOpts Optional parameters for the method 'AuthorizationShow'

type AuthorizationUpdateOpts

type AuthorizationUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

AuthorizationUpdateOpts Optional parameters for the method 'AuthorizationUpdate'

type AuthorizationUpdateParameters

type AuthorizationUpdateParameters struct {
	// A note to help you remember what the access is used for.
	Note string `json:"note,omitempty"`
	// A list of scopes that the access can be used for.
	Scopes []string `json:"scopes,omitempty"`
	// Expiration date for the authorization token. Null means no expiration date (default).
	ExpiresAt time.Time `json:"expires_at,omitempty"`
}

AuthorizationUpdateParameters struct for AuthorizationUpdateParameters

type AuthorizationWithToken

type AuthorizationWithToken struct {
	Id             string    `json:"id,omitempty"`
	Note           string    `json:"note,omitempty"`
	TokenLastEight string    `json:"token_last_eight,omitempty"`
	HashedToken    string    `json:"hashed_token,omitempty"`
	Scopes         []string  `json:"scopes,omitempty"`
	ExpiresAt      time.Time `json:"expires_at,omitempty"`
	CreatedAt      time.Time `json:"created_at,omitempty"`
	UpdatedAt      time.Time `json:"updated_at,omitempty"`
	Token          string    `json:"token,omitempty"`
}

AuthorizationWithToken struct for AuthorizationWithToken

type AuthorizationWithToken1

type AuthorizationWithToken1 struct {
	Token string `json:"token,omitempty"`
}

AuthorizationWithToken1 struct for AuthorizationWithToken1

type AuthorizationsApiService

type AuthorizationsApiService service

AuthorizationsApiService AuthorizationsApi service

func (*AuthorizationsApiService) AuthorizationCreate

func (a *AuthorizationsApiService) AuthorizationCreate(ctx _context.Context, authorizationCreateParameters AuthorizationCreateParameters, localVarOptionals *AuthorizationCreateOpts) (AuthorizationWithToken, *APIResponse, error)

AuthorizationCreate Create an authorization Create a new authorization.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param authorizationCreateParameters
  • @param optional nil or *AuthorizationCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AuthorizationWithToken

func (*AuthorizationsApiService) AuthorizationDelete

func (a *AuthorizationsApiService) AuthorizationDelete(ctx _context.Context, id string, localVarOptionals *AuthorizationDeleteOpts) ([]byte, *APIResponse, error)

AuthorizationDelete Delete an authorization Delete an existing authorization. API calls using that token will stop working.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *AuthorizationDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*AuthorizationsApiService) AuthorizationShow

func (a *AuthorizationsApiService) AuthorizationShow(ctx _context.Context, id string, localVarOptionals *AuthorizationShowOpts) (Authorization, *APIResponse, error)

AuthorizationShow Get a single authorization Get details on a single authorization.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *AuthorizationShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Authorization

func (*AuthorizationsApiService) AuthorizationUpdate

func (a *AuthorizationsApiService) AuthorizationUpdate(ctx _context.Context, id string, authorizationUpdateParameters AuthorizationUpdateParameters, localVarOptionals *AuthorizationUpdateOpts) (Authorization, *APIResponse, error)

AuthorizationUpdate Update an authorization Update an existing authorization.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param authorizationUpdateParameters
  • @param optional nil or *AuthorizationUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Authorization

func (*AuthorizationsApiService) AuthorizationsList

func (a *AuthorizationsApiService) AuthorizationsList(ctx _context.Context, localVarOptionals *AuthorizationsListOpts) ([]Authorization, *APIResponse, error)

AuthorizationsList List authorizations List all your authorizations.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *AuthorizationsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Authorization

type AuthorizationsListOpts

type AuthorizationsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

AuthorizationsListOpts Optional parameters for the method 'AuthorizationsList'

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type BitbucketSync

type BitbucketSync struct {
	Id                        string         `json:"id,omitempty"`
	RepositoryName            string         `json:"repository_name,omitempty"`
	LastExportToBitbucketAt   time.Time      `json:"last_export_to_bitbucket_at,omitempty"`
	LastImportFromBitbucketAt time.Time      `json:"last_import_from_bitbucket_at,omitempty"`
	ValidPhraseappYaml        *bool          `json:"valid_phraseapp_yaml,omitempty"`
	PhraseappProjects         []ProjectShort `json:"phraseapp_projects,omitempty"`
}

BitbucketSync struct for BitbucketSync

type BitbucketSyncApiService

type BitbucketSyncApiService service

BitbucketSyncApiService BitbucketSyncApi service

func (*BitbucketSyncApiService) BitbucketSyncExport

func (a *BitbucketSyncApiService) BitbucketSyncExport(ctx _context.Context, id string, bitbucketSyncExportParameters BitbucketSyncExportParameters, localVarOptionals *BitbucketSyncExportOpts) (BitbucketSyncExportResponse, *APIResponse, error)

BitbucketSyncExport Export from Phrase to Bitbucket Export translations from Phrase to Bitbucket according to the .phraseapp.yml file within the Bitbucket Repository.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param bitbucketSyncExportParameters
  • @param optional nil or *BitbucketSyncExportOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return BitbucketSyncExportResponse

func (*BitbucketSyncApiService) BitbucketSyncImport

func (a *BitbucketSyncApiService) BitbucketSyncImport(ctx _context.Context, id string, bitbucketSyncImportParameters BitbucketSyncImportParameters, localVarOptionals *BitbucketSyncImportOpts) ([]byte, *APIResponse, error)

BitbucketSyncImport Import to Phrase from Bitbucket Import translations from Bitbucket to Phrase according to the .phraseapp.yml file within the Bitbucket repository.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param bitbucketSyncImportParameters
  • @param optional nil or *BitbucketSyncImportOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*BitbucketSyncApiService) BitbucketSyncsList

func (a *BitbucketSyncApiService) BitbucketSyncsList(ctx _context.Context, localVarOptionals *BitbucketSyncsListOpts) ([]BitbucketSync, *APIResponse, error)

BitbucketSyncsList List Bitbucket syncs List all Bitbucket repositories for which synchronisation with Phrase is activated.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *BitbucketSyncsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "AccountId" (optional.String) - Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.

@return []BitbucketSync

type BitbucketSyncExportOpts

type BitbucketSyncExportOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BitbucketSyncExportOpts Optional parameters for the method 'BitbucketSyncExport'

type BitbucketSyncExportParameters

type BitbucketSyncExportParameters struct {
	// Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
	AccountId string `json:"account_id,omitempty"`
}

BitbucketSyncExportParameters struct for BitbucketSyncExportParameters

type BitbucketSyncExportResponse

type BitbucketSyncExportResponse struct {
	StatusPath string `json:"status_path,omitempty"`
}

BitbucketSyncExportResponse struct for BitbucketSyncExportResponse

type BitbucketSyncImportOpts

type BitbucketSyncImportOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BitbucketSyncImportOpts Optional parameters for the method 'BitbucketSyncImport'

type BitbucketSyncImportParameters

type BitbucketSyncImportParameters struct {
	// Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
	AccountId string `json:"account_id,omitempty"`
}

BitbucketSyncImportParameters struct for BitbucketSyncImportParameters

type BitbucketSyncsListOpts

type BitbucketSyncsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	AccountId     optional.String `json:"account_id,omitempty"`
}

BitbucketSyncsListOpts Optional parameters for the method 'BitbucketSyncsList'

type BlacklistedKey

type BlacklistedKey struct {
	Id        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

BlacklistedKey struct for BlacklistedKey

type BlacklistedKeyCreateOpts

type BlacklistedKeyCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BlacklistedKeyCreateOpts Optional parameters for the method 'BlacklistedKeyCreate'

type BlacklistedKeyCreateParameters

type BlacklistedKeyCreateParameters struct {
	// Blacklisted key name
	Name string `json:"name,omitempty"`
}

BlacklistedKeyCreateParameters struct for BlacklistedKeyCreateParameters

type BlacklistedKeyDeleteOpts

type BlacklistedKeyDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BlacklistedKeyDeleteOpts Optional parameters for the method 'BlacklistedKeyDelete'

type BlacklistedKeyShowOpts

type BlacklistedKeyShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BlacklistedKeyShowOpts Optional parameters for the method 'BlacklistedKeyShow'

type BlacklistedKeyUpdateOpts

type BlacklistedKeyUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BlacklistedKeyUpdateOpts Optional parameters for the method 'BlacklistedKeyUpdate'

type BlacklistedKeyUpdateParameters

type BlacklistedKeyUpdateParameters struct {
	// Blacklisted key name
	Name string `json:"name,omitempty"`
}

BlacklistedKeyUpdateParameters struct for BlacklistedKeyUpdateParameters

type BlacklistedKeysApiService

type BlacklistedKeysApiService service

BlacklistedKeysApiService BlacklistedKeysApi service

func (*BlacklistedKeysApiService) BlacklistedKeyCreate

func (a *BlacklistedKeysApiService) BlacklistedKeyCreate(ctx _context.Context, projectId string, blacklistedKeyCreateParameters BlacklistedKeyCreateParameters, localVarOptionals *BlacklistedKeyCreateOpts) (BlacklistedKey, *APIResponse, error)

BlacklistedKeyCreate Create a blacklisted key Create a new rule for blacklisting keys.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param blacklistedKeyCreateParameters
  • @param optional nil or *BlacklistedKeyCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return BlacklistedKey

func (*BlacklistedKeysApiService) BlacklistedKeyDelete

func (a *BlacklistedKeysApiService) BlacklistedKeyDelete(ctx _context.Context, projectId string, id string, localVarOptionals *BlacklistedKeyDeleteOpts) ([]byte, *APIResponse, error)

BlacklistedKeyDelete Delete a blacklisted key Delete an existing rule for blacklisting keys.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *BlacklistedKeyDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*BlacklistedKeysApiService) BlacklistedKeyShow

func (a *BlacklistedKeysApiService) BlacklistedKeyShow(ctx _context.Context, projectId string, id string, localVarOptionals *BlacklistedKeyShowOpts) (BlacklistedKey, *APIResponse, error)

BlacklistedKeyShow Get a single blacklisted key Get details on a single rule for blacklisting keys for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *BlacklistedKeyShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return BlacklistedKey

func (*BlacklistedKeysApiService) BlacklistedKeyUpdate

func (a *BlacklistedKeysApiService) BlacklistedKeyUpdate(ctx _context.Context, projectId string, id string, blacklistedKeyUpdateParameters BlacklistedKeyUpdateParameters, localVarOptionals *BlacklistedKeyUpdateOpts) (BlacklistedKey, *APIResponse, error)

BlacklistedKeyUpdate Update a blacklisted key Update an existing rule for blacklisting keys.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param blacklistedKeyUpdateParameters
  • @param optional nil or *BlacklistedKeyUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return BlacklistedKey

func (*BlacklistedKeysApiService) BlacklistedKeysList

func (a *BlacklistedKeysApiService) BlacklistedKeysList(ctx _context.Context, projectId string, localVarOptionals *BlacklistedKeysListOpts) ([]BlacklistedKey, *APIResponse, error)

BlacklistedKeysList List blacklisted keys List all rules for blacklisting keys for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *BlacklistedKeysListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []BlacklistedKey

type BlacklistedKeysListOpts

type BlacklistedKeysListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

BlacklistedKeysListOpts Optional parameters for the method 'BlacklistedKeysList'

type Branch

type Branch struct {
	Name      string      `json:"name,omitempty"`
	CreatedAt time.Time   `json:"created_at,omitempty"`
	UpdatedAt time.Time   `json:"updated_at,omitempty"`
	MergedAt  time.Time   `json:"merged_at,omitempty"`
	MergedBy  UserPreview `json:"merged_by,omitempty"`
	CreatedBy UserPreview `json:"created_by,omitempty"`
	State     string      `json:"state,omitempty"`
}

Branch struct for Branch

type BranchCompareOpts

type BranchCompareOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BranchCompareOpts Optional parameters for the method 'BranchCompare'

type BranchCreateOpts

type BranchCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BranchCreateOpts Optional parameters for the method 'BranchCreate'

type BranchCreateParameters

type BranchCreateParameters struct {
	// Name of the branch
	Name string `json:"name,omitempty"`
}

BranchCreateParameters struct for BranchCreateParameters

type BranchDeleteOpts

type BranchDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BranchDeleteOpts Optional parameters for the method 'BranchDelete'

type BranchMergeOpts

type BranchMergeOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BranchMergeOpts Optional parameters for the method 'BranchMerge'

type BranchMergeParameters

type BranchMergeParameters struct {
	// strategy used for merge blocking, use_master or use_branch
	Strategy string `json:"strategy,omitempty"`
}

BranchMergeParameters struct for BranchMergeParameters

type BranchName added in v1.0.14

type BranchName struct {
	Name string `json:"name,omitempty"`
}

BranchName struct for BranchName

type BranchShowOpts

type BranchShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BranchShowOpts Optional parameters for the method 'BranchShow'

type BranchUpdateOpts

type BranchUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

BranchUpdateOpts Optional parameters for the method 'BranchUpdate'

type BranchUpdateParameters

type BranchUpdateParameters struct {
	// Name of the branch
	Name string `json:"name,omitempty"`
}

BranchUpdateParameters struct for BranchUpdateParameters

type BranchesApiService

type BranchesApiService service

BranchesApiService BranchesApi service

func (*BranchesApiService) BranchCompare

func (a *BranchesApiService) BranchCompare(ctx _context.Context, projectId string, name string, localVarOptionals *BranchCompareOpts) ([]byte, *APIResponse, error)

BranchCompare Compare branches Compare branch with main branch.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *BranchCompareOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*BranchesApiService) BranchCreate

func (a *BranchesApiService) BranchCreate(ctx _context.Context, projectId string, branchCreateParameters BranchCreateParameters, localVarOptionals *BranchCreateOpts) (Branch, *APIResponse, error)

BranchCreate Create a branch Create a new branch.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param branchCreateParameters
  • @param optional nil or *BranchCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Branch

func (*BranchesApiService) BranchDelete

func (a *BranchesApiService) BranchDelete(ctx _context.Context, projectId string, name string, localVarOptionals *BranchDeleteOpts) ([]byte, *APIResponse, error)

BranchDelete Delete a branch Delete an existing branch.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *BranchDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*BranchesApiService) BranchMerge

func (a *BranchesApiService) BranchMerge(ctx _context.Context, projectId string, name string, branchMergeParameters BranchMergeParameters, localVarOptionals *BranchMergeOpts) ([]byte, *APIResponse, error)

BranchMerge Merge a branch Merge an existing branch.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param branchMergeParameters
  • @param optional nil or *BranchMergeOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*BranchesApiService) BranchShow

func (a *BranchesApiService) BranchShow(ctx _context.Context, projectId string, name string, localVarOptionals *BranchShowOpts) (Branch, *APIResponse, error)

BranchShow Get a single branch Get details on a single branch for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *BranchShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Branch

func (*BranchesApiService) BranchUpdate

func (a *BranchesApiService) BranchUpdate(ctx _context.Context, projectId string, name string, branchUpdateParameters BranchUpdateParameters, localVarOptionals *BranchUpdateOpts) (Branch, *APIResponse, error)

BranchUpdate Update a branch Update an existing branch.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param branchUpdateParameters
  • @param optional nil or *BranchUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Branch

func (*BranchesApiService) BranchesList

func (a *BranchesApiService) BranchesList(ctx _context.Context, projectId string, localVarOptionals *BranchesListOpts) ([]Branch, *APIResponse, error)

BranchesList List branches List all branches the of the current project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *BranchesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Branch

type BranchesListOpts

type BranchesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

BranchesListOpts Optional parameters for the method 'BranchesList'

type Comment

type Comment struct {
	Id        string      `json:"id,omitempty"`
	Message   string      `json:"message,omitempty"`
	User      UserPreview `json:"user,omitempty"`
	CreatedAt time.Time   `json:"created_at,omitempty"`
	UpdatedAt time.Time   `json:"updated_at,omitempty"`
}

Comment struct for Comment

type CommentCreateOpts

type CommentCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

CommentCreateOpts Optional parameters for the method 'CommentCreate'

type CommentCreateParameters

type CommentCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Comment message
	Message string `json:"message,omitempty"`
}

CommentCreateParameters struct for CommentCreateParameters

type CommentDeleteOpts

type CommentDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

CommentDeleteOpts Optional parameters for the method 'CommentDelete'

type CommentMarkCheckOpts

type CommentMarkCheckOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

CommentMarkCheckOpts Optional parameters for the method 'CommentMarkCheck'

type CommentMarkReadOpts

type CommentMarkReadOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

CommentMarkReadOpts Optional parameters for the method 'CommentMarkRead'

type CommentMarkReadParameters

type CommentMarkReadParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

CommentMarkReadParameters struct for CommentMarkReadParameters

type CommentMarkUnreadOpts

type CommentMarkUnreadOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

CommentMarkUnreadOpts Optional parameters for the method 'CommentMarkUnread'

type CommentShowOpts

type CommentShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

CommentShowOpts Optional parameters for the method 'CommentShow'

type CommentUpdateOpts

type CommentUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

CommentUpdateOpts Optional parameters for the method 'CommentUpdate'

type CommentUpdateParameters

type CommentUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Comment message
	Message string `json:"message,omitempty"`
}

CommentUpdateParameters struct for CommentUpdateParameters

type CommentsApiService

type CommentsApiService service

CommentsApiService CommentsApi service

func (*CommentsApiService) CommentCreate

func (a *CommentsApiService) CommentCreate(ctx _context.Context, projectId string, keyId string, commentCreateParameters CommentCreateParameters, localVarOptionals *CommentCreateOpts) (Comment, *APIResponse, error)

CommentCreate Create a comment Create a new comment for a key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param commentCreateParameters
  • @param optional nil or *CommentCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Comment

func (*CommentsApiService) CommentDelete

func (a *CommentsApiService) CommentDelete(ctx _context.Context, projectId string, keyId string, id string, localVarOptionals *CommentDeleteOpts) ([]byte, *APIResponse, error)

CommentDelete Delete a comment Delete an existing comment.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param id ID
  • @param optional nil or *CommentDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*CommentsApiService) CommentMarkCheck

func (a *CommentsApiService) CommentMarkCheck(ctx _context.Context, projectId string, keyId string, id string, localVarOptionals *CommentMarkCheckOpts) ([]byte, *APIResponse, error)

CommentMarkCheck Check if comment is read Check if comment was marked as read. Returns 204 if read, 404 if unread.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param id ID
  • @param optional nil or *CommentMarkCheckOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*CommentsApiService) CommentMarkRead

func (a *CommentsApiService) CommentMarkRead(ctx _context.Context, projectId string, keyId string, id string, commentMarkReadParameters CommentMarkReadParameters, localVarOptionals *CommentMarkReadOpts) ([]byte, *APIResponse, error)

CommentMarkRead Mark a comment as read Mark a comment as read.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param id ID
  • @param commentMarkReadParameters
  • @param optional nil or *CommentMarkReadOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*CommentsApiService) CommentMarkUnread

func (a *CommentsApiService) CommentMarkUnread(ctx _context.Context, projectId string, keyId string, id string, localVarOptionals *CommentMarkUnreadOpts) ([]byte, *APIResponse, error)

CommentMarkUnread Mark a comment as unread Mark a comment as unread.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param id ID
  • @param optional nil or *CommentMarkUnreadOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*CommentsApiService) CommentShow

func (a *CommentsApiService) CommentShow(ctx _context.Context, projectId string, keyId string, id string, localVarOptionals *CommentShowOpts) (Comment, *APIResponse, error)

CommentShow Get a single comment Get details on a single comment.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param id ID
  • @param optional nil or *CommentShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return Comment

func (*CommentsApiService) CommentUpdate

func (a *CommentsApiService) CommentUpdate(ctx _context.Context, projectId string, keyId string, id string, commentUpdateParameters CommentUpdateParameters, localVarOptionals *CommentUpdateOpts) (Comment, *APIResponse, error)

CommentUpdate Update a comment Update an existing comment.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param id ID
  • @param commentUpdateParameters
  • @param optional nil or *CommentUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Comment

func (*CommentsApiService) CommentsList

func (a *CommentsApiService) CommentsList(ctx _context.Context, projectId string, keyId string, localVarOptionals *CommentsListOpts) ([]Comment, *APIResponse, error)

CommentsList List comments List all comments for a key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param optional nil or *CommentsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []Comment

type CommentsListOpts

type CommentsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

CommentsListOpts Optional parameters for the method 'CommentsList'

type Config

type Config struct {
	Credentials
	Debug bool

	Page    *int
	PerPage *int

	DefaultProjectID  string
	DefaultFileFormat string

	Defaults map[string]map[string]interface{}

	Targets []byte
	Sources []byte

	UserAgent string
}

Config contains all information from a .phraseapp.yml config file

func ReadConfig

func ReadConfig(cfgFilePath string) (*Config, error)

ReadConfig reads a .phrase.yml config file

func (*Config) UnmarshalYAML

func (cfg *Config) UnmarshalYAML(unmarshal func(i interface{}) error) error

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	Servers       []ServerConfiguration
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

func (*Configuration) ServerUrl

func (c *Configuration) ServerUrl(index int, variables map[string]string) (string, error)

ServerUrl returns URL based on server settings

func (*Configuration) SetUserAgent added in v1.0.8

func (c *Configuration) SetUserAgent(additionalUserAgent string)

type Credentials

type Credentials struct {
	Username string
	Token    string
	TFA      bool
	TFAToken string
	Host     string
}

Credentials contains all information to authenticate against phrase.com or a custom host.

type CurrentUser added in v1.0.19

type CurrentUser struct {
	Id        string    `json:"id,omitempty"`
	Username  string    `json:"username,omitempty"`
	Name      string    `json:"name,omitempty"`
	Email     string    `json:"email,omitempty"`
	Position  string    `json:"position,omitempty"`
	Language  string    `json:"language,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

CurrentUser struct for CurrentUser

type Distribution

type Distribution struct {
	Id        string           `json:"id,omitempty"`
	Name      string           `json:"name,omitempty"`
	Project   ProjectShort     `json:"project,omitempty"`
	Platforms []string         `json:"platforms,omitempty"`
	Releases  []ReleasePreview `json:"releases,omitempty"`
	CreatedAt time.Time        `json:"created_at,omitempty"`
	DeletedAt time.Time        `json:"deleted_at,omitempty"`
}

Distribution struct for Distribution

type DistributionCreateOpts

type DistributionCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

DistributionCreateOpts Optional parameters for the method 'DistributionCreate'

type DistributionCreateParameters

type DistributionCreateParameters struct {
	// Name of the distribution
	Name string `json:"name,omitempty"`
	// Project id the distribution should be assigned to.
	ProjectId string `json:"project_id,omitempty"`
	// List of platforms the distribution should support.
	Platforms []string `json:"platforms,omitempty"`
	// Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
	FormatOptions map[string]string `json:"format_options,omitempty"`
	// Indicates whether to fallback to non regional locale when locale can not be found
	FallbackToNonRegionalLocale *bool `json:"fallback_to_non_regional_locale,omitempty"`
	// Indicates whether to fallback to projects default locale when locale can not be found
	FallbackToDefaultLocale *bool `json:"fallback_to_default_locale,omitempty"`
	// Use last reviewed instead of latest translation in a project
	UseLastReviewedVersion *bool `json:"use_last_reviewed_version,omitempty"`
}

DistributionCreateParameters struct for DistributionCreateParameters

type DistributionDeleteOpts

type DistributionDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

DistributionDeleteOpts Optional parameters for the method 'DistributionDelete'

type DistributionPreview

type DistributionPreview struct {
	Id           string       `json:"id,omitempty"`
	Name         string       `json:"name,omitempty"`
	Project      ProjectShort `json:"project,omitempty"`
	Platforms    []string     `json:"platforms,omitempty"`
	ReleaseCount int32        `json:"release_count,omitempty"`
	CreatedAt    time.Time    `json:"created_at,omitempty"`
	DeletedAt    time.Time    `json:"deleted_at,omitempty"`
}

DistributionPreview struct for DistributionPreview

type DistributionShowOpts

type DistributionShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

DistributionShowOpts Optional parameters for the method 'DistributionShow'

type DistributionUpdateOpts

type DistributionUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

DistributionUpdateOpts Optional parameters for the method 'DistributionUpdate'

type DistributionUpdateParameters

type DistributionUpdateParameters struct {
	// Name of the distribution
	Name string `json:"name,omitempty"`
	// Project id the distribution should be assigned to.
	ProjectId string `json:"project_id,omitempty"`
	// List of platforms the distribution should support.
	Platforms []string `json:"platforms,omitempty"`
	// Additional formatting and render options. Only <code>enclose_in_cdata</code> is available for platform <code>android</code>.
	FormatOptions map[string]string `json:"format_options,omitempty"`
	// Indicates whether to fallback to non regional locale when locale can not be found
	FallbackToNonRegionalLocale *bool `json:"fallback_to_non_regional_locale,omitempty"`
	// Indicates whether to fallback to projects default locale when locale can not be found
	FallbackToDefaultLocale *bool `json:"fallback_to_default_locale,omitempty"`
	// Use last reviewed instead of latest translation in a project
	UseLastReviewedVersion *bool `json:"use_last_reviewed_version,omitempty"`
}

DistributionUpdateParameters struct for DistributionUpdateParameters

type DistributionsApiService

type DistributionsApiService service

DistributionsApiService DistributionsApi service

func (*DistributionsApiService) DistributionCreate

func (a *DistributionsApiService) DistributionCreate(ctx _context.Context, accountId string, distributionCreateParameters DistributionCreateParameters, localVarOptionals *DistributionCreateOpts) (Distribution, *APIResponse, error)

DistributionCreate Create a distribution Create a new distribution.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionCreateParameters
  • @param optional nil or *DistributionCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Distribution

func (*DistributionsApiService) DistributionDelete

func (a *DistributionsApiService) DistributionDelete(ctx _context.Context, accountId string, id string, localVarOptionals *DistributionDeleteOpts) ([]byte, *APIResponse, error)

DistributionDelete Delete a distribution Delete an existing distribution.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *DistributionDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*DistributionsApiService) DistributionShow

func (a *DistributionsApiService) DistributionShow(ctx _context.Context, accountId string, id string, localVarOptionals *DistributionShowOpts) (Distribution, *APIResponse, error)

DistributionShow Get a single distribution Get details on a single distribution.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *DistributionShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Distribution

func (*DistributionsApiService) DistributionUpdate

func (a *DistributionsApiService) DistributionUpdate(ctx _context.Context, accountId string, id string, distributionUpdateParameters DistributionUpdateParameters, localVarOptionals *DistributionUpdateOpts) (Distribution, *APIResponse, error)

DistributionUpdate Update a distribution Update an existing distribution.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param distributionUpdateParameters
  • @param optional nil or *DistributionUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Distribution

func (*DistributionsApiService) DistributionsList

func (a *DistributionsApiService) DistributionsList(ctx _context.Context, accountId string, localVarOptionals *DistributionsListOpts) ([]DistributionPreview, *APIResponse, error)

DistributionsList List distributions List all distributions for the given account.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *DistributionsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []DistributionPreview

type DistributionsListOpts

type DistributionsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

DistributionsListOpts Optional parameters for the method 'DistributionsList'

type Document added in v1.0.11

type Document struct {
	Id        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

Document struct for Document

type DocumentDeleteOpts added in v1.0.11

type DocumentDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

DocumentDeleteOpts Optional parameters for the method 'DocumentDelete'

type DocumentsApiService added in v1.0.11

type DocumentsApiService service

DocumentsApiService DocumentsApi service

func (*DocumentsApiService) DocumentDelete added in v1.0.11

func (a *DocumentsApiService) DocumentDelete(ctx _context.Context, projectId string, id string, localVarOptionals *DocumentDeleteOpts) ([]byte, *APIResponse, error)

DocumentDelete Delete document Delete an existing document.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *DocumentDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*DocumentsApiService) DocumentsList added in v1.0.11

func (a *DocumentsApiService) DocumentsList(ctx _context.Context, projectId string, localVarOptionals *DocumentsListOpts) ([]Document, *APIResponse, error)

DocumentsList List documents List all documents the current user has access to.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *DocumentsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Document

type DocumentsListOpts added in v1.0.11

type DocumentsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

DocumentsListOpts Optional parameters for the method 'DocumentsList'

type Format

type Format struct {
	Name                      string `json:"name,omitempty"`
	ApiName                   string `json:"api_name,omitempty"`
	Description               string `json:"description,omitempty"`
	Extension                 string `json:"extension,omitempty"`
	DefaultEncoding           string `json:"default_encoding,omitempty"`
	Importable                *bool  `json:"importable,omitempty"`
	Exportable                *bool  `json:"exportable,omitempty"`
	DefaultFile               string `json:"default_file,omitempty"`
	RendersDefaultLocale      *bool  `json:"renders_default_locale,omitempty"`
	IncludesLocaleInformation *bool  `json:"includes_locale_information,omitempty"`
}

Format struct for Format

type FormatsApiService

type FormatsApiService service

FormatsApiService FormatsApi service

func (*FormatsApiService) FormatsList

func (a *FormatsApiService) FormatsList(ctx _context.Context, localVarOptionals *FormatsListOpts) ([]Format, *APIResponse, error)

FormatsList List formats Get a handy list of all localization file formats supported in Phrase.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *FormatsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return []Format

type FormatsListOpts

type FormatsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

FormatsListOpts Optional parameters for the method 'FormatsList'

type GenericOpenAPIError

type GenericOpenAPIError struct {
	// contains filtered or unexported fields
}

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GitHubSyncApiService added in v1.0.11

type GitHubSyncApiService service

GitHubSyncApiService GitHubSyncApi service

func (*GitHubSyncApiService) GithubSyncExport added in v1.0.11

func (a *GitHubSyncApiService) GithubSyncExport(ctx _context.Context, githubSyncExportParameters GithubSyncExportParameters, localVarOptionals *GithubSyncExportOpts) ([]byte, *APIResponse, error)

GithubSyncExport Export from Phrase to GitHub Export translations from Phrase to GitHub according to the .phraseapp.yml file within the GitHub repository.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param githubSyncExportParameters
  • @param optional nil or *GithubSyncExportOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*GitHubSyncApiService) GithubSyncImport added in v1.0.11

func (a *GitHubSyncApiService) GithubSyncImport(ctx _context.Context, githubSyncImportParameters GithubSyncImportParameters, localVarOptionals *GithubSyncImportOpts) ([]byte, *APIResponse, error)

GithubSyncImport Import to Phrase from GitHub Import files to Phrase from your connected GitHub repository.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param githubSyncImportParameters
  • @param optional nil or *GithubSyncImportOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

type GitLabSyncApiService

type GitLabSyncApiService service

GitLabSyncApiService GitLabSyncApi service

func (*GitLabSyncApiService) GitlabSyncDelete

func (a *GitLabSyncApiService) GitlabSyncDelete(ctx _context.Context, id string, localVarOptionals *GitlabSyncDeleteOpts) ([]byte, *APIResponse, error)

GitlabSyncDelete Delete single Sync Setting Deletes a single GitLab Sync Setting.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *GitlabSyncDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "AccountId" (optional.String) - Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.

func (*GitLabSyncApiService) GitlabSyncExport

func (a *GitLabSyncApiService) GitlabSyncExport(ctx _context.Context, gitlabSyncId string, gitlabSyncExportParameters GitlabSyncExportParameters, localVarOptionals *GitlabSyncExportOpts) (GitlabSyncExport, *APIResponse, error)

GitlabSyncExport Export from Phrase to GitLab Export translations from Phrase to GitLab according to the .phraseapp.yml file within the GitLab repository.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param gitlabSyncId Gitlab Sync ID
  • @param gitlabSyncExportParameters
  • @param optional nil or *GitlabSyncExportOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return GitlabSyncExport

func (*GitLabSyncApiService) GitlabSyncHistory

func (a *GitLabSyncApiService) GitlabSyncHistory(ctx _context.Context, gitlabSyncId string, localVarOptionals *GitlabSyncHistoryOpts) ([]GitlabSyncHistory, *APIResponse, error)

GitlabSyncHistory History of single Sync Setting List history for a single Sync Setting.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param gitlabSyncId Gitlab Sync ID
  • @param optional nil or *GitlabSyncHistoryOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "AccountId" (optional.String) - Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.

@return []GitlabSyncHistory

func (*GitLabSyncApiService) GitlabSyncImport

func (a *GitLabSyncApiService) GitlabSyncImport(ctx _context.Context, gitlabSyncId string, gitlabSyncImportParameters GitlabSyncImportParameters, localVarOptionals *GitlabSyncImportOpts) ([]Upload, *APIResponse, error)

GitlabSyncImport Import from GitLab to Phrase Import translations from GitLab to Phrase according to the .phraseapp.yml file within the GitLab repository.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param gitlabSyncId Gitlab Sync ID
  • @param gitlabSyncImportParameters
  • @param optional nil or *GitlabSyncImportOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return []Upload

func (*GitLabSyncApiService) GitlabSyncList

func (a *GitLabSyncApiService) GitlabSyncList(ctx _context.Context, localVarOptionals *GitlabSyncListOpts) ([]GitlabSync, *APIResponse, error)

GitlabSyncList List GitLab syncs List all GitLab Sync Settings for which synchronisation with Phrase and GitLab is activated.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *GitlabSyncListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "AccountId" (optional.String) - Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.

@return []GitlabSync

func (*GitLabSyncApiService) GitlabSyncShow

func (a *GitLabSyncApiService) GitlabSyncShow(ctx _context.Context, id string, localVarOptionals *GitlabSyncShowOpts) (GitlabSync, *APIResponse, error)

GitlabSyncShow Get single Sync Setting Shows a single GitLab Sync Setting.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *GitlabSyncShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "AccountId" (optional.String) - Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.

@return GitlabSync

func (*GitLabSyncApiService) GitlabSyncUpdate

func (a *GitLabSyncApiService) GitlabSyncUpdate(ctx _context.Context, id string, localVarOptionals *GitlabSyncUpdateOpts) (GitlabSync, *APIResponse, error)

GitlabSyncUpdate Update single Sync Setting Updates a single GitLab Sync Setting.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *GitlabSyncUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "AccountId" (optional.String) - Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
  • @param "PhraseProjectCode" (optional.String) - Code of the related Phrase Project.
  • @param "GitlabProjectId" (optional.Int32) - ID of the related GitLab Project.
  • @param "GitlabBranchName" (optional.String) - Name of the GitLab Branch.

@return GitlabSync

type GithubSyncExportOpts added in v1.0.11

type GithubSyncExportOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GithubSyncExportOpts Optional parameters for the method 'GithubSyncExport'

type GithubSyncExportParameters added in v1.0.11

type GithubSyncExportParameters struct {
	// Project ID to specify the actual project the GitHub export should be triggered in.
	ProjectId string `json:"project_id,omitempty"`
}

GithubSyncExportParameters struct for GithubSyncExportParameters

type GithubSyncImportOpts added in v1.0.11

type GithubSyncImportOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GithubSyncImportOpts Optional parameters for the method 'GithubSyncImport'

type GithubSyncImportParameters added in v1.0.11

type GithubSyncImportParameters struct {
	// Project ID to specify the actual project the GitHub import should be triggered in.
	ProjectId string `json:"project_id,omitempty"`
}

GithubSyncImportParameters struct for GithubSyncImportParameters

type GitlabSync

type GitlabSync struct {
	Id               string    `json:"id,omitempty"`
	ProjectId        string    `json:"project_id,omitempty"`
	GitlabProjectId  int32     `json:"gitlab_project_id,omitempty"`
	GitlabBranchName string    `json:"gitlab_branch_name,omitempty"`
	AutoImport       *bool     `json:"auto_import,omitempty"`
	AutoImportSecret string    `json:"auto_import_secret,omitempty"`
	AutoImportUrl    string    `json:"auto_import_url,omitempty"`
	SelfHostedApiUrl string    `json:"self_hosted_api_url,omitempty"`
	LastExportedAt   time.Time `json:"last_exported_at,omitempty"`
	LastImportedAt   time.Time `json:"last_imported_at,omitempty"`
	LastStatus       string    `json:"last_status,omitempty"`
}

GitlabSync struct for GitlabSync

type GitlabSyncDeleteOpts

type GitlabSyncDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	AccountId     optional.String `json:"account_id,omitempty"`
}

GitlabSyncDeleteOpts Optional parameters for the method 'GitlabSyncDelete'

type GitlabSyncExport

type GitlabSyncExport struct {
	MergeRequestId     int32  `json:"merge_request_id,omitempty"`
	MergeRequestWebUrl string `json:"merge_request_web_url,omitempty"`
}

GitlabSyncExport struct for GitlabSyncExport

type GitlabSyncExportOpts

type GitlabSyncExportOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GitlabSyncExportOpts Optional parameters for the method 'GitlabSyncExport'

type GitlabSyncExportParameters

type GitlabSyncExportParameters struct {
	// Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
	AccountId string `json:"account_id,omitempty"`
}

GitlabSyncExportParameters struct for GitlabSyncExportParameters

type GitlabSyncHistory

type GitlabSyncHistory struct {
	Status  int32                  `json:"status,omitempty"`
	Action  string                 `json:"action,omitempty"`
	Errors  []string               `json:"errors,omitempty"`
	Date    time.Time              `json:"date,omitempty"`
	Details map[string]interface{} `json:"details,omitempty"`
}

GitlabSyncHistory struct for GitlabSyncHistory

type GitlabSyncHistoryOpts

type GitlabSyncHistoryOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	AccountId     optional.String `json:"account_id,omitempty"`
}

GitlabSyncHistoryOpts Optional parameters for the method 'GitlabSyncHistory'

type GitlabSyncImportOpts

type GitlabSyncImportOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GitlabSyncImportOpts Optional parameters for the method 'GitlabSyncImport'

type GitlabSyncImportParameters

type GitlabSyncImportParameters struct {
	// Account ID to specify the actual account the GitLab Sync should be created in. Required if the requesting user is a member of multiple accounts.
	AccountId string `json:"account_id,omitempty"`
}

GitlabSyncImportParameters struct for GitlabSyncImportParameters

type GitlabSyncListOpts

type GitlabSyncListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	AccountId     optional.String `json:"account_id,omitempty"`
}

GitlabSyncListOpts Optional parameters for the method 'GitlabSyncList'

type GitlabSyncShowOpts

type GitlabSyncShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	AccountId     optional.String `json:"account_id,omitempty"`
}

GitlabSyncShowOpts Optional parameters for the method 'GitlabSyncShow'

type GitlabSyncUpdateOpts

type GitlabSyncUpdateOpts struct {
	XPhraseAppOTP     optional.String `json:"X-PhraseApp-OTP,omitempty"`
	AccountId         optional.String `json:"account_id,omitempty"`
	PhraseProjectCode optional.String `json:"phrase_project_code,omitempty"`
	GitlabProjectId   optional.Int32  `json:"gitlab_project_id,omitempty"`
	GitlabBranchName  optional.String `json:"gitlab_branch_name,omitempty"`
}

GitlabSyncUpdateOpts Optional parameters for the method 'GitlabSyncUpdate'

type GlossariesApiService added in v1.0.3

type GlossariesApiService service

GlossariesApiService GlossariesApi service

func (*GlossariesApiService) GlossariesList added in v1.0.3

func (a *GlossariesApiService) GlossariesList(ctx _context.Context, accountId string, localVarOptionals *GlossariesListOpts) ([]Glossary, *APIResponse, error)

GlossariesList List glossaries List all glossaries the current user has access to.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *GlossariesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Glossary

func (*GlossariesApiService) GlossaryCreate added in v1.0.3

func (a *GlossariesApiService) GlossaryCreate(ctx _context.Context, accountId string, glossaryCreateParameters GlossaryCreateParameters, localVarOptionals *GlossaryCreateOpts) (Glossary, *APIResponse, error)

GlossaryCreate Create a glossary Create a new glossary.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryCreateParameters
  • @param optional nil or *GlossaryCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Glossary

func (*GlossariesApiService) GlossaryDelete added in v1.0.3

func (a *GlossariesApiService) GlossaryDelete(ctx _context.Context, accountId string, id string, localVarOptionals *GlossaryDeleteOpts) ([]byte, *APIResponse, error)

GlossaryDelete Delete a glossary Delete an existing glossary.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *GlossaryDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*GlossariesApiService) GlossaryShow added in v1.0.3

func (a *GlossariesApiService) GlossaryShow(ctx _context.Context, accountId string, id string, localVarOptionals *GlossaryShowOpts) (Glossary, *APIResponse, error)

GlossaryShow Get a single glossary Get details on a single glossary.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *GlossaryShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Glossary

func (*GlossariesApiService) GlossaryUpdate added in v1.0.3

func (a *GlossariesApiService) GlossaryUpdate(ctx _context.Context, accountId string, id string, glossaryUpdateParameters GlossaryUpdateParameters, localVarOptionals *GlossaryUpdateOpts) (Glossary, *APIResponse, error)

GlossaryUpdate Update a glossary Update an existing glossary.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param glossaryUpdateParameters
  • @param optional nil or *GlossaryUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Glossary

type GlossariesListOpts

type GlossariesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

GlossariesListOpts Optional parameters for the method 'GlossariesList'

type Glossary

type Glossary struct {
	Id        string         `json:"id,omitempty"`
	Name      string         `json:"name,omitempty"`
	Projects  []ProjectShort `json:"projects,omitempty"`
	CreatedAt time.Time      `json:"created_at,omitempty"`
	UpdatedAt time.Time      `json:"updated_at,omitempty"`
}

Glossary struct for Glossary

type GlossaryCreateOpts

type GlossaryCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryCreateOpts Optional parameters for the method 'GlossaryCreate'

type GlossaryCreateParameters

type GlossaryCreateParameters struct {
	// Name of the glossary
	Name string `json:"name,omitempty"`
	// List of project ids the glossary should be assigned to.
	ProjectIds string `json:"project_ids,omitempty"`
	// List of space ids the glossary should be assigned to.
	SpaceIds []string `json:"space_ids,omitempty"`
}

GlossaryCreateParameters struct for GlossaryCreateParameters

type GlossaryDeleteOpts

type GlossaryDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryDeleteOpts Optional parameters for the method 'GlossaryDelete'

type GlossaryShowOpts

type GlossaryShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryShowOpts Optional parameters for the method 'GlossaryShow'

type GlossaryTerm

type GlossaryTerm struct {
	Id            string                    `json:"id,omitempty"`
	Term          string                    `json:"term,omitempty"`
	Description   string                    `json:"description,omitempty"`
	Translatable  *bool                     `json:"translatable,omitempty"`
	CaseSensitive *bool                     `json:"case_sensitive,omitempty"`
	Translations  []GlossaryTermTranslation `json:"translations,omitempty"`
	CreatedAt     time.Time                 `json:"created_at,omitempty"`
	UpdatedAt     time.Time                 `json:"updated_at,omitempty"`
}

GlossaryTerm struct for GlossaryTerm

type GlossaryTermCreateOpts

type GlossaryTermCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermCreateOpts Optional parameters for the method 'GlossaryTermCreate'

type GlossaryTermCreateParameters

type GlossaryTermCreateParameters struct {
	// Glossary term
	Term string `json:"term,omitempty"`
	// Description of term
	Description string `json:"description,omitempty"`
	// Indicates whether the term should be used for all languages or can be translated
	Translatable *bool `json:"translatable,omitempty"`
	// Indicates whether the term is case sensitive
	CaseSensitive *bool `json:"case_sensitive,omitempty"`
}

GlossaryTermCreateParameters struct for GlossaryTermCreateParameters

type GlossaryTermDeleteOpts

type GlossaryTermDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermDeleteOpts Optional parameters for the method 'GlossaryTermDelete'

type GlossaryTermShowOpts

type GlossaryTermShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermShowOpts Optional parameters for the method 'GlossaryTermShow'

type GlossaryTermTranslation

type GlossaryTermTranslation struct {
	Id         string    `json:"id,omitempty"`
	LocaleCode string    `json:"locale_code,omitempty"`
	Content    string    `json:"content,omitempty"`
	CreatedAt  time.Time `json:"created_at,omitempty"`
	UpdatedAt  time.Time `json:"updated_at,omitempty"`
}

GlossaryTermTranslation struct for GlossaryTermTranslation

type GlossaryTermTranslationCreateOpts

type GlossaryTermTranslationCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermTranslationCreateOpts Optional parameters for the method 'GlossaryTermTranslationCreate'

type GlossaryTermTranslationCreateParameters

type GlossaryTermTranslationCreateParameters struct {
	// Identifies the language for this translation
	LocaleCode string `json:"locale_code,omitempty"`
	// The content of the translation
	Content string `json:"content,omitempty"`
}

GlossaryTermTranslationCreateParameters struct for GlossaryTermTranslationCreateParameters

type GlossaryTermTranslationDeleteOpts

type GlossaryTermTranslationDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermTranslationDeleteOpts Optional parameters for the method 'GlossaryTermTranslationDelete'

type GlossaryTermTranslationUpdateOpts

type GlossaryTermTranslationUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermTranslationUpdateOpts Optional parameters for the method 'GlossaryTermTranslationUpdate'

type GlossaryTermTranslationUpdateParameters

type GlossaryTermTranslationUpdateParameters struct {
	// Identifies the language for this translation
	LocaleCode string `json:"locale_code,omitempty"`
	// The content of the translation
	Content string `json:"content,omitempty"`
}

GlossaryTermTranslationUpdateParameters struct for GlossaryTermTranslationUpdateParameters

type GlossaryTermTranslationsApiService

type GlossaryTermTranslationsApiService service

GlossaryTermTranslationsApiService GlossaryTermTranslationsApi service

func (*GlossaryTermTranslationsApiService) GlossaryTermTranslationCreate

func (a *GlossaryTermTranslationsApiService) GlossaryTermTranslationCreate(ctx _context.Context, accountId string, glossaryId string, termId string, glossaryTermTranslationCreateParameters GlossaryTermTranslationCreateParameters, localVarOptionals *GlossaryTermTranslationCreateOpts) (GlossaryTermTranslation, *APIResponse, error)

GlossaryTermTranslationCreate Create a glossary term translation Create a new glossary term translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param termId Term ID
  • @param glossaryTermTranslationCreateParameters
  • @param optional nil or *GlossaryTermTranslationCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return GlossaryTermTranslation

func (*GlossaryTermTranslationsApiService) GlossaryTermTranslationDelete

func (a *GlossaryTermTranslationsApiService) GlossaryTermTranslationDelete(ctx _context.Context, accountId string, glossaryId string, termId string, id string, localVarOptionals *GlossaryTermTranslationDeleteOpts) ([]byte, *APIResponse, error)

GlossaryTermTranslationDelete Delete a glossary term translation Delete an existing glossary term translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param termId Term ID
  • @param id ID
  • @param optional nil or *GlossaryTermTranslationDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*GlossaryTermTranslationsApiService) GlossaryTermTranslationUpdate

func (a *GlossaryTermTranslationsApiService) GlossaryTermTranslationUpdate(ctx _context.Context, accountId string, glossaryId string, termId string, id string, glossaryTermTranslationUpdateParameters GlossaryTermTranslationUpdateParameters, localVarOptionals *GlossaryTermTranslationUpdateOpts) (GlossaryTermTranslation, *APIResponse, error)

GlossaryTermTranslationUpdate Update a glossary term translation Update an existing glossary term translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param termId Term ID
  • @param id ID
  • @param glossaryTermTranslationUpdateParameters
  • @param optional nil or *GlossaryTermTranslationUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return GlossaryTermTranslation

type GlossaryTermUpdateOpts

type GlossaryTermUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryTermUpdateOpts Optional parameters for the method 'GlossaryTermUpdate'

type GlossaryTermUpdateParameters

type GlossaryTermUpdateParameters struct {
	// Glossary term
	Term string `json:"term,omitempty"`
	// Description of term
	Description string `json:"description,omitempty"`
	// Indicates whether the term should be used for all languages or can be translated
	Translatable *bool `json:"translatable,omitempty"`
	// Indicates whether the term is case sensitive
	CaseSensitive *bool `json:"case_sensitive,omitempty"`
}

GlossaryTermUpdateParameters struct for GlossaryTermUpdateParameters

type GlossaryTermsApiService

type GlossaryTermsApiService service

GlossaryTermsApiService GlossaryTermsApi service

func (*GlossaryTermsApiService) GlossaryTermCreate

func (a *GlossaryTermsApiService) GlossaryTermCreate(ctx _context.Context, accountId string, glossaryId string, glossaryTermCreateParameters GlossaryTermCreateParameters, localVarOptionals *GlossaryTermCreateOpts) (GlossaryTerm, *APIResponse, error)

GlossaryTermCreate Create a glossary term Create a new glossary term.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param glossaryTermCreateParameters
  • @param optional nil or *GlossaryTermCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return GlossaryTerm

func (*GlossaryTermsApiService) GlossaryTermDelete

func (a *GlossaryTermsApiService) GlossaryTermDelete(ctx _context.Context, accountId string, glossaryId string, id string, localVarOptionals *GlossaryTermDeleteOpts) ([]byte, *APIResponse, error)

GlossaryTermDelete Delete a glossary term Delete an existing glossary term.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param id ID
  • @param optional nil or *GlossaryTermDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*GlossaryTermsApiService) GlossaryTermShow

func (a *GlossaryTermsApiService) GlossaryTermShow(ctx _context.Context, accountId string, glossaryId string, id string, localVarOptionals *GlossaryTermShowOpts) (GlossaryTerm, *APIResponse, error)

GlossaryTermShow Get a single glossary term Get details on a single glossary term.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param id ID
  • @param optional nil or *GlossaryTermShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return GlossaryTerm

func (*GlossaryTermsApiService) GlossaryTermUpdate

func (a *GlossaryTermsApiService) GlossaryTermUpdate(ctx _context.Context, accountId string, glossaryId string, id string, glossaryTermUpdateParameters GlossaryTermUpdateParameters, localVarOptionals *GlossaryTermUpdateOpts) (GlossaryTerm, *APIResponse, error)

GlossaryTermUpdate Update a glossary term Update an existing glossary term.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param id ID
  • @param glossaryTermUpdateParameters
  • @param optional nil or *GlossaryTermUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return GlossaryTerm

func (*GlossaryTermsApiService) GlossaryTermsList

func (a *GlossaryTermsApiService) GlossaryTermsList(ctx _context.Context, accountId string, glossaryId string, localVarOptionals *GlossaryTermsListOpts) ([]GlossaryTerm, *APIResponse, error)

GlossaryTermsList List glossary terms List all glossary terms the current user has access to.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param glossaryId Glossary ID
  • @param optional nil or *GlossaryTermsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []GlossaryTerm

type GlossaryTermsListOpts

type GlossaryTermsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

GlossaryTermsListOpts Optional parameters for the method 'GlossaryTermsList'

type GlossaryUpdateOpts

type GlossaryUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

GlossaryUpdateOpts Optional parameters for the method 'GlossaryUpdate'

type GlossaryUpdateParameters

type GlossaryUpdateParameters struct {
	// Name of the glossary
	Name string `json:"name,omitempty"`
	// List of project ids the glossary should be assigned to.
	ProjectIds string `json:"project_ids,omitempty"`
	// List of space ids the glossary should be assigned to.
	SpaceIds []string `json:"space_ids,omitempty"`
}

GlossaryUpdateParameters struct for GlossaryUpdateParameters

type InlineResponse422 added in v1.0.11

type InlineResponse422 struct {
	Message string                    `json:"message,omitempty"`
	Errors  []InlineResponse422Errors `json:"errors,omitempty"`
}

InlineResponse422 struct for InlineResponse422

type InlineResponse422Errors added in v1.0.11

type InlineResponse422Errors struct {
	Resource string `json:"resource,omitempty"`
	Field    string `json:"field,omitempty"`
	Message  string `json:"message,omitempty"`
}

InlineResponse422Errors struct for InlineResponse422Errors

type Invitation

type Invitation struct {
	Id                 string                            `json:"id,omitempty"`
	Email              string                            `json:"email,omitempty"`
	Role               string                            `json:"role,omitempty"`
	State              string                            `json:"state,omitempty"`
	Projects           []ProjectShort                    `json:"projects,omitempty"`
	Locales            []LocalePreview                   `json:"locales,omitempty"`
	DefaultLocaleCodes []string                          `json:"default_locale_codes,omitempty"`
	Permissions        map[string]interface{}            `json:"permissions,omitempty"`
	LocaleIds          []string                          `json:"locale_ids,omitempty"`
	CreatedAt          time.Time                         `json:"created_at,omitempty"`
	UpdatedAt          time.Time                         `json:"updated_at,omitempty"`
	AcceptedAt         time.Time                         `json:"accepted_at,omitempty"`
	Spaces             []MemberSpaces                    `json:"spaces,omitempty"`
	ProjectRole        []MemberProjectDetailProjectRoles `json:"project_role,omitempty"`
}

Invitation struct for Invitation

type InvitationCreateOpts

type InvitationCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

InvitationCreateOpts Optional parameters for the method 'InvitationCreate'

type InvitationCreateParameters

type InvitationCreateParameters struct {
	// The email of the invited user. The <code>email</code> can not be updated once created. Create a new invitation for each unique email.
	Email string `json:"email,omitempty"`
	// Invitiation role, can be any of Manager, Developer, Translator.
	Role string `json:"role,omitempty"`
	// List of project ids the invited user has access to.
	ProjectIds string `json:"project_ids,omitempty"`
	// List of locale ids the invited user has access to.
	LocaleIds string `json:"locale_ids,omitempty"`
	// List of spaces the user is assigned to.
	SpaceIds []string `json:"space_ids,omitempty"`
	// List of default locales for the user.
	DefaultLocaleCodes []string `json:"default_locale_codes,omitempty"`
	// Additional permissions depending on invitation role. Available permissions are <code>create_upload</code> and <code>review_translations</code>
	Permissions map[string]string `json:"permissions,omitempty"`
}

InvitationCreateParameters struct for InvitationCreateParameters

type InvitationDeleteOpts

type InvitationDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

InvitationDeleteOpts Optional parameters for the method 'InvitationDelete'

type InvitationResendOpts

type InvitationResendOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

InvitationResendOpts Optional parameters for the method 'InvitationResend'

type InvitationShowOpts

type InvitationShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

InvitationShowOpts Optional parameters for the method 'InvitationShow'

type InvitationUpdateOpts

type InvitationUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

InvitationUpdateOpts Optional parameters for the method 'InvitationUpdate'

type InvitationUpdateParameters

type InvitationUpdateParameters struct {
	// Invitiation role, can be any of Manager, Developer, Translator
	Role string `json:"role,omitempty"`
	// List of project ids the invited user has access to
	ProjectIds string `json:"project_ids,omitempty"`
	// List of locale ids the invited user has access to
	LocaleIds string `json:"locale_ids,omitempty"`
	// List of spaces the user is assigned to.
	SpaceIds []string `json:"space_ids,omitempty"`
	// List of default locales for the user.
	DefaultLocaleCodes []string `json:"default_locale_codes,omitempty"`
	// Additional permissions depending on invitation role.
	Permissions map[string]string `json:"permissions,omitempty"`
}

InvitationUpdateParameters struct for InvitationUpdateParameters

type InvitationUpdateSettingsOpts added in v1.0.18

type InvitationUpdateSettingsOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

InvitationUpdateSettingsOpts Optional parameters for the method 'InvitationUpdateSettings'

type InvitationUpdateSettingsParameters added in v1.0.18

type InvitationUpdateSettingsParameters struct {
	// Member role, can be any of of Manager, Developer, Translator
	ProjectRole string `json:"project_role,omitempty"`
	// List of locale ids the user has access to.
	LocaleIds []string `json:"locale_ids,omitempty"`
}

InvitationUpdateSettingsParameters struct for InvitationUpdateSettingsParameters

type InvitationsApiService

type InvitationsApiService service

InvitationsApiService InvitationsApi service

func (*InvitationsApiService) InvitationCreate

func (a *InvitationsApiService) InvitationCreate(ctx _context.Context, accountId string, invitationCreateParameters InvitationCreateParameters, localVarOptionals *InvitationCreateOpts) (Invitation, *APIResponse, error)

InvitationCreate Create a new invitation Invite a person to an account. Developers and translators need &lt;code&gt;project_ids&lt;/code&gt; and &lt;code&gt;locale_ids&lt;/code&gt; assigned to access them. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param invitationCreateParameters
  • @param optional nil or *InvitationCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Invitation

func (*InvitationsApiService) InvitationDelete

func (a *InvitationsApiService) InvitationDelete(ctx _context.Context, accountId string, id string, localVarOptionals *InvitationDeleteOpts) ([]byte, *APIResponse, error)

InvitationDelete Delete an invitation Delete an existing invitation (must not be accepted yet). Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *InvitationDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*InvitationsApiService) InvitationResend

func (a *InvitationsApiService) InvitationResend(ctx _context.Context, accountId string, id string, localVarOptionals *InvitationResendOpts) (Invitation, *APIResponse, error)

InvitationResend Resend an invitation Resend the invitation email (must not be accepted yet). Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *InvitationResendOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Invitation

func (*InvitationsApiService) InvitationShow

func (a *InvitationsApiService) InvitationShow(ctx _context.Context, accountId string, id string, localVarOptionals *InvitationShowOpts) (Invitation, *APIResponse, error)

InvitationShow Get a single invitation Get details on a single invitation. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *InvitationShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Invitation

func (*InvitationsApiService) InvitationUpdate

func (a *InvitationsApiService) InvitationUpdate(ctx _context.Context, accountId string, id string, invitationUpdateParameters InvitationUpdateParameters, localVarOptionals *InvitationUpdateOpts) (Invitation, *APIResponse, error)

InvitationUpdate Update an invitation Update an existing invitation (must not be accepted yet). The &lt;code&gt;email&lt;/code&gt; cannot be updated. Developers and translators need &lt;code&gt;project_ids&lt;/code&gt; and &lt;code&gt;locale_ids&lt;/code&gt; assigned to access them. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param invitationUpdateParameters
  • @param optional nil or *InvitationUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Invitation

func (*InvitationsApiService) InvitationUpdateSettings added in v1.0.18

func (a *InvitationsApiService) InvitationUpdateSettings(ctx _context.Context, projectId string, id string, invitationUpdateSettingsParameters InvitationUpdateSettingsParameters, localVarOptionals *InvitationUpdateSettingsOpts) (Invitation, *APIResponse, error)

InvitationUpdateSettings Update a member's invitation access Update member&#39;s settings in the invitations. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param invitationUpdateSettingsParameters
  • @param optional nil or *InvitationUpdateSettingsOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Invitation

func (*InvitationsApiService) InvitationsList

func (a *InvitationsApiService) InvitationsList(ctx _context.Context, accountId string, localVarOptionals *InvitationsListOpts) ([]Invitation, *APIResponse, error)

InvitationsList List invitations List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *InvitationsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Invitation

type InvitationsListOpts

type InvitationsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

InvitationsListOpts Optional parameters for the method 'InvitationsList'

type Job

type Job struct {
	Id        string       `json:"id,omitempty"`
	Name      string       `json:"name,omitempty"`
	Briefing  string       `json:"briefing,omitempty"`
	DueDate   time.Time    `json:"due_date,omitempty"`
	State     string       `json:"state,omitempty"`
	TicketUrl string       `json:"ticket_url,omitempty"`
	Project   ProjectShort `json:"project,omitempty"`
	Branch    BranchName   `json:"branch,omitempty"`
	CreatedAt time.Time    `json:"created_at,omitempty"`
	UpdatedAt time.Time    `json:"updated_at,omitempty"`
}

Job struct for Job

type JobCompleteOpts

type JobCompleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobCompleteOpts Optional parameters for the method 'JobComplete'

type JobCompleteParameters

type JobCompleteParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

JobCompleteParameters struct for JobCompleteParameters

type JobCreateOpts

type JobCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobCreateOpts Optional parameters for the method 'JobCreate'

type JobCreateParameters

type JobCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Job name
	Name string `json:"name,omitempty"`
	// Briefing for the translators
	Briefing string `json:"briefing,omitempty"`
	// Date the job should be finished
	DueDate time.Time `json:"due_date,omitempty"`
	// URL to a ticket for this job (e.g. Jira, Trello)
	TicketUrl string `json:"ticket_url,omitempty"`
	// tags of keys that should be included within the job
	Tags []string `json:"tags,omitempty"`
	// ids of keys that should be included within the job
	TranslationKeyIds []string `json:"translation_key_ids,omitempty"`
}

JobCreateParameters struct for JobCreateParameters

type JobDeleteOpts

type JobDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

JobDeleteOpts Optional parameters for the method 'JobDelete'

type JobDetails

type JobDetails struct {
	Id         string          `json:"id,omitempty"`
	Name       string          `json:"name,omitempty"`
	Briefing   string          `json:"briefing,omitempty"`
	DueDate    time.Time       `json:"due_date,omitempty"`
	State      string          `json:"state,omitempty"`
	TicketUrl  string          `json:"ticket_url,omitempty"`
	Project    ProjectShort    `json:"project,omitempty"`
	Branch     BranchName      `json:"branch,omitempty"`
	CreatedAt  time.Time       `json:"created_at,omitempty"`
	UpdatedAt  time.Time       `json:"updated_at,omitempty"`
	Owner      UserPreview     `json:"owner,omitempty"`
	JobTagName string          `json:"job_tag_name,omitempty"`
	Locales    []LocalePreview `json:"locales,omitempty"`
	Keys       []KeyPreview    `json:"keys,omitempty"`
}

JobDetails struct for JobDetails

type JobDetails1

type JobDetails1 struct {
	Owner      UserPreview     `json:"owner,omitempty"`
	JobTagName string          `json:"job_tag_name,omitempty"`
	Locales    []LocalePreview `json:"locales,omitempty"`
	Keys       []KeyPreview    `json:"keys,omitempty"`
}

JobDetails1 struct for JobDetails1

type JobKeysCreateOpts

type JobKeysCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobKeysCreateOpts Optional parameters for the method 'JobKeysCreate'

type JobKeysCreateParameters

type JobKeysCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// ids of keys that should added to the job
	TranslationKeyIds []string `json:"translation_key_ids,omitempty"`
}

JobKeysCreateParameters struct for JobKeysCreateParameters

type JobKeysDeleteOpts

type JobKeysDeleteOpts struct {
	XPhraseAppOTP     optional.String    `json:"X-PhraseApp-OTP,omitempty"`
	Branch            optional.String    `json:"branch,omitempty"`
	TranslationKeyIds optional.Interface `json:"translation_key_ids,omitempty"`
}

JobKeysDeleteOpts Optional parameters for the method 'JobKeysDelete'

type JobLocale

type JobLocale struct {
	Id        string        `json:"id,omitempty"`
	Job       JobPreview    `json:"job,omitempty"`
	Locale    LocalePreview `json:"locale,omitempty"`
	Users     []UserPreview `json:"users,omitempty"`
	Completed *bool         `json:"completed,omitempty"`
}

JobLocale struct for JobLocale

type JobLocaleCompleteOpts

type JobLocaleCompleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobLocaleCompleteOpts Optional parameters for the method 'JobLocaleComplete'

type JobLocaleCompleteParameters

type JobLocaleCompleteParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

JobLocaleCompleteParameters struct for JobLocaleCompleteParameters

type JobLocaleDeleteOpts

type JobLocaleDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

JobLocaleDeleteOpts Optional parameters for the method 'JobLocaleDelete'

type JobLocaleReopenOpts

type JobLocaleReopenOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobLocaleReopenOpts Optional parameters for the method 'JobLocaleReopen'

type JobLocaleReopenParameters

type JobLocaleReopenParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

JobLocaleReopenParameters struct for JobLocaleReopenParameters

type JobLocaleShowOpts

type JobLocaleShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

JobLocaleShowOpts Optional parameters for the method 'JobLocaleShow'

type JobLocaleUpdateOpts

type JobLocaleUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobLocaleUpdateOpts Optional parameters for the method 'JobLocaleUpdate'

type JobLocaleUpdateParameters

type JobLocaleUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// locale id
	LocaleId string `json:"locale_id,omitempty"`
	// Array of user ids to be assigned to the job locale
	UserIds []string `json:"user_ids,omitempty"`
}

JobLocaleUpdateParameters struct for JobLocaleUpdateParameters

type JobLocalesApiService

type JobLocalesApiService service

JobLocalesApiService JobLocalesApi service

func (*JobLocalesApiService) JobLocaleComplete

func (a *JobLocalesApiService) JobLocaleComplete(ctx _context.Context, projectId string, jobId string, id string, jobLocaleCompleteParameters JobLocaleCompleteParameters, localVarOptionals *JobLocaleCompleteOpts) (JobLocale, *APIResponse, error)

JobLocaleComplete Complete a job locale Mark a job locale as completed.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param id ID
  • @param jobLocaleCompleteParameters
  • @param optional nil or *JobLocaleCompleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobLocale

func (*JobLocalesApiService) JobLocaleDelete

func (a *JobLocalesApiService) JobLocaleDelete(ctx _context.Context, projectId string, jobId string, id string, localVarOptionals *JobLocaleDeleteOpts) ([]byte, *APIResponse, error)

JobLocaleDelete Delete a job locale Delete an existing job locale.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param id ID
  • @param optional nil or *JobLocaleDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*JobLocalesApiService) JobLocaleReopen

func (a *JobLocalesApiService) JobLocaleReopen(ctx _context.Context, projectId string, jobId string, id string, jobLocaleReopenParameters JobLocaleReopenParameters, localVarOptionals *JobLocaleReopenOpts) (JobLocale, *APIResponse, error)

JobLocaleReopen Reopen a job locale Mark a job locale as uncompleted.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param id ID
  • @param jobLocaleReopenParameters
  • @param optional nil or *JobLocaleReopenOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobLocale

func (*JobLocalesApiService) JobLocaleShow

func (a *JobLocalesApiService) JobLocaleShow(ctx _context.Context, projectId string, jobId string, id string, localVarOptionals *JobLocaleShowOpts) (JobLocale, *APIResponse, error)

JobLocaleShow Get a single job locale Get a single job locale for a given job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param id ID
  • @param optional nil or *JobLocaleShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return JobLocale

func (*JobLocalesApiService) JobLocaleUpdate

func (a *JobLocalesApiService) JobLocaleUpdate(ctx _context.Context, projectId string, jobId string, id string, jobLocaleUpdateParameters JobLocaleUpdateParameters, localVarOptionals *JobLocaleUpdateOpts) (JobLocale, *APIResponse, error)

JobLocaleUpdate Update a job locale Update an existing job locale.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param id ID
  • @param jobLocaleUpdateParameters
  • @param optional nil or *JobLocaleUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobLocale

func (*JobLocalesApiService) JobLocalesCreate

func (a *JobLocalesApiService) JobLocalesCreate(ctx _context.Context, projectId string, jobId string, jobLocalesCreateParameters JobLocalesCreateParameters, localVarOptionals *JobLocalesCreateOpts) (JobLocale, *APIResponse, error)

JobLocalesCreate Create a job locale Create a new job locale.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param jobLocalesCreateParameters
  • @param optional nil or *JobLocalesCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobLocale

func (*JobLocalesApiService) JobLocalesList

func (a *JobLocalesApiService) JobLocalesList(ctx _context.Context, projectId string, jobId string, localVarOptionals *JobLocalesListOpts) ([]JobLocale, *APIResponse, error)

JobLocalesList List job locales List all job locales for a given job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobId Job ID
  • @param optional nil or *JobLocalesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []JobLocale

type JobLocalesCreateOpts

type JobLocalesCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobLocalesCreateOpts Optional parameters for the method 'JobLocalesCreate'

type JobLocalesCreateParameters

type JobLocalesCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// locale id
	LocaleId string `json:"locale_id,omitempty"`
	// Array of user ids to be assigned to the job locale
	UserIds []string `json:"user_ids,omitempty"`
}

JobLocalesCreateParameters struct for JobLocalesCreateParameters

type JobLocalesListOpts

type JobLocalesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

JobLocalesListOpts Optional parameters for the method 'JobLocalesList'

type JobPreview

type JobPreview struct {
	Id    string `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	State string `json:"state,omitempty"`
}

JobPreview struct for JobPreview

type JobReopenOpts

type JobReopenOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobReopenOpts Optional parameters for the method 'JobReopen'

type JobReopenParameters

type JobReopenParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

JobReopenParameters struct for JobReopenParameters

type JobShowOpts

type JobShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

JobShowOpts Optional parameters for the method 'JobShow'

type JobStartOpts

type JobStartOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobStartOpts Optional parameters for the method 'JobStart'

type JobStartParameters

type JobStartParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

JobStartParameters struct for JobStartParameters

type JobUpdateOpts

type JobUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

JobUpdateOpts Optional parameters for the method 'JobUpdate'

type JobUpdateParameters

type JobUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Job name
	Name string `json:"name,omitempty"`
	// Briefing for the translators
	Briefing string `json:"briefing,omitempty"`
	// Date the job should be finished
	DueDate time.Time `json:"due_date,omitempty"`
	// URL to a ticket for this job (e.g. Jira, Trello)
	TicketUrl string `json:"ticket_url,omitempty"`
}

JobUpdateParameters struct for JobUpdateParameters

type JobsApiService

type JobsApiService service

JobsApiService JobsApi service

func (*JobsApiService) JobComplete

func (a *JobsApiService) JobComplete(ctx _context.Context, projectId string, id string, jobCompleteParameters JobCompleteParameters, localVarOptionals *JobCompleteOpts) (JobDetails, *APIResponse, error)

JobComplete Complete a job Mark a job as completed.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param jobCompleteParameters
  • @param optional nil or *JobCompleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobDetails

func (*JobsApiService) JobCreate

func (a *JobsApiService) JobCreate(ctx _context.Context, projectId string, jobCreateParameters JobCreateParameters, localVarOptionals *JobCreateOpts) (JobDetails, *APIResponse, error)

JobCreate Create a job Create a new job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param jobCreateParameters
  • @param optional nil or *JobCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobDetails

func (*JobsApiService) JobDelete

func (a *JobsApiService) JobDelete(ctx _context.Context, projectId string, id string, localVarOptionals *JobDeleteOpts) ([]byte, *APIResponse, error)

JobDelete Delete a job Delete an existing job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *JobDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*JobsApiService) JobKeysCreate

func (a *JobsApiService) JobKeysCreate(ctx _context.Context, projectId string, id string, jobKeysCreateParameters JobKeysCreateParameters, localVarOptionals *JobKeysCreateOpts) (JobDetails, *APIResponse, error)

JobKeysCreate Add keys to job Add multiple keys to a existing job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param jobKeysCreateParameters
  • @param optional nil or *JobKeysCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobDetails

func (*JobsApiService) JobKeysDelete

func (a *JobsApiService) JobKeysDelete(ctx _context.Context, projectId string, id string, localVarOptionals *JobKeysDeleteOpts) ([]byte, *APIResponse, error)

JobKeysDelete Remove keys from job Remove multiple keys from existing job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *JobKeysDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "TranslationKeyIds" (optional.Interface of []string) - ids of keys that should added to the job

func (*JobsApiService) JobReopen

func (a *JobsApiService) JobReopen(ctx _context.Context, projectId string, id string, jobReopenParameters JobReopenParameters, localVarOptionals *JobReopenOpts) (JobDetails, *APIResponse, error)

JobReopen Reopen a job Mark a job as uncompleted.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param jobReopenParameters
  • @param optional nil or *JobReopenOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobDetails

func (*JobsApiService) JobShow

func (a *JobsApiService) JobShow(ctx _context.Context, projectId string, id string, localVarOptionals *JobShowOpts) (JobDetails, *APIResponse, error)

JobShow Get a single job Get details on a single job for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *JobShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return JobDetails

func (*JobsApiService) JobStart

func (a *JobsApiService) JobStart(ctx _context.Context, projectId string, id string, jobStartParameters JobStartParameters, localVarOptionals *JobStartOpts) (JobDetails, *APIResponse, error)

JobStart Start a job Starts an existing job in state draft.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param jobStartParameters
  • @param optional nil or *JobStartOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobDetails

func (*JobsApiService) JobUpdate

func (a *JobsApiService) JobUpdate(ctx _context.Context, projectId string, id string, jobUpdateParameters JobUpdateParameters, localVarOptionals *JobUpdateOpts) (JobDetails, *APIResponse, error)

JobUpdate Update a job Update an existing job.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param jobUpdateParameters
  • @param optional nil or *JobUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return JobDetails

func (*JobsApiService) JobsByAccount added in v1.0.12

func (a *JobsApiService) JobsByAccount(ctx _context.Context, accountId string, localVarOptionals *JobsByAccountOpts) ([]Job, *APIResponse, error)

JobsByAccount List account jobs List all jobs for the given account.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *JobsByAccountOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "OwnedBy" (optional.String) - filter by user owning job
  • @param "AssignedTo" (optional.String) - filter by user assigned to job
  • @param "State" (optional.String) - filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>

@return []Job

func (*JobsApiService) JobsList

func (a *JobsApiService) JobsList(ctx _context.Context, projectId string, localVarOptionals *JobsListOpts) ([]Job, *APIResponse, error)

JobsList List jobs List all jobs for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *JobsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "OwnedBy" (optional.String) - filter by user owning job
  • @param "AssignedTo" (optional.String) - filter by user assigned to job
  • @param "State" (optional.String) - filter by state of job Valid states are <code>draft</code>, <code>in_progress</code>, <code>completed</code>

@return []Job

type JobsByAccountOpts added in v1.0.12

type JobsByAccountOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	OwnedBy       optional.String `json:"owned_by,omitempty"`
	AssignedTo    optional.String `json:"assigned_to,omitempty"`
	State         optional.String `json:"state,omitempty"`
}

JobsByAccountOpts Optional parameters for the method 'JobsByAccount'

type JobsListOpts

type JobsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	OwnedBy       optional.String `json:"owned_by,omitempty"`
	AssignedTo    optional.String `json:"assigned_to,omitempty"`
	State         optional.String `json:"state,omitempty"`
}

JobsListOpts Optional parameters for the method 'JobsList'

type KeyCreateOpts

type KeyCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

KeyCreateOpts Optional parameters for the method 'KeyCreate'

type KeyCreateParameters

type KeyCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Key name
	Name string `json:"name,omitempty"`
	// Key description (usually includes contextual information for translators)
	Description string `json:"description,omitempty"`
	// Indicates whether key supports pluralization
	Plural *bool `json:"plural,omitempty"`
	// Plural name for the key (used in some file formats, e.g. Gettext)
	NamePlural string `json:"name_plural,omitempty"`
	// Type of the key. Can be one of the following: string, number, boolean, array, markdown.
	DataType string `json:"data_type,omitempty"`
	// List of tags separated by comma to be associated with the key.
	Tags string `json:"tags,omitempty"`
	// Max. number of characters translations for this key can have.
	MaxCharactersAllowed int32 `json:"max_characters_allowed,omitempty"`
	// Screenshot/image for the key. This parameter is deprecated. Please use the Screenshots endpoint instead.
	Screenshot *os.File `json:"screenshot,omitempty"`
	// Indicates whether the screenshot will be deleted. This parameter is deprecated. Please use the Screenshots endpoint instead.
	RemoveScreenshot *bool `json:"remove_screenshot,omitempty"`
	// Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats.
	Unformatted *bool `json:"unformatted,omitempty"`
	// Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats.
	XmlSpacePreserve *bool `json:"xml_space_preserve,omitempty"`
	// Original file attribute. Used in some formats, e.g. XLIFF.
	OriginalFile string `json:"original_file,omitempty"`
	// NSStringLocalizedFormatKey attribute. Used in .stringsdict format.
	LocalizedFormatString string `json:"localized_format_string,omitempty"`
	// NSStringLocalizedFormatKey attribute. Used in .stringsdict format.
	LocalizedFormatKey string `json:"localized_format_key,omitempty"`
}

KeyCreateParameters struct for KeyCreateParameters

type KeyDeleteOpts

type KeyDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

KeyDeleteOpts Optional parameters for the method 'KeyDelete'

type KeyPreview

type KeyPreview struct {
	Id     string `json:"id,omitempty"`
	Name   string `json:"name,omitempty"`
	Plural *bool  `json:"plural,omitempty"`
}

KeyPreview struct for KeyPreview

type KeyShowOpts

type KeyShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

KeyShowOpts Optional parameters for the method 'KeyShow'

type KeyUpdateOpts

type KeyUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

KeyUpdateOpts Optional parameters for the method 'KeyUpdate'

type KeyUpdateParameters

type KeyUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Key name
	Name string `json:"name,omitempty"`
	// Key description (usually includes contextual information for translators)
	Description string `json:"description,omitempty"`
	// Indicates whether key supports pluralization
	Plural *bool `json:"plural,omitempty"`
	// Plural name for the key (used in some file formats, e.g. Gettext)
	NamePlural string `json:"name_plural,omitempty"`
	// Type of the key. Can be one of the following: string, number, boolean, array, markdown.
	DataType string `json:"data_type,omitempty"`
	// List of tags separated by comma to be associated with the key.
	Tags string `json:"tags,omitempty"`
	// Max. number of characters translations for this key can have.
	MaxCharactersAllowed int32 `json:"max_characters_allowed,omitempty"`
	// Screenshot/image for the key. This parameter is deprecated. Please use the Screenshots endpoint instead.
	Screenshot *os.File `json:"screenshot,omitempty"`
	// Indicates whether the screenshot will be deleted. This parameter is deprecated. Please use the Screenshots endpoint instead.
	RemoveScreenshot *bool `json:"remove_screenshot,omitempty"`
	// Indicates whether the key should be exported as \"unformatted\". Supported by Android XML and other formats.
	Unformatted *bool `json:"unformatted,omitempty"`
	// Indicates whether the key should be exported with \"xml:space=preserve\". Supported by several XML-based formats.
	XmlSpacePreserve *bool `json:"xml_space_preserve,omitempty"`
	// Original file attribute. Used in some formats, e.g. XLIFF.
	OriginalFile string `json:"original_file,omitempty"`
	// NSStringLocalizedFormatKey attribute. Used in .stringsdict format.
	LocalizedFormatString string `json:"localized_format_string,omitempty"`
	// NSStringLocalizedFormatKey attribute. Used in .stringsdict format.
	LocalizedFormatKey string `json:"localized_format_key,omitempty"`
}

KeyUpdateParameters struct for KeyUpdateParameters

type KeysApiService

type KeysApiService service

KeysApiService KeysApi service

func (*KeysApiService) KeyCreate

func (a *KeysApiService) KeyCreate(ctx _context.Context, projectId string, keyCreateParameters KeyCreateParameters, localVarOptionals *KeyCreateOpts) (TranslationKeyDetails, *APIResponse, error)

KeyCreate Create a key Create a new key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyCreateParameters
  • @param optional nil or *KeyCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationKeyDetails

func (*KeysApiService) KeyDelete

func (a *KeysApiService) KeyDelete(ctx _context.Context, projectId string, id string, localVarOptionals *KeyDeleteOpts) ([]byte, *APIResponse, error)

KeyDelete Delete a key Delete an existing key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *KeyDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*KeysApiService) KeyShow

func (a *KeysApiService) KeyShow(ctx _context.Context, projectId string, id string, localVarOptionals *KeyShowOpts) (TranslationKeyDetails, *APIResponse, error)

KeyShow Get a single key Get details on a single key for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *KeyShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return TranslationKeyDetails

func (*KeysApiService) KeyUpdate

func (a *KeysApiService) KeyUpdate(ctx _context.Context, projectId string, id string, keyUpdateParameters KeyUpdateParameters, localVarOptionals *KeyUpdateOpts) (TranslationKeyDetails, *APIResponse, error)

KeyUpdate Update a key Update an existing key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param keyUpdateParameters
  • @param optional nil or *KeyUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationKeyDetails

func (*KeysApiService) KeysDeleteCollection added in v1.0.19

func (a *KeysApiService) KeysDeleteCollection(ctx _context.Context, projectId string, localVarOptionals *KeysDeleteCollectionOpts) (AffectedResources, *APIResponse, error)

KeysDeleteCollection Delete collection of keys Delete all keys matching query. Same constraints as list. Please limit the number of affected keys to about 1,000 as you might experience timeouts otherwise.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *KeysDeleteCollectionOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "Q" (optional.String) - Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
  • @param "LocaleId" (optional.String) - Locale used to determine the translation state of a key when filtering for untranslated or translated keys.

@return AffectedResources

func (*KeysApiService) KeysList

func (a *KeysApiService) KeysList(ctx _context.Context, projectId string, localVarOptionals *KeysListOpts) ([]TranslationKey, *APIResponse, error)

KeysList List keys List all keys for the given project. Alternatively you can POST requests to /search.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *KeysListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "Sort" (optional.String) - Sort by field. Can be one of: name, created_at, updated_at.
  • @param "Order" (optional.String) - Order direction. Can be one of: asc, desc.
  • @param "Q" (optional.String) - Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul> <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li> <li><code>tags:tag_name</code> to filter for keys with certain tags</li> <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
  • @param "LocaleId" (optional.String) - Locale used to determine the translation state of a key when filtering for untranslated or translated keys.

@return []TranslationKey

func (*KeysApiService) KeysSearch

func (a *KeysApiService) KeysSearch(ctx _context.Context, projectId string, keysSearchParameters KeysSearchParameters, localVarOptionals *KeysSearchOpts) ([]TranslationKey, *APIResponse, error)

KeysSearch Search keys Search keys for the given project matching query.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keysSearchParameters
  • @param optional nil or *KeysSearchOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []TranslationKey

func (*KeysApiService) KeysTag

func (a *KeysApiService) KeysTag(ctx _context.Context, projectId string, keysTagParameters KeysTagParameters, localVarOptionals *KeysTagOpts) (AffectedResources, *APIResponse, error)

KeysTag Add tags to collection of keys Tags all keys matching query. Same constraints as list.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keysTagParameters
  • @param optional nil or *KeysTagOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedResources

func (*KeysApiService) KeysUntag

func (a *KeysApiService) KeysUntag(ctx _context.Context, projectId string, keysUntagParameters KeysUntagParameters, localVarOptionals *KeysUntagOpts) (AffectedResources, *APIResponse, error)

KeysUntag Remove tags from collection of keys Removes specified tags from keys matching query.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keysUntagParameters
  • @param optional nil or *KeysUntagOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedResources

type KeysDeleteCollectionOpts added in v1.0.19

type KeysDeleteCollectionOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	Q             optional.String `json:"q,omitempty"`
	LocaleId      optional.String `json:"locale_id,omitempty"`
}

KeysDeleteCollectionOpts Optional parameters for the method 'KeysDeleteCollection'

type KeysListOpts

type KeysListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	Sort          optional.String `json:"sort,omitempty"`
	Order         optional.String `json:"order,omitempty"`
	Q             optional.String `json:"q,omitempty"`
	LocaleId      optional.String `json:"locale_id,omitempty"`
}

KeysListOpts Optional parameters for the method 'KeysList'

type KeysSearchOpts

type KeysSearchOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

KeysSearchOpts Optional parameters for the method 'KeysSearch'

type KeysSearchParameters

type KeysSearchParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Sort by field. Can be one of: name, created_at, updated_at.
	Sort string `json:"sort,omitempty"`
	// Order direction. Can be one of: asc, desc.
	Order string `json:"order,omitempty"`
	// Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul>   <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li>   <li><code>tags:tag_name</code> to filter for keys with certain tags</li>   <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li>   <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
	LocaleId string `json:"locale_id,omitempty"`
}

KeysSearchParameters struct for KeysSearchParameters

type KeysTagOpts

type KeysTagOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

KeysTagOpts Optional parameters for the method 'KeysTag'

type KeysTagParameters

type KeysTagParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul>   <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li>   <li><code>tags:tag_name</code> to filter for keys with certain tags</li>   <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li>   <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
	LocaleId string `json:"locale_id,omitempty"`
	// Tag or comma-separated list of tags to add to the matching collection of keys
	Tags string `json:"tags,omitempty"`
}

KeysTagParameters struct for KeysTagParameters

type KeysUntagOpts

type KeysUntagOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

KeysUntagOpts Optional parameters for the method 'KeysUntag'

type KeysUntagParameters

type KeysUntagParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to do broad search for keys by name (including wildcards).<br><br> The following qualifiers are also supported in the search term:<br> <ul>   <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>name:key_name</code> for text queries on exact key names - whitespaces need to be prefixed with a backspace (\\\"\\\\\\\")</li>   <li><code>tags:tag_name</code> to filter for keys with certain tags</li>   <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li>   <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Locale used to determine the translation state of a key when filtering for untranslated or translated keys.
	LocaleId string `json:"locale_id,omitempty"`
	// Tag or comma-separated list of tags to remove from the matching collection of keys
	Tags string `json:"tags,omitempty"`
}

KeysUntagParameters struct for KeysUntagParameters

type Locale

type Locale struct {
	Id           string        `json:"id,omitempty"`
	Name         string        `json:"name,omitempty"`
	Code         string        `json:"code,omitempty"`
	Default      *bool         `json:"default,omitempty"`
	Main         *bool         `json:"main,omitempty"`
	Rtl          *bool         `json:"rtl,omitempty"`
	PluralForms  []string      `json:"plural_forms,omitempty"`
	SourceLocale LocalePreview `json:"source_locale,omitempty"`
	CreatedAt    time.Time     `json:"created_at,omitempty"`
	UpdatedAt    time.Time     `json:"updated_at,omitempty"`
}

Locale struct for Locale

type LocaleCreateOpts

type LocaleCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

LocaleCreateOpts Optional parameters for the method 'LocaleCreate'

type LocaleCreateParameters

type LocaleCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Locale name
	Name string `json:"name,omitempty"`
	// Locale ISO code
	Code string `json:"code,omitempty"`
	// Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
	Default *bool `json:"default,omitempty"`
	// Indicates whether locale is a main locale. Main locales are part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Verification System</a> feature.
	Main *bool `json:"main,omitempty"`
	// Indicates whether locale is a RTL (Right-to-Left) locale.
	Rtl *bool `json:"rtl,omitempty"`
	// Source locale. Can be the name or public id of the locale. Preferred is the public id.
	SourceLocaleId string `json:"source_locale_id,omitempty"`
	// Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
	UnverifyNewTranslations *bool `json:"unverify_new_translations,omitempty"`
	// Indicates that updated translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
	UnverifyUpdatedTranslations *bool `json:"unverify_updated_translations,omitempty"`
	// If set, translations for this locale will be fetched automatically, right after creation.
	Autotranslate *bool `json:"autotranslate,omitempty"`
}

LocaleCreateParameters struct for LocaleCreateParameters

type LocaleDeleteOpts

type LocaleDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

LocaleDeleteOpts Optional parameters for the method 'LocaleDelete'

type LocaleDetails

type LocaleDetails struct {
	Id           string           `json:"id,omitempty"`
	Name         string           `json:"name,omitempty"`
	Code         string           `json:"code,omitempty"`
	Default      *bool            `json:"default,omitempty"`
	Main         *bool            `json:"main,omitempty"`
	Rtl          *bool            `json:"rtl,omitempty"`
	PluralForms  []string         `json:"plural_forms,omitempty"`
	SourceLocale LocalePreview    `json:"source_locale,omitempty"`
	CreatedAt    time.Time        `json:"created_at,omitempty"`
	UpdatedAt    time.Time        `json:"updated_at,omitempty"`
	Statistics   LocaleStatistics `json:"statistics,omitempty"`
}

LocaleDetails struct for LocaleDetails

type LocaleDetails1

type LocaleDetails1 struct {
	Statistics LocaleStatistics `json:"statistics,omitempty"`
}

LocaleDetails1 struct for LocaleDetails1

type LocaleDownloadOpts

type LocaleDownloadOpts struct {
	XPhraseAppOTP                 optional.String    `json:"X-PhraseApp-OTP,omitempty"`
	Branch                        optional.String    `json:"branch,omitempty"`
	FileFormat                    optional.String    `json:"file_format,omitempty"`
	Tags                          optional.String    `json:"tags,omitempty"`
	Tag                           optional.String    `json:"tag,omitempty"`
	IncludeEmptyTranslations      optional.Bool      `json:"include_empty_translations,omitempty"`
	ExcludeEmptyZeroForms         optional.Bool      `json:"exclude_empty_zero_forms,omitempty"`
	IncludeTranslatedKeys         optional.Bool      `json:"include_translated_keys,omitempty"`
	KeepNotranslateTags           optional.Bool      `json:"keep_notranslate_tags,omitempty"`
	ConvertEmoji                  optional.Bool      `json:"convert_emoji,omitempty"`
	FormatOptions                 optional.Interface `json:"format_options,omitempty"`
	Encoding                      optional.String    `json:"encoding,omitempty"`
	SkipUnverifiedTranslations    optional.Bool      `json:"skip_unverified_translations,omitempty"`
	IncludeUnverifiedTranslations optional.Bool      `json:"include_unverified_translations,omitempty"`
	UseLastReviewedVersion        optional.Bool      `json:"use_last_reviewed_version,omitempty"`
	FallbackLocaleId              optional.String    `json:"fallback_locale_id,omitempty"`
}

LocaleDownloadOpts Optional parameters for the method 'LocaleDownload'

type LocalePreview

type LocalePreview struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Code string `json:"code,omitempty"`
}

LocalePreview struct for LocalePreview

type LocaleShowOpts

type LocaleShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

LocaleShowOpts Optional parameters for the method 'LocaleShow'

type LocaleStatistics

type LocaleStatistics struct {
	KeysTotalCount              int32 `json:"keys_total_count,omitempty"`
	KeysUntranslatedCount       int32 `json:"keys_untranslated_count,omitempty"`
	WordsTotalCount             int32 `json:"words_total_count,omitempty"`
	TranslationsCompletedCount  int32 `json:"translations_completed_count,omitempty"`
	TranslationsUnverifiedCount int32 `json:"translations_unverified_count,omitempty"`
	UnverifiedWordsCount        int32 `json:"unverified_words_count,omitempty"`
	MissingWordsCount           int32 `json:"missing_words_count,omitempty"`
}

LocaleStatistics struct for LocaleStatistics

type LocaleUpdateOpts

type LocaleUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

LocaleUpdateOpts Optional parameters for the method 'LocaleUpdate'

type LocaleUpdateParameters

type LocaleUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Locale name
	Name string `json:"name,omitempty"`
	// Locale ISO code
	Code string `json:"code,omitempty"`
	// Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
	Default *bool `json:"default,omitempty"`
	// Indicates whether locale is a main locale. Main locales are part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Verification System</a> feature.
	Main *bool `json:"main,omitempty"`
	// Indicates whether locale is a RTL (Right-to-Left) locale.
	Rtl *bool `json:"rtl,omitempty"`
	// Source locale. Can be the name or public id of the locale. Preferred is the public id.
	SourceLocaleId string `json:"source_locale_id,omitempty"`
	// Indicates that new translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
	UnverifyNewTranslations *bool `json:"unverify_new_translations,omitempty"`
	// Indicates that updated translations for this locale should be marked as unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
	UnverifyUpdatedTranslations *bool `json:"unverify_updated_translations,omitempty"`
	// If set, translations for this locale will be fetched automatically, right after creation.
	Autotranslate *bool `json:"autotranslate,omitempty"`
}

LocaleUpdateParameters struct for LocaleUpdateParameters

type LocalesApiService

type LocalesApiService service

LocalesApiService LocalesApi service

func (*LocalesApiService) LocaleCreate

func (a *LocalesApiService) LocaleCreate(ctx _context.Context, projectId string, localeCreateParameters LocaleCreateParameters, localVarOptionals *LocaleCreateOpts) (LocaleDetails, *APIResponse, error)

LocaleCreate Create a locale Create a new locale.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param localeCreateParameters
  • @param optional nil or *LocaleCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return LocaleDetails

func (*LocalesApiService) LocaleDelete

func (a *LocalesApiService) LocaleDelete(ctx _context.Context, projectId string, id string, localVarOptionals *LocaleDeleteOpts) ([]byte, *APIResponse, error)

LocaleDelete Delete a locale Delete an existing locale.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *LocaleDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*LocalesApiService) LocaleDownload

func (a *LocalesApiService) LocaleDownload(ctx _context.Context, projectId string, id string, localVarOptionals *LocaleDownloadOpts) ([]byte, *APIResponse, error)

LocaleDownload Download a locale Download a locale in a specific file format.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *LocaleDownloadOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "FileFormat" (optional.String) - File format name. See the format guide for all supported file formats.
  • @param "Tags" (optional.String) - Limit results to keys tagged with a list of comma separated tag names.
  • @param "Tag" (optional.String) - Limit download to tagged keys. This parameter is deprecated. Please use the \"tags\" parameter instead
  • @param "IncludeEmptyTranslations" (optional.Bool) - Indicates whether keys without translations should be included in the output as well.
  • @param "ExcludeEmptyZeroForms" (optional.Bool) - Indicates whether zero forms should be included when empty in pluralized keys.
  • @param "IncludeTranslatedKeys" (optional.Bool) - Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
  • @param "KeepNotranslateTags" (optional.Bool) - Indicates whether [NOTRANSLATE] tags should be kept.
  • @param "ConvertEmoji" (optional.Bool) - This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
  • @param "FormatOptions" (optional.Interface of map[string]interface{}) - Additional formatting and render options. See the <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">format guide</a> for a list of options available for each format. Specify format options like this: <code>...&format_options[foo]=bar</code>
  • @param "Encoding" (optional.String) - Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".
  • @param "SkipUnverifiedTranslations" (optional.Bool) - Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with <code>include_unverified_translations</code>.
  • @param "IncludeUnverifiedTranslations" (optional.Bool) - if set to false unverified translations are excluded
  • @param "UseLastReviewedVersion" (optional.Bool) - If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.
  • @param "FallbackLocaleId" (optional.String) - If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to <code>true</code>.

func (*LocalesApiService) LocaleShow

func (a *LocalesApiService) LocaleShow(ctx _context.Context, projectId string, id string, localVarOptionals *LocaleShowOpts) (LocaleDetails, *APIResponse, error)

LocaleShow Get a single locale Get details on a single locale for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *LocaleShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return LocaleDetails

func (*LocalesApiService) LocaleUpdate

func (a *LocalesApiService) LocaleUpdate(ctx _context.Context, projectId string, id string, localeUpdateParameters LocaleUpdateParameters, localVarOptionals *LocaleUpdateOpts) (LocaleDetails, *APIResponse, error)

LocaleUpdate Update a locale Update an existing locale.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param localeUpdateParameters
  • @param optional nil or *LocaleUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return LocaleDetails

func (*LocalesApiService) LocalesList

func (a *LocalesApiService) LocalesList(ctx _context.Context, projectId string, localVarOptionals *LocalesListOpts) ([]Locale, *APIResponse, error)

LocalesList List locales List all locales for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *LocalesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []Locale

type LocalesListOpts

type LocalesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

LocalesListOpts Optional parameters for the method 'LocalesList'

type Member

type Member struct {
	Id                 string                 `json:"id,omitempty"`
	Email              string                 `json:"email,omitempty"`
	Username           string                 `json:"username,omitempty"`
	Role               string                 `json:"role,omitempty"`
	Projects           []ProjectLocales       `json:"projects,omitempty"`
	Permissions        map[string]interface{} `json:"permissions,omitempty"`
	DefaultLocaleCodes []string               `json:"default_locale_codes,omitempty"`
	Spaces             []MemberSpaces         `json:"spaces,omitempty"`
}

Member struct for Member

type MemberDeleteOpts

type MemberDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

MemberDeleteOpts Optional parameters for the method 'MemberDelete'

type MemberProjectDetail added in v1.0.17

type MemberProjectDetail struct {
	Id                 string                            `json:"id,omitempty"`
	Email              string                            `json:"email,omitempty"`
	Username           string                            `json:"username,omitempty"`
	Role               string                            `json:"role,omitempty"`
	Projects           []ProjectLocales                  `json:"projects,omitempty"`
	Permissions        map[string]interface{}            `json:"permissions,omitempty"`
	LocaleIds          []string                          `json:"locale_ids,omitempty"`
	DefaultLocaleCodes []string                          `json:"default_locale_codes,omitempty"`
	Spaces             []MemberSpaces                    `json:"spaces,omitempty"`
	ProjectRoles       []MemberProjectDetailProjectRoles `json:"project_roles,omitempty"`
}

MemberProjectDetail struct for MemberProjectDetail

type MemberProjectDetailProjectRoles added in v1.0.17

type MemberProjectDetailProjectRoles struct {
	ProjectId string `json:"project_id,omitempty"`
	Role      string `json:"role,omitempty"`
}

MemberProjectDetailProjectRoles struct for MemberProjectDetailProjectRoles

type MemberShowOpts

type MemberShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

MemberShowOpts Optional parameters for the method 'MemberShow'

type MemberSpaces added in v1.0.17

type MemberSpaces struct {
	Id            string      `json:"id,omitempty"`
	Name          string      `json:"name,omitempty"`
	CreatedAt     interface{} `json:"created_at,omitempty"`
	UpdatedAt     interface{} `json:"updated_at,omitempty"`
	ProjectsCount int32       `json:"projects_count,omitempty"`
}

MemberSpaces struct for MemberSpaces

type MemberUpdateOpts

type MemberUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

MemberUpdateOpts Optional parameters for the method 'MemberUpdate'

type MemberUpdateParameters

type MemberUpdateParameters struct {
	// Member role, can be any of of Manager, Developer, Translator
	Role string `json:"role,omitempty"`
	// List of project ids the user has access to.
	ProjectIds string `json:"project_ids,omitempty"`
	// List of locale ids the user has access to.
	LocaleIds string `json:"locale_ids,omitempty"`
	// List of default locales for the user.
	DefaultLocaleCodes []string `json:"default_locale_codes,omitempty"`
	// List of spaces the user is assigned to.
	SpaceIds []string `json:"space_ids,omitempty"`
	// Additional permissions depending on member role. Available permissions are <code>create_upload</code> and <code>review_translations</code>
	Permissions map[string]string `json:"permissions,omitempty"`
}

MemberUpdateParameters struct for MemberUpdateParameters

type MemberUpdateSettingsOpts added in v1.0.17

type MemberUpdateSettingsOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

MemberUpdateSettingsOpts Optional parameters for the method 'MemberUpdateSettings'

type MemberUpdateSettingsParameters added in v1.0.17

type MemberUpdateSettingsParameters struct {
	// Member role, can be any of of Manager, Developer, Translator
	ProjectRole string `json:"project_role,omitempty"`
	// List of locale ids the user has access to.
	LocaleIds []string `json:"locale_ids,omitempty"`
}

MemberUpdateSettingsParameters struct for MemberUpdateSettingsParameters

type MembersApiService

type MembersApiService service

MembersApiService MembersApi service

func (*MembersApiService) MemberDelete

func (a *MembersApiService) MemberDelete(ctx _context.Context, accountId string, id string, localVarOptionals *MemberDeleteOpts) ([]byte, *APIResponse, error)

MemberDelete Remove a user from the account Remove a user from the account. The user will be removed from the account but not deleted from Phrase. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *MemberDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*MembersApiService) MemberShow

func (a *MembersApiService) MemberShow(ctx _context.Context, accountId string, id string, localVarOptionals *MemberShowOpts) (Member, *APIResponse, error)

MemberShow Get single member Get details on a single user in the account. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *MemberShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Member

func (*MembersApiService) MemberUpdate

func (a *MembersApiService) MemberUpdate(ctx _context.Context, accountId string, id string, memberUpdateParameters MemberUpdateParameters, localVarOptionals *MemberUpdateOpts) (Member, *APIResponse, error)

MemberUpdate Update a member Update user permissions in the account. Developers and translators need &lt;code&gt;project_ids&lt;/code&gt; and &lt;code&gt;locale_ids&lt;/code&gt; assigned to access them. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param memberUpdateParameters
  • @param optional nil or *MemberUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Member

func (*MembersApiService) MemberUpdateSettings added in v1.0.17

func (a *MembersApiService) MemberUpdateSettings(ctx _context.Context, projectId string, id string, memberUpdateSettingsParameters MemberUpdateSettingsParameters, localVarOptionals *MemberUpdateSettingsOpts) (MemberProjectDetail, *APIResponse, error)

MemberUpdateSettings Update a member's project settings Update user settings in the project. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param memberUpdateSettingsParameters
  • @param optional nil or *MemberUpdateSettingsOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return MemberProjectDetail

func (*MembersApiService) MembersList

func (a *MembersApiService) MembersList(ctx _context.Context, accountId string, localVarOptionals *MembersListOpts) ([]Member, *APIResponse, error)

MembersList List members Get all users active in the account. It also lists resources like projects and locales the member has access to. In case nothing is shown the default access from the role is used. Access token scope must include &lt;code&gt;team.manage&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *MembersListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Member

type MembersListOpts

type MembersListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

MembersListOpts Optional parameters for the method 'MembersList'

type OrderConfirmOpts

type OrderConfirmOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

OrderConfirmOpts Optional parameters for the method 'OrderConfirm'

type OrderConfirmParameters

type OrderConfirmParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

OrderConfirmParameters struct for OrderConfirmParameters

type OrderCreateOpts

type OrderCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

OrderCreateOpts Optional parameters for the method 'OrderCreate'

type OrderCreateParameters

type OrderCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Name of the LSP that should process this order. Can be one of gengo, textmaster.
	Lsp string `json:"lsp,omitempty"`
	// Source locale for the order. Can be the name or public id of the source locale. Preferred is the public id.
	SourceLocaleId string `json:"source_locale_id,omitempty"`
	// List of target locales you want the source content translate to. Can be the name or public id of the target locales. Preferred is the public id.
	TargetLocaleIds []string `json:"target_locale_ids,omitempty"`
	// Name of the quality level, availability depends on the LSP. Can be one of:  standard, pro (for orders processed by Gengo) and one of regular, premium, enterprise (for orders processed by TextMaster)
	TranslationType string `json:"translation_type,omitempty"`
	// Tag you want to order translations for.
	Tag string `json:"tag,omitempty"`
	// Message that is displayed to the translators for description.
	Message string `json:"message,omitempty"`
	// Style guide for translators to be sent with the order.
	StyleguideId string `json:"styleguide_id,omitempty"`
	// Unverify translations upon delivery.
	UnverifyTranslationsUponDelivery *bool `json:"unverify_translations_upon_delivery,omitempty"`
	// Order translations for keys with untranslated content in the selected target locales.
	IncludeUntranslatedKeys *bool `json:"include_untranslated_keys,omitempty"`
	// Order translations for keys with unverified content in the selected target locales.
	IncludeUnverifiedTranslations *bool `json:"include_unverified_translations,omitempty"`
	// Category to use (required for orders processed by TextMaster).
	Category string `json:"category,omitempty"`
	// Extra proofreading option to ensure consistency in vocabulary and style. Only available for orders processed by TextMaster.
	Quality *bool `json:"quality,omitempty"`
	// Indicates whether the priority option should be ordered which decreases turnaround time by 30%. Available only for orders processed by TextMaster.
	Priority *bool `json:"priority,omitempty"`
}

OrderCreateParameters struct for OrderCreateParameters

type OrderDeleteOpts

type OrderDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

OrderDeleteOpts Optional parameters for the method 'OrderDelete'

type OrderShowOpts

type OrderShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

OrderShowOpts Optional parameters for the method 'OrderShow'

type OrdersApiService

type OrdersApiService service

OrdersApiService OrdersApi service

func (*OrdersApiService) OrderConfirm

func (a *OrdersApiService) OrderConfirm(ctx _context.Context, projectId string, id string, orderConfirmParameters OrderConfirmParameters, localVarOptionals *OrderConfirmOpts) (TranslationOrder, *APIResponse, error)

OrderConfirm Confirm an order Confirm an existing order and send it to the provider for translation. Same constraints as for create.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param orderConfirmParameters
  • @param optional nil or *OrderConfirmOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationOrder

func (*OrdersApiService) OrderCreate

func (a *OrdersApiService) OrderCreate(ctx _context.Context, projectId string, orderCreateParameters OrderCreateParameters, localVarOptionals *OrderCreateOpts) (TranslationOrder, *APIResponse, error)

OrderCreate Create a new order Create a new order. Access token scope must include &lt;code&gt;orders.create&lt;/code&gt;.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param orderCreateParameters
  • @param optional nil or *OrderCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationOrder

func (*OrdersApiService) OrderDelete

func (a *OrdersApiService) OrderDelete(ctx _context.Context, projectId string, id string, localVarOptionals *OrderDeleteOpts) ([]byte, *APIResponse, error)

OrderDelete Cancel an order Cancel an existing order. Must not yet be confirmed.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *OrderDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*OrdersApiService) OrderShow

func (a *OrdersApiService) OrderShow(ctx _context.Context, projectId string, id string, localVarOptionals *OrderShowOpts) (TranslationOrder, *APIResponse, error)

OrderShow Get a single order Get details on a single order.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *OrderShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return TranslationOrder

func (*OrdersApiService) OrdersList

func (a *OrdersApiService) OrdersList(ctx _context.Context, projectId string, localVarOptionals *OrdersListOpts) ([]TranslationOrder, *APIResponse, error)

OrdersList List orders List all orders for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *OrdersListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []TranslationOrder

type OrdersListOpts

type OrdersListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

OrdersListOpts Optional parameters for the method 'OrdersList'

type Project

type Project struct {
	Id              string    `json:"id,omitempty"`
	Name            string    `json:"name,omitempty"`
	Slug            string    `json:"slug,omitempty"`
	MainFormat      string    `json:"main_format,omitempty"`
	ProjectImageUrl string    `json:"project_image_url,omitempty"`
	Account         Account   `json:"account,omitempty"`
	CreatedAt       time.Time `json:"created_at,omitempty"`
	UpdatedAt       time.Time `json:"updated_at,omitempty"`
}

Project struct for Project

type ProjectCreateOpts

type ProjectCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ProjectCreateOpts Optional parameters for the method 'ProjectCreate'

type ProjectCreateParameters

type ProjectCreateParameters struct {
	// Name of the project
	Name string `json:"name,omitempty"`
	// Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">Format Guide</a> or our <a href=\"#formats\">Formats API Endpoint</a>.
	MainFormat string `json:"main_format,omitempty"`
	// Indicates whether the project should share the account's translation memory
	SharesTranslationMemory *bool `json:"shares_translation_memory,omitempty"`
	// Image to identify the project
	ProjectImage *os.File `json:"project_image,omitempty"`
	// Indicates whether the project image should be deleted.
	RemoveProjectImage *bool `json:"remove_project_image,omitempty"`
	// Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
	AccountId string `json:"account_id,omitempty"`
	// When a source project ID is given, a clone of that project will be created, including all locales, keys and translations as well as the main project settings if they are not defined otherwise through the params.
	SourceProjectId string `json:"source_project_id,omitempty"`
}

ProjectCreateParameters struct for ProjectCreateParameters

type ProjectDeleteOpts

type ProjectDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ProjectDeleteOpts Optional parameters for the method 'ProjectDelete'

type ProjectDetails

type ProjectDetails struct {
	Id                      string    `json:"id,omitempty"`
	Name                    string    `json:"name,omitempty"`
	Slug                    string    `json:"slug,omitempty"`
	MainFormat              string    `json:"main_format,omitempty"`
	ProjectImageUrl         string    `json:"project_image_url,omitempty"`
	Account                 Account   `json:"account,omitempty"`
	CreatedAt               time.Time `json:"created_at,omitempty"`
	UpdatedAt               time.Time `json:"updated_at,omitempty"`
	SharesTranslationMemory *bool     `json:"shares_translation_memory,omitempty"`
}

ProjectDetails struct for ProjectDetails

type ProjectDetails1

type ProjectDetails1 struct {
	Slug                    string `json:"slug,omitempty"`
	SharesTranslationMemory *bool  `json:"shares_translation_memory,omitempty"`
}

ProjectDetails1 struct for ProjectDetails1

type ProjectLocales

type ProjectLocales struct {
	Id         string          `json:"id,omitempty"`
	Name       string          `json:"name,omitempty"`
	MainFormat string          `json:"main_format,omitempty"`
	CreatedAt  time.Time       `json:"created_at,omitempty"`
	UpdatedAt  time.Time       `json:"updated_at,omitempty"`
	Locales    []LocalePreview `json:"locales,omitempty"`
}

ProjectLocales struct for ProjectLocales

type ProjectLocales1

type ProjectLocales1 struct {
	Locales []LocalePreview `json:"locales,omitempty"`
}

ProjectLocales1 struct for ProjectLocales1

type ProjectShort

type ProjectShort struct {
	Id         string    `json:"id,omitempty"`
	Name       string    `json:"name,omitempty"`
	MainFormat string    `json:"main_format,omitempty"`
	CreatedAt  time.Time `json:"created_at,omitempty"`
	UpdatedAt  time.Time `json:"updated_at,omitempty"`
}

ProjectShort struct for ProjectShort

type ProjectShowOpts

type ProjectShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ProjectShowOpts Optional parameters for the method 'ProjectShow'

type ProjectUpdateOpts

type ProjectUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ProjectUpdateOpts Optional parameters for the method 'ProjectUpdate'

type ProjectUpdateParameters

type ProjectUpdateParameters struct {
	// Required if the requesting user is a member of multiple accounts. Account ID to specify the actual account the project should be created in.
	AccountId string `json:"account_id,omitempty"`
	// (Optional) Name of the project
	Name string `json:"name,omitempty"`
	// (Optional) Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href=\"https://help.phrase.com/help/supported-platforms-and-formats\">Format Guide</a> or our <a href=\"#formats\">Formats API Endpoint</a>.
	MainFormat string `json:"main_format,omitempty"`
	// (Optional) Indicates whether the project should share the account's translation memory
	SharesTranslationMemory *bool `json:"shares_translation_memory,omitempty"`
	// (Optional) Image to identify the project
	ProjectImage *os.File `json:"project_image,omitempty"`
	// (Optional) Indicates whether the project image should be deleted.
	RemoveProjectImage *bool `json:"remove_project_image,omitempty"`
	// (Optional) Review Workflow. \"simple\" / \"review\". <a href=\"https://help.phrase.com/help/advanced-review-workflow\">Read more</a>
	Workflow string `json:"workflow,omitempty"`
	// (Optional) Enable machine translation support in the project. Required for Autopilot and Smart Suggest
	MachineTranslationEnabled *bool `json:"machine_translation_enabled,omitempty"`
	// (Optional) Enable branching in the project
	EnableBranching *bool `json:"enable_branching,omitempty"`
	// (Optional) Protect the master branch in project where branching is enabled
	ProtectMasterBranch *bool `json:"protect_master_branch,omitempty"`
	// (Optional) Otherwise, translators are not allowed to edit translations other than strings
	EnableAllDataTypeTranslationKeysForTranslators *bool `json:"enable_all_data_type_translation_keys_for_translators,omitempty"`
	// (Optional) We can validate and highlight your ICU messages. <a href=\"https://help.phrase.com/help/icu-message-format\">Read more</a>
	EnableIcuMessageFormat *bool `json:"enable_icu_message_format,omitempty"`
	// (Optional) Displays the input fields for the 'ZERO' plural form for every key as well although only some languages require the 'ZERO' explicitly.
	ZeroPluralFormEnabled *bool `json:"zero_plural_form_enabled,omitempty"`
	// (Optional) Autopilot, requires machine_translation_enabled. <a href=\"https://help.phrase.com/help/autopilot\">Read more</a>
	AutotranslateEnabled *bool `json:"autotranslate_enabled,omitempty"`
	// (Optional) Requires autotranslate_enabled to be true
	AutotranslateCheckNewTranslationKeys *bool `json:"autotranslate_check_new_translation_keys,omitempty"`
	// (Optional) Requires autotranslate_enabled to be true
	AutotranslateCheckNewUploads *bool `json:"autotranslate_check_new_uploads,omitempty"`
	// (Optional) Requires autotranslate_enabled to be true
	AutotranslateCheckNewLocales *bool `json:"autotranslate_check_new_locales,omitempty"`
	// (Optional) Requires autotranslate_enabled to be true
	AutotranslateMarkAsUnverified *bool `json:"autotranslate_mark_as_unverified,omitempty"`
	// (Optional) Requires autotranslate_enabled to be true
	AutotranslateUseMachineTranslation *bool `json:"autotranslate_use_machine_translation,omitempty"`
	// (Optional) Requires autotranslate_enabled to be true
	AutotranslateUseTranslationMemory *bool `json:"autotranslate_use_translation_memory,omitempty"`
	// (Optional) Smart Suggest, requires machine_translation_enabled
	SmartSuggestEnabled *bool `json:"smart_suggest_enabled,omitempty"`
	// (Optional) Requires smart_suggest_enabled to be true
	SmartSuggestUseGlossary *bool `json:"smart_suggest_use_glossary,omitempty"`
	// (Optional) Requires smart_suggest_enabled to be true
	SmartSuggestUseMachineTranslation *bool `json:"smart_suggest_use_machine_translation,omitempty"`
}

ProjectUpdateParameters struct for ProjectUpdateParameters

type ProjectsApiService

type ProjectsApiService service

ProjectsApiService ProjectsApi service

func (*ProjectsApiService) ProjectCreate

func (a *ProjectsApiService) ProjectCreate(ctx _context.Context, projectCreateParameters ProjectCreateParameters, localVarOptionals *ProjectCreateOpts) (ProjectDetails, *APIResponse, error)

ProjectCreate Create a project Create a new project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectCreateParameters
  • @param optional nil or *ProjectCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return ProjectDetails

func (*ProjectsApiService) ProjectDelete

func (a *ProjectsApiService) ProjectDelete(ctx _context.Context, id string, localVarOptionals *ProjectDeleteOpts) ([]byte, *APIResponse, error)

ProjectDelete Delete a project Delete an existing project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *ProjectDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*ProjectsApiService) ProjectShow

func (a *ProjectsApiService) ProjectShow(ctx _context.Context, id string, localVarOptionals *ProjectShowOpts) (ProjectDetails, *APIResponse, error)

ProjectShow Get a single project Get details on a single project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param optional nil or *ProjectShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return ProjectDetails

func (*ProjectsApiService) ProjectUpdate

func (a *ProjectsApiService) ProjectUpdate(ctx _context.Context, id string, projectUpdateParameters ProjectUpdateParameters, localVarOptionals *ProjectUpdateOpts) (ProjectDetails, *APIResponse, error)

ProjectUpdate Update a project Update an existing project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param id ID
  • @param projectUpdateParameters
  • @param optional nil or *ProjectUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return ProjectDetails

func (*ProjectsApiService) ProjectsList

func (a *ProjectsApiService) ProjectsList(ctx _context.Context, localVarOptionals *ProjectsListOpts) ([]Project, *APIResponse, error)

ProjectsList List projects List all projects the current user has access to.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ProjectsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Project

type ProjectsListOpts

type ProjectsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

ProjectsListOpts Optional parameters for the method 'ProjectsList'

type Rate

type Rate struct {
	// The number of requests per hour the client is currently limited to.
	Limit int `json:"limit"`

	// The number of remaining requests the client can make this hour.
	Remaining int `json:"remaining"`

	// The time at which the current rate limit will reset.
	Reset Timestamp `json:"reset"`
}

Rate represents the rate limit for the current client.

type Release

type Release struct {
	Id            string          `json:"id,omitempty"`
	Version       int32           `json:"version,omitempty"`
	AppMinVersion string          `json:"app_min_version,omitempty"`
	AppMaxVersion string          `json:"app_max_version,omitempty"`
	Description   string          `json:"description,omitempty"`
	Platforms     []string        `json:"platforms,omitempty"`
	Environments  []string        `json:"environments,omitempty"`
	Locales       []LocalePreview `json:"locales,omitempty"`
	Project       ProjectShort    `json:"project,omitempty"`
	CreatedAt     time.Time       `json:"created_at,omitempty"`
	UpdatedAt     time.Time       `json:"updated_at,omitempty"`
}

Release struct for Release

type ReleaseCreateOpts

type ReleaseCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ReleaseCreateOpts Optional parameters for the method 'ReleaseCreate'

type ReleaseCreateParameters

type ReleaseCreateParameters struct {
	// Description of the release
	Description string `json:"description,omitempty"`
	// List of platforms the release should support.
	Platforms []string `json:"platforms,omitempty"`
	// Branch used for release
	Branch string `json:"branch,omitempty"`
}

ReleaseCreateParameters struct for ReleaseCreateParameters

type ReleaseDeleteOpts

type ReleaseDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ReleaseDeleteOpts Optional parameters for the method 'ReleaseDelete'

type ReleasePreview

type ReleasePreview struct {
	Id            string       `json:"id,omitempty"`
	Version       int32        `json:"version,omitempty"`
	AppMinVersion string       `json:"app_min_version,omitempty"`
	AppMaxVersion string       `json:"app_max_version,omitempty"`
	Description   string       `json:"description,omitempty"`
	Platforms     []string     `json:"platforms,omitempty"`
	Environments  []string     `json:"environments,omitempty"`
	LocaleCodes   []string     `json:"locale_codes,omitempty"`
	Project       ProjectShort `json:"project,omitempty"`
	CreatedAt     time.Time    `json:"created_at,omitempty"`
	UpdatedAt     time.Time    `json:"updated_at,omitempty"`
}

ReleasePreview struct for ReleasePreview

type ReleasePublishOpts

type ReleasePublishOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ReleasePublishOpts Optional parameters for the method 'ReleasePublish'

type ReleaseShowOpts

type ReleaseShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ReleaseShowOpts Optional parameters for the method 'ReleaseShow'

type ReleaseUpdateOpts

type ReleaseUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ReleaseUpdateOpts Optional parameters for the method 'ReleaseUpdate'

type ReleaseUpdateParameters

type ReleaseUpdateParameters struct {
	// Description of the release
	Description string `json:"description,omitempty"`
	// List of platforms the release should support.
	Platforms []string `json:"platforms,omitempty"`
	// Branch used for release
	Branch string `json:"branch,omitempty"`
}

ReleaseUpdateParameters struct for ReleaseUpdateParameters

type ReleasesApiService

type ReleasesApiService service

ReleasesApiService ReleasesApi service

func (*ReleasesApiService) ReleaseCreate

func (a *ReleasesApiService) ReleaseCreate(ctx _context.Context, accountId string, distributionId string, releaseCreateParameters ReleaseCreateParameters, localVarOptionals *ReleaseCreateOpts) (Release, *APIResponse, error)

ReleaseCreate Create a release Create a new release.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionId Distribution ID
  • @param releaseCreateParameters
  • @param optional nil or *ReleaseCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Release

func (*ReleasesApiService) ReleaseDelete

func (a *ReleasesApiService) ReleaseDelete(ctx _context.Context, accountId string, distributionId string, id string, localVarOptionals *ReleaseDeleteOpts) ([]byte, *APIResponse, error)

ReleaseDelete Delete a release Delete an existing release.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionId Distribution ID
  • @param id ID
  • @param optional nil or *ReleaseDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*ReleasesApiService) ReleasePublish

func (a *ReleasesApiService) ReleasePublish(ctx _context.Context, accountId string, distributionId string, id string, localVarOptionals *ReleasePublishOpts) (Release, *APIResponse, error)

ReleasePublish Publish a release Publish a release for production.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionId Distribution ID
  • @param id ID
  • @param optional nil or *ReleasePublishOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Release

func (*ReleasesApiService) ReleaseShow

func (a *ReleasesApiService) ReleaseShow(ctx _context.Context, accountId string, distributionId string, id string, localVarOptionals *ReleaseShowOpts) (Release, *APIResponse, error)

ReleaseShow Get a single release Get details on a single release.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionId Distribution ID
  • @param id ID
  • @param optional nil or *ReleaseShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Release

func (*ReleasesApiService) ReleaseUpdate

func (a *ReleasesApiService) ReleaseUpdate(ctx _context.Context, accountId string, distributionId string, id string, releaseUpdateParameters ReleaseUpdateParameters, localVarOptionals *ReleaseUpdateOpts) (Release, *APIResponse, error)

ReleaseUpdate Update a release Update an existing release.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionId Distribution ID
  • @param id ID
  • @param releaseUpdateParameters
  • @param optional nil or *ReleaseUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Release

func (*ReleasesApiService) ReleasesList

func (a *ReleasesApiService) ReleasesList(ctx _context.Context, accountId string, distributionId string, localVarOptionals *ReleasesListOpts) ([]ReleasePreview, *APIResponse, error)

ReleasesList List releases List all releases for the given distribution.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param distributionId Distribution ID
  • @param optional nil or *ReleasesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []ReleasePreview

type ReleasesListOpts

type ReleasesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

ReleasesListOpts Optional parameters for the method 'ReleasesList'

type Screenshot

type Screenshot struct {
	Id            string    `json:"id,omitempty"`
	Name          string    `json:"name,omitempty"`
	Description   string    `json:"description,omitempty"`
	ScreenshotUrl string    `json:"screenshot_url,omitempty"`
	CreatedAt     time.Time `json:"created_at,omitempty"`
	UpdatedAt     time.Time `json:"updated_at,omitempty"`
	MarkersCount  int32     `json:"markers_count,omitempty"`
}

Screenshot struct for Screenshot

type ScreenshotCreateOpts

type ScreenshotCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ScreenshotCreateOpts Optional parameters for the method 'ScreenshotCreate'

type ScreenshotCreateParameters

type ScreenshotCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Name of the screenshot
	Name string `json:"name,omitempty"`
	// Description of the screenshot
	Description string `json:"description,omitempty"`
	// Screenshot file
	Filename *os.File `json:"filename,omitempty"`
}

ScreenshotCreateParameters struct for ScreenshotCreateParameters

type ScreenshotDeleteOpts

type ScreenshotDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

ScreenshotDeleteOpts Optional parameters for the method 'ScreenshotDelete'

type ScreenshotMarker

type ScreenshotMarker struct {
	Id               string         `json:"id,omitempty"`
	Presentation     string         `json:"presentation,omitempty"`
	PresentationType string         `json:"presentation_type,omitempty"`
	CreatedAt        time.Time      `json:"created_at,omitempty"`
	UpdatedAt        time.Time      `json:"updated_at,omitempty"`
	TranslationKey   TranslationKey `json:"translation_key,omitempty"`
}

ScreenshotMarker struct for ScreenshotMarker

type ScreenshotMarkerCreateOpts

type ScreenshotMarkerCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ScreenshotMarkerCreateOpts Optional parameters for the method 'ScreenshotMarkerCreate'

type ScreenshotMarkerCreateParameters

type ScreenshotMarkerCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project.
	KeyId string `json:"key_id,omitempty"`
	// Presentation details of the screenshot marker in JSON format.<br/><br/>Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (<code>x</code>-axis and <code>y</code>-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (<code>w</code> and <code>h</code> in pixels).
	Presentation string `json:"presentation,omitempty"`
}

ScreenshotMarkerCreateParameters struct for ScreenshotMarkerCreateParameters

type ScreenshotMarkerDeleteOpts

type ScreenshotMarkerDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

ScreenshotMarkerDeleteOpts Optional parameters for the method 'ScreenshotMarkerDelete'

type ScreenshotMarkerShowOpts

type ScreenshotMarkerShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

ScreenshotMarkerShowOpts Optional parameters for the method 'ScreenshotMarkerShow'

type ScreenshotMarkerUpdateOpts

type ScreenshotMarkerUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ScreenshotMarkerUpdateOpts Optional parameters for the method 'ScreenshotMarkerUpdate'

type ScreenshotMarkerUpdateParameters

type ScreenshotMarkerUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project.
	KeyId string `json:"key_id,omitempty"`
	// Presentation details of the screenshot marker in JSON format.<br/><br/>Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (<code>x</code>-axis and <code>y</code>-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (<code>w</code> and <code>h</code> in pixels).
	Presentation string `json:"presentation,omitempty"`
}

ScreenshotMarkerUpdateParameters struct for ScreenshotMarkerUpdateParameters

type ScreenshotMarkersApiService

type ScreenshotMarkersApiService service

ScreenshotMarkersApiService ScreenshotMarkersApi service

func (*ScreenshotMarkersApiService) ScreenshotMarkerCreate

func (a *ScreenshotMarkersApiService) ScreenshotMarkerCreate(ctx _context.Context, projectId string, screenshotId string, screenshotMarkerCreateParameters ScreenshotMarkerCreateParameters, localVarOptionals *ScreenshotMarkerCreateOpts) (ScreenshotMarker, *APIResponse, error)

ScreenshotMarkerCreate Create a screenshot marker Create a new screenshot marker.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param screenshotId Screenshot ID
  • @param screenshotMarkerCreateParameters
  • @param optional nil or *ScreenshotMarkerCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return ScreenshotMarker

func (*ScreenshotMarkersApiService) ScreenshotMarkerDelete

func (a *ScreenshotMarkersApiService) ScreenshotMarkerDelete(ctx _context.Context, projectId string, screenshotId string, localVarOptionals *ScreenshotMarkerDeleteOpts) ([]byte, *APIResponse, error)

ScreenshotMarkerDelete Delete a screenshot marker Delete an existing screenshot marker.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param screenshotId Screenshot ID
  • @param optional nil or *ScreenshotMarkerDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*ScreenshotMarkersApiService) ScreenshotMarkerShow

func (a *ScreenshotMarkersApiService) ScreenshotMarkerShow(ctx _context.Context, projectId string, screenshotId string, id string, localVarOptionals *ScreenshotMarkerShowOpts) (ScreenshotMarker, *APIResponse, error)

ScreenshotMarkerShow Get a single screenshot marker Get details on a single screenshot marker for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param screenshotId Screenshot ID
  • @param id ID
  • @param optional nil or *ScreenshotMarkerShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return ScreenshotMarker

func (*ScreenshotMarkersApiService) ScreenshotMarkerUpdate

func (a *ScreenshotMarkersApiService) ScreenshotMarkerUpdate(ctx _context.Context, projectId string, screenshotId string, screenshotMarkerUpdateParameters ScreenshotMarkerUpdateParameters, localVarOptionals *ScreenshotMarkerUpdateOpts) (ScreenshotMarker, *APIResponse, error)

ScreenshotMarkerUpdate Update a screenshot marker Update an existing screenshot marker.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param screenshotId Screenshot ID
  • @param screenshotMarkerUpdateParameters
  • @param optional nil or *ScreenshotMarkerUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return ScreenshotMarker

func (*ScreenshotMarkersApiService) ScreenshotMarkersList

func (a *ScreenshotMarkersApiService) ScreenshotMarkersList(ctx _context.Context, projectId string, id string, localVarOptionals *ScreenshotMarkersListOpts) ([]ScreenshotMarker, *APIResponse, error)

ScreenshotMarkersList List screenshot markers List all screenshot markers for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *ScreenshotMarkersListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []ScreenshotMarker

type ScreenshotMarkersListOpts

type ScreenshotMarkersListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

ScreenshotMarkersListOpts Optional parameters for the method 'ScreenshotMarkersList'

type ScreenshotShowOpts

type ScreenshotShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

ScreenshotShowOpts Optional parameters for the method 'ScreenshotShow'

type ScreenshotUpdateOpts

type ScreenshotUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ScreenshotUpdateOpts Optional parameters for the method 'ScreenshotUpdate'

type ScreenshotUpdateParameters

type ScreenshotUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Name of the screenshot
	Name string `json:"name,omitempty"`
	// Description of the screenshot
	Description string `json:"description,omitempty"`
	// Screenshot file
	Filename *os.File `json:"filename,omitempty"`
}

ScreenshotUpdateParameters struct for ScreenshotUpdateParameters

type ScreenshotsApiService

type ScreenshotsApiService service

ScreenshotsApiService ScreenshotsApi service

func (*ScreenshotsApiService) ScreenshotCreate

func (a *ScreenshotsApiService) ScreenshotCreate(ctx _context.Context, projectId string, screenshotCreateParameters ScreenshotCreateParameters, localVarOptionals *ScreenshotCreateOpts) (Screenshot, *APIResponse, error)

ScreenshotCreate Create a screenshot Create a new screenshot.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param screenshotCreateParameters
  • @param optional nil or *ScreenshotCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Screenshot

func (*ScreenshotsApiService) ScreenshotDelete

func (a *ScreenshotsApiService) ScreenshotDelete(ctx _context.Context, projectId string, id string, localVarOptionals *ScreenshotDeleteOpts) ([]byte, *APIResponse, error)

ScreenshotDelete Delete a screenshot Delete an existing screenshot.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *ScreenshotDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*ScreenshotsApiService) ScreenshotShow

func (a *ScreenshotsApiService) ScreenshotShow(ctx _context.Context, projectId string, id string, localVarOptionals *ScreenshotShowOpts) (Screenshot, *APIResponse, error)

ScreenshotShow Get a single screenshot Get details on a single screenshot for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *ScreenshotShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return Screenshot

func (*ScreenshotsApiService) ScreenshotUpdate

func (a *ScreenshotsApiService) ScreenshotUpdate(ctx _context.Context, projectId string, id string, screenshotUpdateParameters ScreenshotUpdateParameters, localVarOptionals *ScreenshotUpdateOpts) (Screenshot, *APIResponse, error)

ScreenshotUpdate Update a screenshot Update an existing screenshot.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param screenshotUpdateParameters
  • @param optional nil or *ScreenshotUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Screenshot

func (*ScreenshotsApiService) ScreenshotsList

func (a *ScreenshotsApiService) ScreenshotsList(ctx _context.Context, projectId string, localVarOptionals *ScreenshotsListOpts) ([]Screenshot, *APIResponse, error)

ScreenshotsList List screenshots List all screenshots for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *ScreenshotsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "KeyId" (optional.String) - filter by key

@return []Screenshot

type ScreenshotsListOpts

type ScreenshotsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	KeyId         optional.String `json:"key_id,omitempty"`
}

ScreenshotsListOpts Optional parameters for the method 'ScreenshotsList'

type ServerConfiguration

type ServerConfiguration struct {
	Url         string
	Description string
	Variables   map[string]ServerVariable
}

ServerConfiguration stores the information about a server

type ServerVariable

type ServerVariable struct {
	Description  string
	DefaultValue string
	EnumValues   []string
}

ServerVariable stores the information about a server variable

type ShowUserOpts

type ShowUserOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

ShowUserOpts Optional parameters for the method 'ShowUser'

type Space

type Space struct {
	Id            string    `json:"id,omitempty"`
	Name          string    `json:"name,omitempty"`
	CreatedAt     time.Time `json:"created_at,omitempty"`
	UpdatedAt     time.Time `json:"updated_at,omitempty"`
	ProjectsCount int32     `json:"projects_count,omitempty"`
	Projects      []Project `json:"projects,omitempty"`
}

Space struct for Space

type SpaceCreateOpts

type SpaceCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

SpaceCreateOpts Optional parameters for the method 'SpaceCreate'

type SpaceCreateParameters

type SpaceCreateParameters struct {
	// Name of the space
	Name string `json:"name,omitempty"`
}

SpaceCreateParameters struct for SpaceCreateParameters

type SpaceDeleteOpts

type SpaceDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

SpaceDeleteOpts Optional parameters for the method 'SpaceDelete'

type SpaceShowOpts

type SpaceShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

SpaceShowOpts Optional parameters for the method 'SpaceShow'

type SpaceUpdateOpts

type SpaceUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

SpaceUpdateOpts Optional parameters for the method 'SpaceUpdate'

type SpaceUpdateParameters

type SpaceUpdateParameters struct {
	// New name of the space
	Name string `json:"name,omitempty"`
}

SpaceUpdateParameters struct for SpaceUpdateParameters

type SpacesApiService

type SpacesApiService service

SpacesApiService SpacesApi service

func (*SpacesApiService) SpaceCreate

func (a *SpacesApiService) SpaceCreate(ctx _context.Context, accountId string, spaceCreateParameters SpaceCreateParameters, localVarOptionals *SpaceCreateOpts) (Space, *APIResponse, error)

SpaceCreate Create a Space Create a new Space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param spaceCreateParameters
  • @param optional nil or *SpaceCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Space

func (*SpacesApiService) SpaceDelete

func (a *SpacesApiService) SpaceDelete(ctx _context.Context, accountId string, id string, localVarOptionals *SpaceDeleteOpts) ([]byte, *APIResponse, error)

SpaceDelete Delete Space Delete the specified Space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *SpaceDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*SpacesApiService) SpaceShow

func (a *SpacesApiService) SpaceShow(ctx _context.Context, accountId string, id string, localVarOptionals *SpaceShowOpts) (Space, *APIResponse, error)

SpaceShow Get Space Show the specified Space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *SpaceShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Space

func (*SpacesApiService) SpaceUpdate

func (a *SpacesApiService) SpaceUpdate(ctx _context.Context, accountId string, id string, spaceUpdateParameters SpaceUpdateParameters, localVarOptionals *SpaceUpdateOpts) (Space, *APIResponse, error)

SpaceUpdate Update Space Update the specified Space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param spaceUpdateParameters
  • @param optional nil or *SpaceUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Space

func (*SpacesApiService) SpacesList

func (a *SpacesApiService) SpacesList(ctx _context.Context, accountId string, localVarOptionals *SpacesListOpts) ([]Space, *APIResponse, error)

SpacesList List Spaces List all Spaces for the given account.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *SpacesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Space

func (*SpacesApiService) SpacesProjectsCreate

func (a *SpacesApiService) SpacesProjectsCreate(ctx _context.Context, accountId string, spaceId string, spacesProjectsCreateParameters SpacesProjectsCreateParameters, localVarOptionals *SpacesProjectsCreateOpts) ([]byte, *APIResponse, error)

SpacesProjectsCreate Add Project Adds an existing project to the space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param spaceId Space ID
  • @param spacesProjectsCreateParameters
  • @param optional nil or *SpacesProjectsCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*SpacesApiService) SpacesProjectsDelete

func (a *SpacesApiService) SpacesProjectsDelete(ctx _context.Context, accountId string, spaceId string, id string, localVarOptionals *SpacesProjectsDeleteOpts) ([]byte, *APIResponse, error)

SpacesProjectsDelete Remove Project Removes a specified project from the specified space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param spaceId Space ID
  • @param id ID
  • @param optional nil or *SpacesProjectsDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*SpacesApiService) SpacesProjectsList

func (a *SpacesApiService) SpacesProjectsList(ctx _context.Context, accountId string, spaceId string, localVarOptionals *SpacesProjectsListOpts) ([]Project, *APIResponse, error)

SpacesProjectsList List Projects List all projects for the specified Space.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param spaceId Space ID
  • @param optional nil or *SpacesProjectsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Project

type SpacesListOpts

type SpacesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

SpacesListOpts Optional parameters for the method 'SpacesList'

type SpacesProjectsCreateOpts

type SpacesProjectsCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

SpacesProjectsCreateOpts Optional parameters for the method 'SpacesProjectsCreate'

type SpacesProjectsCreateParameters

type SpacesProjectsCreateParameters struct {
	// Project ID to add or to the Space
	Id string `json:"id,omitempty"`
}

SpacesProjectsCreateParameters struct for SpacesProjectsCreateParameters

type SpacesProjectsDeleteOpts

type SpacesProjectsDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

SpacesProjectsDeleteOpts Optional parameters for the method 'SpacesProjectsDelete'

type SpacesProjectsListOpts

type SpacesProjectsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

SpacesProjectsListOpts Optional parameters for the method 'SpacesProjectsList'

type StyleGuidesApiService

type StyleGuidesApiService service

StyleGuidesApiService StyleGuidesApi service

func (*StyleGuidesApiService) StyleguideCreate

func (a *StyleGuidesApiService) StyleguideCreate(ctx _context.Context, projectId string, styleguideCreateParameters StyleguideCreateParameters, localVarOptionals *StyleguideCreateOpts) (StyleguideDetails, *APIResponse, error)

StyleguideCreate Create a style guide Create a new style guide.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param styleguideCreateParameters
  • @param optional nil or *StyleguideCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return StyleguideDetails

func (*StyleGuidesApiService) StyleguideDelete

func (a *StyleGuidesApiService) StyleguideDelete(ctx _context.Context, projectId string, id string, localVarOptionals *StyleguideDeleteOpts) ([]byte, *APIResponse, error)

StyleguideDelete Delete a style guide Delete an existing style guide.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *StyleguideDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*StyleGuidesApiService) StyleguideShow

func (a *StyleGuidesApiService) StyleguideShow(ctx _context.Context, projectId string, id string, localVarOptionals *StyleguideShowOpts) (StyleguideDetails, *APIResponse, error)

StyleguideShow Get a single style guide Get details on a single style guide.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *StyleguideShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return StyleguideDetails

func (*StyleGuidesApiService) StyleguideUpdate

func (a *StyleGuidesApiService) StyleguideUpdate(ctx _context.Context, projectId string, id string, styleguideUpdateParameters StyleguideUpdateParameters, localVarOptionals *StyleguideUpdateOpts) (StyleguideDetails, *APIResponse, error)

StyleguideUpdate Update a style guide Update an existing style guide.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param styleguideUpdateParameters
  • @param optional nil or *StyleguideUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return StyleguideDetails

func (*StyleGuidesApiService) StyleguidesList

func (a *StyleGuidesApiService) StyleguidesList(ctx _context.Context, projectId string, localVarOptionals *StyleguidesListOpts) ([]Styleguide, *APIResponse, error)

StyleguidesList List style guides List all styleguides for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *StyleguidesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Styleguide

type Styleguide

type Styleguide struct {
	Id        string    `json:"id,omitempty"`
	Title     string    `json:"title,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

Styleguide struct for Styleguide

type StyleguideCreateOpts

type StyleguideCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

StyleguideCreateOpts Optional parameters for the method 'StyleguideCreate'

type StyleguideCreateParameters

type StyleguideCreateParameters struct {
	// Style guide title
	Title string `json:"title,omitempty"`
	// Audience description
	Audience string `json:"audience,omitempty"`
	// Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.
	TargetAudience string `json:"target_audience,omitempty"`
	// Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.
	GrammaticalPerson string `json:"grammatical_person,omitempty"`
	// Can be one of: not_specified, popular, technical, fictional.
	VocabularyType string `json:"vocabulary_type,omitempty"`
	// Description of the business
	Business string `json:"business,omitempty"`
	// Company branding to remain consistent.
	CompanyBranding string `json:"company_branding,omitempty"`
	// Formatting requirements and character limitations.
	Formatting string `json:"formatting,omitempty"`
	// List of terms and/or phrases that need to be translated consistently.
	GlossaryTerms string `json:"glossary_terms,omitempty"`
	// Formal or informal pronouns, consistent conjugation, grammatical gender
	GrammarConsistency string `json:"grammar_consistency,omitempty"`
	// Can be one of: Cultural/Conversational, Literal, Neutral.
	LiteralTranslation string `json:"literal_translation,omitempty"`
	// Tone requirement descriptions
	OverallTone string `json:"overall_tone,omitempty"`
	// Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.
	Samples string `json:"samples,omitempty"`
}

StyleguideCreateParameters struct for StyleguideCreateParameters

type StyleguideDeleteOpts

type StyleguideDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

StyleguideDeleteOpts Optional parameters for the method 'StyleguideDelete'

type StyleguideDetails

type StyleguideDetails struct {
	Id                 string    `json:"id,omitempty"`
	Title              string    `json:"title,omitempty"`
	CreatedAt          time.Time `json:"created_at,omitempty"`
	UpdatedAt          time.Time `json:"updated_at,omitempty"`
	PublicUrl          string    `json:"public_url,omitempty"`
	Audience           string    `json:"audience,omitempty"`
	TargetAudience     string    `json:"target_audience,omitempty"`
	GrammaticalPerson  string    `json:"grammatical_person,omitempty"`
	VocabularyType     string    `json:"vocabulary_type,omitempty"`
	Business           string    `json:"business,omitempty"`
	CompanyBranding    string    `json:"company_branding,omitempty"`
	Formatting         string    `json:"formatting,omitempty"`
	GlossaryTerms      string    `json:"glossary_terms,omitempty"`
	GrammarConsistency string    `json:"grammar_consistency,omitempty"`
	LiteralTranslation string    `json:"literal_translation,omitempty"`
	OverallTone        string    `json:"overall_tone,omitempty"`
	Samples            string    `json:"samples,omitempty"`
}

StyleguideDetails struct for StyleguideDetails

type StyleguideDetails1

type StyleguideDetails1 struct {
	PublicUrl          string `json:"public_url,omitempty"`
	Audience           string `json:"audience,omitempty"`
	TargetAudience     string `json:"target_audience,omitempty"`
	GrammaticalPerson  string `json:"grammatical_person,omitempty"`
	VocabularyType     string `json:"vocabulary_type,omitempty"`
	Business           string `json:"business,omitempty"`
	CompanyBranding    string `json:"company_branding,omitempty"`
	Formatting         string `json:"formatting,omitempty"`
	GlossaryTerms      string `json:"glossary_terms,omitempty"`
	GrammarConsistency string `json:"grammar_consistency,omitempty"`
	LiteralTranslation string `json:"literal_translation,omitempty"`
	OverallTone        string `json:"overall_tone,omitempty"`
	Samples            string `json:"samples,omitempty"`
}

StyleguideDetails1 struct for StyleguideDetails1

type StyleguidePreview

type StyleguidePreview struct {
	Id    string `json:"id,omitempty"`
	Title string `json:"title,omitempty"`
}

StyleguidePreview struct for StyleguidePreview

type StyleguideShowOpts

type StyleguideShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

StyleguideShowOpts Optional parameters for the method 'StyleguideShow'

type StyleguideUpdateOpts

type StyleguideUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

StyleguideUpdateOpts Optional parameters for the method 'StyleguideUpdate'

type StyleguideUpdateParameters

type StyleguideUpdateParameters struct {
	// Style guide title
	Title string `json:"title,omitempty"`
	// Audience description
	Audience string `json:"audience,omitempty"`
	// Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.
	TargetAudience string `json:"target_audience,omitempty"`
	// Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.
	GrammaticalPerson string `json:"grammatical_person,omitempty"`
	// Can be one of: not_specified, popular, technical, fictional.
	VocabularyType string `json:"vocabulary_type,omitempty"`
	// Description of the business
	Business string `json:"business,omitempty"`
	// Company branding to remain consistent.
	CompanyBranding string `json:"company_branding,omitempty"`
	// Formatting requirements and character limitations.
	Formatting string `json:"formatting,omitempty"`
	// List of terms and/or phrases that need to be translated consistently.
	GlossaryTerms string `json:"glossary_terms,omitempty"`
	// Formal or informal pronouns, consistent conjugation, grammatical gender
	GrammarConsistency string `json:"grammar_consistency,omitempty"`
	// Can be one of: Cultural/Conversational, Literal, Neutral.
	LiteralTranslation string `json:"literal_translation,omitempty"`
	// Tone requirement descriptions
	OverallTone string `json:"overall_tone,omitempty"`
	// Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.
	Samples string `json:"samples,omitempty"`
}

StyleguideUpdateParameters struct for StyleguideUpdateParameters

type StyleguidesListOpts

type StyleguidesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

StyleguidesListOpts Optional parameters for the method 'StyleguidesList'

type Tag

type Tag struct {
	Name      string    `json:"name,omitempty"`
	KeysCount int32     `json:"keys_count,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

Tag struct for Tag

type TagCreateOpts

type TagCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TagCreateOpts Optional parameters for the method 'TagCreate'

type TagCreateParameters

type TagCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Name of the tag
	Name string `json:"name,omitempty"`
}

TagCreateParameters struct for TagCreateParameters

type TagDeleteOpts

type TagDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

TagDeleteOpts Optional parameters for the method 'TagDelete'

type TagShowOpts

type TagShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

TagShowOpts Optional parameters for the method 'TagShow'

type TagWithStats

type TagWithStats struct {
	Name       string                     `json:"name,omitempty"`
	KeysCount  int32                      `json:"keys_count,omitempty"`
	CreatedAt  time.Time                  `json:"created_at,omitempty"`
	UpdatedAt  time.Time                  `json:"updated_at,omitempty"`
	Statistics []TagWithStats1Statistics1 `json:"statistics,omitempty"`
}

TagWithStats struct for TagWithStats

type TagWithStats1

type TagWithStats1 struct {
	Statistics []TagWithStats1Statistics1 `json:"statistics,omitempty"`
}

TagWithStats1 struct for TagWithStats1

type TagWithStats1Statistics

type TagWithStats1Statistics struct {
	KeysTotalCount              int32 `json:"keys_total_count,omitempty"`
	TranslationsCompletedCount  int32 `json:"translations_completed_count,omitempty"`
	TranslationsUnverifiedCount int32 `json:"translations_unverified_count,omitempty"`
	KeysUntranslatedCount       int32 `json:"keys_untranslated_count,omitempty"`
}

TagWithStats1Statistics struct for TagWithStats1Statistics

type TagWithStats1Statistics1

type TagWithStats1Statistics1 struct {
	Locale     LocalePreview           `json:"locale,omitempty"`
	Statistics TagWithStats1Statistics `json:"statistics,omitempty"`
}

TagWithStats1Statistics1 struct for TagWithStats1Statistics1

type TagsApiService

type TagsApiService service

TagsApiService TagsApi service

func (*TagsApiService) TagCreate

func (a *TagsApiService) TagCreate(ctx _context.Context, projectId string, tagCreateParameters TagCreateParameters, localVarOptionals *TagCreateOpts) (TagWithStats, *APIResponse, error)

TagCreate Create a tag Create a new tag.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param tagCreateParameters
  • @param optional nil or *TagCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TagWithStats

func (*TagsApiService) TagDelete

func (a *TagsApiService) TagDelete(ctx _context.Context, projectId string, name string, localVarOptionals *TagDeleteOpts) ([]byte, *APIResponse, error)

TagDelete Delete a tag Delete an existing tag.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *TagDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

func (*TagsApiService) TagShow

func (a *TagsApiService) TagShow(ctx _context.Context, projectId string, name string, localVarOptionals *TagShowOpts) (TagWithStats, *APIResponse, error)

TagShow Get a single tag Get details and progress information on a single tag for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *TagShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return TagWithStats

func (*TagsApiService) TagsList

func (a *TagsApiService) TagsList(ctx _context.Context, projectId string, localVarOptionals *TagsListOpts) ([]Tag, *APIResponse, error)

TagsList List tags List all tags for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *TagsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []Tag

type TagsListOpts

type TagsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

TagsListOpts Optional parameters for the method 'TagsList'

type Team added in v1.0.9

type Team struct {
	Id        string        `json:"id,omitempty"`
	Name      string        `json:"name,omitempty"`
	CreatedAt time.Time     `json:"created_at,omitempty"`
	UpdatedAt time.Time     `json:"updated_at,omitempty"`
	Projects  []Project     `json:"projects,omitempty"`
	Spaces    []Space       `json:"spaces,omitempty"`
	Users     []UserPreview `json:"users,omitempty"`
}

Team struct for Team

type TeamCreateOpts added in v1.0.9

type TeamCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamCreateOpts Optional parameters for the method 'TeamCreate'

type TeamCreateParameters added in v1.0.9

type TeamCreateParameters struct {
	// Name of the team
	Name string `json:"name,omitempty"`
}

TeamCreateParameters struct for TeamCreateParameters

type TeamDeleteOpts added in v1.0.9

type TeamDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamDeleteOpts Optional parameters for the method 'TeamDelete'

type TeamDetail added in v1.0.9

type TeamDetail struct {
	Id        string    `json:"id,omitempty"`
	Name      string    `json:"name,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	Projects  []Project `json:"projects,omitempty"`
	Spaces    []Space   `json:"spaces,omitempty"`
	Users     []User    `json:"users,omitempty"`
}

TeamDetail struct for TeamDetail

type TeamShowOpts added in v1.0.9

type TeamShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamShowOpts Optional parameters for the method 'TeamShow'

type TeamUpdateOpts added in v1.0.9

type TeamUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamUpdateOpts Optional parameters for the method 'TeamUpdate'

type TeamUpdateParameters added in v1.0.9

type TeamUpdateParameters struct {
	// New name of the team
	Name string `json:"name,omitempty"`
}

TeamUpdateParameters struct for TeamUpdateParameters

type TeamsApiService added in v1.0.9

type TeamsApiService service

TeamsApiService TeamsApi service

func (*TeamsApiService) TeamCreate added in v1.0.9

func (a *TeamsApiService) TeamCreate(ctx _context.Context, accountId string, teamCreateParameters TeamCreateParameters, localVarOptionals *TeamCreateOpts) (TeamDetail, *APIResponse, error)

TeamCreate Create a Team Create a new Team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamCreateParameters
  • @param optional nil or *TeamCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TeamDetail

func (*TeamsApiService) TeamDelete added in v1.0.9

func (a *TeamsApiService) TeamDelete(ctx _context.Context, accountId string, id string, localVarOptionals *TeamDeleteOpts) ([]byte, *APIResponse, error)

TeamDelete Delete Team Delete the specified Team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *TeamDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*TeamsApiService) TeamShow added in v1.0.9

func (a *TeamsApiService) TeamShow(ctx _context.Context, accountId string, id string, localVarOptionals *TeamShowOpts) (TeamDetail, *APIResponse, error)

TeamShow Get Team Show the specified Team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param optional nil or *TeamShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TeamDetail

func (*TeamsApiService) TeamUpdate added in v1.0.9

func (a *TeamsApiService) TeamUpdate(ctx _context.Context, accountId string, id string, teamUpdateParameters TeamUpdateParameters, localVarOptionals *TeamUpdateOpts) (TeamDetail, *APIResponse, error)

TeamUpdate Update Team Update the specified Team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param id ID
  • @param teamUpdateParameters
  • @param optional nil or *TeamUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TeamDetail

func (*TeamsApiService) TeamsList added in v1.0.9

func (a *TeamsApiService) TeamsList(ctx _context.Context, accountId string, localVarOptionals *TeamsListOpts) ([]Team, *APIResponse, error)

TeamsList List Teams List all Teams for the given account.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param optional nil or *TeamsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Team

func (*TeamsApiService) TeamsProjectsCreate added in v1.0.9

func (a *TeamsApiService) TeamsProjectsCreate(ctx _context.Context, accountId string, teamId string, teamsProjectsCreateParameters TeamsProjectsCreateParameters, localVarOptionals *TeamsProjectsCreateOpts) ([]byte, *APIResponse, error)

TeamsProjectsCreate Add Project Adds an existing project to the team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamId Team ID
  • @param teamsProjectsCreateParameters
  • @param optional nil or *TeamsProjectsCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*TeamsApiService) TeamsProjectsDelete added in v1.0.9

func (a *TeamsApiService) TeamsProjectsDelete(ctx _context.Context, accountId string, teamId string, id string, localVarOptionals *TeamsProjectsDeleteOpts) ([]byte, *APIResponse, error)

TeamsProjectsDelete Remove Project Removes a specified project from the specified team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamId Team ID
  • @param id ID
  • @param optional nil or *TeamsProjectsDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*TeamsApiService) TeamsSpacesCreate added in v1.0.9

func (a *TeamsApiService) TeamsSpacesCreate(ctx _context.Context, accountId string, teamId string, teamsSpacesCreateParameters TeamsSpacesCreateParameters, localVarOptionals *TeamsSpacesCreateOpts) ([]byte, *APIResponse, error)

TeamsSpacesCreate Add Space Adds an existing space to the team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamId Team ID
  • @param teamsSpacesCreateParameters
  • @param optional nil or *TeamsSpacesCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*TeamsApiService) TeamsSpacesDelete added in v1.0.9

func (a *TeamsApiService) TeamsSpacesDelete(ctx _context.Context, accountId string, teamId string, id string, localVarOptionals *TeamsSpacesDeleteOpts) ([]byte, *APIResponse, error)

TeamsSpacesDelete Remove Space Removes a specified space from the specified team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamId Team ID
  • @param id ID
  • @param optional nil or *TeamsSpacesDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*TeamsApiService) TeamsUsersCreate added in v1.0.9

func (a *TeamsApiService) TeamsUsersCreate(ctx _context.Context, accountId string, teamId string, teamsUsersCreateParameters TeamsUsersCreateParameters, localVarOptionals *TeamsUsersCreateOpts) ([]byte, *APIResponse, error)

TeamsUsersCreate Add User Adds an existing user to the team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamId Team ID
  • @param teamsUsersCreateParameters
  • @param optional nil or *TeamsUsersCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*TeamsApiService) TeamsUsersDelete added in v1.0.9

func (a *TeamsApiService) TeamsUsersDelete(ctx _context.Context, accountId string, teamId string, id string, localVarOptionals *TeamsUsersDeleteOpts) ([]byte, *APIResponse, error)

TeamsUsersDelete Remove User Removes a specified user from the specified team.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param accountId Account ID
  • @param teamId Team ID
  • @param id ID
  • @param optional nil or *TeamsUsersDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

type TeamsListOpts added in v1.0.9

type TeamsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

TeamsListOpts Optional parameters for the method 'TeamsList'

type TeamsProjectsCreateOpts added in v1.0.9

type TeamsProjectsCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamsProjectsCreateOpts Optional parameters for the method 'TeamsProjectsCreate'

type TeamsProjectsCreateParameters added in v1.0.9

type TeamsProjectsCreateParameters struct {
	// Project ID to add to the Team
	Id string `json:"id,omitempty"`
}

TeamsProjectsCreateParameters struct for TeamsProjectsCreateParameters

type TeamsProjectsDeleteOpts added in v1.0.9

type TeamsProjectsDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamsProjectsDeleteOpts Optional parameters for the method 'TeamsProjectsDelete'

type TeamsSpacesCreateOpts added in v1.0.9

type TeamsSpacesCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamsSpacesCreateOpts Optional parameters for the method 'TeamsSpacesCreate'

type TeamsSpacesCreateParameters added in v1.0.9

type TeamsSpacesCreateParameters struct {
	// Space ID to add to the Team
	Id string `json:"id,omitempty"`
}

TeamsSpacesCreateParameters struct for TeamsSpacesCreateParameters

type TeamsSpacesDeleteOpts added in v1.0.9

type TeamsSpacesDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamsSpacesDeleteOpts Optional parameters for the method 'TeamsSpacesDelete'

type TeamsUsersCreateOpts added in v1.0.9

type TeamsUsersCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamsUsersCreateOpts Optional parameters for the method 'TeamsUsersCreate'

type TeamsUsersCreateParameters added in v1.0.9

type TeamsUsersCreateParameters struct {
	// User ID to add to the Team
	Id string `json:"id,omitempty"`
}

TeamsUsersCreateParameters struct for TeamsUsersCreateParameters

type TeamsUsersDeleteOpts added in v1.0.9

type TeamsUsersDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TeamsUsersDeleteOpts Optional parameters for the method 'TeamsUsersDelete'

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or Unix timestamp. This is necessary for some fields since the GitHub API is inconsistent in how it represents times. All exported methods of time.Time can be called on Timestamp.

func (Timestamp) Equal

func (t Timestamp) Equal(u Timestamp) bool

Equal reports whether t and u are equal based on time.Equal

func (Timestamp) String

func (t Timestamp) String() string

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. Time is expected in RFC3339 or Unix format.

type Translation

type Translation struct {
	Id           string        `json:"id,omitempty"`
	Content      string        `json:"content,omitempty"`
	Unverified   *bool         `json:"unverified,omitempty"`
	Excluded     *bool         `json:"excluded,omitempty"`
	PluralSuffix string        `json:"plural_suffix,omitempty"`
	Key          KeyPreview    `json:"key,omitempty"`
	Locale       LocalePreview `json:"locale,omitempty"`
	Placeholders []string      `json:"placeholders,omitempty"`
	State        string        `json:"state,omitempty"`
	CreatedAt    time.Time     `json:"created_at,omitempty"`
	UpdatedAt    time.Time     `json:"updated_at,omitempty"`
}

Translation struct for Translation

type TranslationCreateOpts

type TranslationCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationCreateOpts Optional parameters for the method 'TranslationCreate'

type TranslationCreateParameters

type TranslationCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Locale. Can be the name or public id of the locale. Preferred is the public id.
	LocaleId string `json:"locale_id,omitempty"`
	// Key
	KeyId string `json:"key_id,omitempty"`
	// Translation content
	Content string `json:"content,omitempty"`
	// Plural suffix. Can be one of: zero, one, two, few, many, other. Must be specified if the key associated to the translation is pluralized.
	PluralSuffix string `json:"plural_suffix,omitempty"`
	// Indicates whether translation is unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
	Unverified *bool `json:"unverified,omitempty"`
	// Indicates whether translation is excluded.
	Excluded *bool `json:"excluded,omitempty"`
	// Indicates whether the translation should be auto-translated. Responses with status 422 if provided for translation within a non-default locale or the project does not have the Autopilot feature enabled.
	Autotranslate *bool `json:"autotranslate,omitempty"`
}

TranslationCreateParameters struct for TranslationCreateParameters

type TranslationDetails

type TranslationDetails struct {
	Id           string        `json:"id,omitempty"`
	Content      string        `json:"content,omitempty"`
	Unverified   *bool         `json:"unverified,omitempty"`
	Excluded     *bool         `json:"excluded,omitempty"`
	PluralSuffix string        `json:"plural_suffix,omitempty"`
	Key          KeyPreview    `json:"key,omitempty"`
	Locale       LocalePreview `json:"locale,omitempty"`
	Placeholders []string      `json:"placeholders,omitempty"`
	State        string        `json:"state,omitempty"`
	CreatedAt    time.Time     `json:"created_at,omitempty"`
	UpdatedAt    time.Time     `json:"updated_at,omitempty"`
	User         UserPreview   `json:"user,omitempty"`
	WordCount    int32         `json:"word_count,omitempty"`
}

TranslationDetails struct for TranslationDetails

type TranslationDetails1

type TranslationDetails1 struct {
	User      UserPreview `json:"user,omitempty"`
	WordCount int32       `json:"word_count,omitempty"`
}

TranslationDetails1 struct for TranslationDetails1

type TranslationExcludeOpts

type TranslationExcludeOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationExcludeOpts Optional parameters for the method 'TranslationExclude'

type TranslationExcludeParameters

type TranslationExcludeParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

TranslationExcludeParameters struct for TranslationExcludeParameters

type TranslationIncludeOpts

type TranslationIncludeOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationIncludeOpts Optional parameters for the method 'TranslationInclude'

type TranslationIncludeParameters

type TranslationIncludeParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

TranslationIncludeParameters struct for TranslationIncludeParameters

type TranslationKey

type TranslationKey struct {
	Id          string    `json:"id,omitempty"`
	Name        string    `json:"name,omitempty"`
	Description string    `json:"description,omitempty"`
	NameHash    string    `json:"name_hash,omitempty"`
	Plural      *bool     `json:"plural,omitempty"`
	Tags        []string  `json:"tags,omitempty"`
	DataType    string    `json:"data_type,omitempty"`
	CreatedAt   time.Time `json:"created_at,omitempty"`
	UpdatedAt   time.Time `json:"updated_at,omitempty"`
}

TranslationKey struct for TranslationKey

type TranslationKeyDetails

type TranslationKeyDetails struct {
	Id                   string      `json:"id,omitempty"`
	Name                 string      `json:"name,omitempty"`
	Description          string      `json:"description,omitempty"`
	NameHash             string      `json:"name_hash,omitempty"`
	Plural               *bool       `json:"plural,omitempty"`
	Tags                 []string    `json:"tags,omitempty"`
	DataType             string      `json:"data_type,omitempty"`
	CreatedAt            time.Time   `json:"created_at,omitempty"`
	UpdatedAt            time.Time   `json:"updated_at,omitempty"`
	NamePlural           string      `json:"name_plural,omitempty"`
	CommentsCount        int32       `json:"comments_count,omitempty"`
	MaxCharactersAllowed int32       `json:"max_characters_allowed,omitempty"`
	ScreenshotUrl        string      `json:"screenshot_url,omitempty"`
	Unformatted          *bool       `json:"unformatted,omitempty"`
	XmlSpacePreserve     *bool       `json:"xml_space_preserve,omitempty"`
	OriginalFile         string      `json:"original_file,omitempty"`
	FormatValueType      string      `json:"format_value_type,omitempty"`
	Creator              UserPreview `json:"creator,omitempty"`
}

TranslationKeyDetails struct for TranslationKeyDetails

type TranslationKeyDetails1

type TranslationKeyDetails1 struct {
	NamePlural           string      `json:"name_plural,omitempty"`
	CommentsCount        int32       `json:"comments_count,omitempty"`
	MaxCharactersAllowed int32       `json:"max_characters_allowed,omitempty"`
	ScreenshotUrl        string      `json:"screenshot_url,omitempty"`
	Unformatted          *bool       `json:"unformatted,omitempty"`
	XmlSpacePreserve     *bool       `json:"xml_space_preserve,omitempty"`
	OriginalFile         string      `json:"original_file,omitempty"`
	FormatValueType      string      `json:"format_value_type,omitempty"`
	Creator              UserPreview `json:"creator,omitempty"`
}

TranslationKeyDetails1 struct for TranslationKeyDetails1

type TranslationOrder

type TranslationOrder struct {
	Id                               string            `json:"id,omitempty"`
	Lsp                              string            `json:"lsp,omitempty"`
	AmountInCents                    int32             `json:"amount_in_cents,omitempty"`
	Currency                         string            `json:"currency,omitempty"`
	Message                          string            `json:"message,omitempty"`
	State                            string            `json:"state,omitempty"`
	TranslationType                  string            `json:"translation_type,omitempty"`
	ProgressPercent                  int32             `json:"progress_percent,omitempty"`
	SourceLocale                     LocalePreview     `json:"source_locale,omitempty"`
	TargetLocales                    []LocalePreview   `json:"target_locales,omitempty"`
	Tag                              string            `json:"tag,omitempty"`
	Styleguide                       StyleguidePreview `json:"styleguide,omitempty"`
	UnverifyTranslationsUponDelivery *bool             `json:"unverify_translations_upon_delivery,omitempty"`
	Quality                          *bool             `json:"quality,omitempty"`
	Priority                         *bool             `json:"priority,omitempty"`
	CreatedAt                        time.Time         `json:"created_at,omitempty"`
	UpdatedAt                        time.Time         `json:"updated_at,omitempty"`
}

TranslationOrder struct for TranslationOrder

type TranslationReviewOpts

type TranslationReviewOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationReviewOpts Optional parameters for the method 'TranslationReview'

type TranslationReviewParameters

type TranslationReviewParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

TranslationReviewParameters struct for TranslationReviewParameters

type TranslationShowOpts

type TranslationShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

TranslationShowOpts Optional parameters for the method 'TranslationShow'

type TranslationUnverifyOpts

type TranslationUnverifyOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationUnverifyOpts Optional parameters for the method 'TranslationUnverify'

type TranslationUnverifyParameters

type TranslationUnverifyParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

TranslationUnverifyParameters struct for TranslationUnverifyParameters

type TranslationUpdateOpts

type TranslationUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationUpdateOpts Optional parameters for the method 'TranslationUpdate'

type TranslationUpdateParameters

type TranslationUpdateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Translation content
	Content string `json:"content,omitempty"`
	// Plural suffix. Can be one of: zero, one, two, few, many, other. Must be specified if the key associated to the translation is pluralized.
	PluralSuffix string `json:"plural_suffix,omitempty"`
	// Indicates whether translation is unverified. Part of the <a href=\"https://help.phrase.com/help/verification-and-proofreading\" target=\"_blank\">Advanced Workflows</a> feature.
	Unverified *bool `json:"unverified,omitempty"`
	// Indicates whether translation is excluded.
	Excluded *bool `json:"excluded,omitempty"`
	// Indicates whether the translation should be auto-translated. Responses with status 422 if provided for translation within a non-default locale or the project does not have the Autopilot feature enabled.
	Autotranslate *bool `json:"autotranslate,omitempty"`
}

TranslationUpdateParameters struct for TranslationUpdateParameters

type TranslationVerifyOpts

type TranslationVerifyOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationVerifyOpts Optional parameters for the method 'TranslationVerify'

type TranslationVerifyParameters

type TranslationVerifyParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
}

TranslationVerifyParameters struct for TranslationVerifyParameters

type TranslationVersion

type TranslationVersion struct {
	Id           string        `json:"id,omitempty"`
	Content      string        `json:"content,omitempty"`
	PluralSuffix string        `json:"plural_suffix,omitempty"`
	Key          KeyPreview    `json:"key,omitempty"`
	Locale       LocalePreview `json:"locale,omitempty"`
	CreatedAt    time.Time     `json:"created_at,omitempty"`
	UpdatedAt    time.Time     `json:"updated_at,omitempty"`
	ChangedAt    time.Time     `json:"changed_at,omitempty"`
}

TranslationVersion struct for TranslationVersion

type TranslationVersionWithUser

type TranslationVersionWithUser struct {
	Id           string        `json:"id,omitempty"`
	Content      string        `json:"content,omitempty"`
	PluralSuffix string        `json:"plural_suffix,omitempty"`
	Key          KeyPreview    `json:"key,omitempty"`
	Locale       LocalePreview `json:"locale,omitempty"`
	CreatedAt    time.Time     `json:"created_at,omitempty"`
	UpdatedAt    time.Time     `json:"updated_at,omitempty"`
	ChangedAt    time.Time     `json:"changed_at,omitempty"`
	User         UserPreview   `json:"user,omitempty"`
}

TranslationVersionWithUser struct for TranslationVersionWithUser

type TranslationVersionWithUser1

type TranslationVersionWithUser1 struct {
	User UserPreview `json:"user,omitempty"`
}

TranslationVersionWithUser1 struct for TranslationVersionWithUser1

type TranslationsApiService

type TranslationsApiService service

TranslationsApiService TranslationsApi service

func (*TranslationsApiService) TranslationCreate

func (a *TranslationsApiService) TranslationCreate(ctx _context.Context, projectId string, translationCreateParameters TranslationCreateParameters, localVarOptionals *TranslationCreateOpts) (TranslationDetails, *APIResponse, error)

TranslationCreate Create a translation Create a translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationCreateParameters
  • @param optional nil or *TranslationCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationExclude

func (a *TranslationsApiService) TranslationExclude(ctx _context.Context, projectId string, id string, translationExcludeParameters TranslationExcludeParameters, localVarOptionals *TranslationExcludeOpts) (TranslationDetails, *APIResponse, error)

TranslationExclude Exclude a translation from export Set exclude from export flag on an existing translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param translationExcludeParameters
  • @param optional nil or *TranslationExcludeOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationInclude

func (a *TranslationsApiService) TranslationInclude(ctx _context.Context, projectId string, id string, translationIncludeParameters TranslationIncludeParameters, localVarOptionals *TranslationIncludeOpts) (TranslationDetails, *APIResponse, error)

TranslationInclude Revoke exclusion of a translation in export Remove exclude from export flag from an existing translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param translationIncludeParameters
  • @param optional nil or *TranslationIncludeOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationReview

func (a *TranslationsApiService) TranslationReview(ctx _context.Context, projectId string, id string, translationReviewParameters TranslationReviewParameters, localVarOptionals *TranslationReviewOpts) (TranslationDetails, *APIResponse, error)

TranslationReview Review a translation Mark an existing translation as reviewed.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param translationReviewParameters
  • @param optional nil or *TranslationReviewOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationShow

func (a *TranslationsApiService) TranslationShow(ctx _context.Context, projectId string, id string, localVarOptionals *TranslationShowOpts) (TranslationDetails, *APIResponse, error)

TranslationShow Get a single translation Get details on a single translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *TranslationShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return TranslationDetails

func (*TranslationsApiService) TranslationUnverify

func (a *TranslationsApiService) TranslationUnverify(ctx _context.Context, projectId string, id string, translationUnverifyParameters TranslationUnverifyParameters, localVarOptionals *TranslationUnverifyOpts) (TranslationDetails, *APIResponse, error)

TranslationUnverify Mark a translation as unverified Mark an existing translation as unverified.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param translationUnverifyParameters
  • @param optional nil or *TranslationUnverifyOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationUpdate

func (a *TranslationsApiService) TranslationUpdate(ctx _context.Context, projectId string, id string, translationUpdateParameters TranslationUpdateParameters, localVarOptionals *TranslationUpdateOpts) (TranslationDetails, *APIResponse, error)

TranslationUpdate Update a translation Update an existing translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param translationUpdateParameters
  • @param optional nil or *TranslationUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationVerify

func (a *TranslationsApiService) TranslationVerify(ctx _context.Context, projectId string, id string, translationVerifyParameters TranslationVerifyParameters, localVarOptionals *TranslationVerifyOpts) (TranslationDetails, *APIResponse, error)

TranslationVerify Verify a translation Verify an existing translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param translationVerifyParameters
  • @param optional nil or *TranslationVerifyOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return TranslationDetails

func (*TranslationsApiService) TranslationsByKey

func (a *TranslationsApiService) TranslationsByKey(ctx _context.Context, projectId string, keyId string, localVarOptionals *TranslationsByKeyOpts) ([]Translation, *APIResponse, error)

TranslationsByKey List translations by key List translations for a specific key.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param keyId Translation Key ID
  • @param optional nil or *TranslationsByKeyOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "Sort" (optional.String) - Sort criteria. Can be one of: key_name, created_at, updated_at.
  • @param "Order" (optional.String) - Order direction. Can be one of: asc, desc.
  • @param "Q" (optional.String) - Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.

@return []Translation

func (*TranslationsApiService) TranslationsByLocale

func (a *TranslationsApiService) TranslationsByLocale(ctx _context.Context, projectId string, localeId string, localVarOptionals *TranslationsByLocaleOpts) ([]Translation, *APIResponse, error)

TranslationsByLocale List translations by locale List translations for a specific locale. If you want to download all translations for one locale we recommend to use the &lt;code&gt;locales#download&lt;/code&gt; endpoint.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param localeId Locale ID
  • @param optional nil or *TranslationsByLocaleOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "Sort" (optional.String) - Sort criteria. Can be one of: key_name, created_at, updated_at.
  • @param "Order" (optional.String) - Order direction. Can be one of: asc, desc.
  • @param "Q" (optional.String) - Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.

@return []Translation

func (*TranslationsApiService) TranslationsExcludeCollection added in v1.0.19

func (a *TranslationsApiService) TranslationsExcludeCollection(ctx _context.Context, projectId string, translationsExcludeParameters TranslationsExcludeParameters, localVarOptionals *TranslationsExcludeCollectionOpts) (AffectedCount, *APIResponse, error)

TranslationsExcludeCollection Set exclude from export flag on translations selected by query Exclude translations matching query from locale export.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationsExcludeParameters
  • @param optional nil or *TranslationsExcludeCollectionOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedCount

func (*TranslationsApiService) TranslationsIncludeCollection added in v1.0.19

func (a *TranslationsApiService) TranslationsIncludeCollection(ctx _context.Context, projectId string, translationsIncludeParameters TranslationsIncludeParameters, localVarOptionals *TranslationsIncludeCollectionOpts) (AffectedCount, *APIResponse, error)

TranslationsIncludeCollection Remove exlude from import flag from translations selected by query Include translations matching query in locale export.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationsIncludeParameters
  • @param optional nil or *TranslationsIncludeCollectionOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedCount

func (*TranslationsApiService) TranslationsList

func (a *TranslationsApiService) TranslationsList(ctx _context.Context, projectId string, localVarOptionals *TranslationsListOpts) ([]Translation, *APIResponse, error)

TranslationsList List all translations List translations for the given project. If you want to download all translations for one locale we recommend to use the &lt;code&gt;locales#download&lt;/code&gt; endpoint.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *TranslationsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "Sort" (optional.String) - Sort criteria. Can be one of: key_name, created_at, updated_at.
  • @param "Order" (optional.String) - Order direction. Can be one of: asc, desc.
  • @param "Q" (optional.String) - Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul> <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> <li><code>tags:XYZ</code> for tags on the translation</li> <li><code>unverified:{true|false}</code> for verification status</li> <li><code>excluded:{true|false}</code> for exclusion status</li> <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.

@return []Translation

func (*TranslationsApiService) TranslationsReviewCollection added in v1.0.19

func (a *TranslationsApiService) TranslationsReviewCollection(ctx _context.Context, projectId string, translationsReviewParameters TranslationsReviewParameters, localVarOptionals *TranslationsReviewCollectionOpts) (AffectedCount, *APIResponse, error)

TranslationsReviewCollection Review translations selected by query Review translations matching query.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationsReviewParameters
  • @param optional nil or *TranslationsReviewCollectionOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedCount

func (*TranslationsApiService) TranslationsSearch

func (a *TranslationsApiService) TranslationsSearch(ctx _context.Context, projectId string, translationsSearchParameters TranslationsSearchParameters, localVarOptionals *TranslationsSearchOpts) ([]Translation, *APIResponse, error)

TranslationsSearch Search translations Search translations for the given project. Provides the same search interface as &lt;code&gt;translations#index&lt;/code&gt; but allows POST requests to avoid limitations imposed by GET requests. If you want to download all translations for one locale we recommend to use the &lt;code&gt;locales#download&lt;/code&gt; endpoint.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationsSearchParameters
  • @param optional nil or *TranslationsSearchOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Translation

func (*TranslationsApiService) TranslationsUnverifyCollection added in v1.0.19

func (a *TranslationsApiService) TranslationsUnverifyCollection(ctx _context.Context, projectId string, translationsUnverifyParameters TranslationsUnverifyParameters, localVarOptionals *TranslationsUnverifyCollectionOpts) (AffectedCount, *APIResponse, error)

TranslationsUnverifyCollection Mark translations selected by query as unverified Mark translations matching query as unverified.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationsUnverifyParameters
  • @param optional nil or *TranslationsUnverifyCollectionOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedCount

func (*TranslationsApiService) TranslationsVerifyCollection added in v1.0.19

func (a *TranslationsApiService) TranslationsVerifyCollection(ctx _context.Context, projectId string, translationsVerifyParameters TranslationsVerifyParameters, localVarOptionals *TranslationsVerifyCollectionOpts) (AffectedCount, *APIResponse, error)

TranslationsVerifyCollection Verify translations selected by query Verify translations matching query.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationsVerifyParameters
  • @param optional nil or *TranslationsVerifyCollectionOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return AffectedCount

type TranslationsByKeyOpts

type TranslationsByKeyOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	Sort          optional.String `json:"sort,omitempty"`
	Order         optional.String `json:"order,omitempty"`
	Q             optional.String `json:"q,omitempty"`
}

TranslationsByKeyOpts Optional parameters for the method 'TranslationsByKey'

type TranslationsByLocaleOpts

type TranslationsByLocaleOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	Sort          optional.String `json:"sort,omitempty"`
	Order         optional.String `json:"order,omitempty"`
	Q             optional.String `json:"q,omitempty"`
}

TranslationsByLocaleOpts Optional parameters for the method 'TranslationsByLocale'

type TranslationsExcludeCollectionOpts added in v1.0.19

type TranslationsExcludeCollectionOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationsExcludeCollectionOpts Optional parameters for the method 'TranslationsExcludeCollection'

type TranslationsExcludeParameters

type TranslationsExcludeParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul>   <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>tags:XYZ</code> for tags on the translation</li>   <li><code>unverified:{true|false}</code> for verification status</li>   <li><code>excluded:{true|false}</code> for exclusion status</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Sort criteria. Can be one of: key_name, created_at, updated_at.
	Sort string `json:"sort,omitempty"`
	// Order direction. Can be one of: asc, desc.
	Order string `json:"order,omitempty"`
}

TranslationsExcludeParameters struct for TranslationsExcludeParameters

type TranslationsIncludeCollectionOpts added in v1.0.19

type TranslationsIncludeCollectionOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationsIncludeCollectionOpts Optional parameters for the method 'TranslationsIncludeCollection'

type TranslationsIncludeParameters

type TranslationsIncludeParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul>   <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>tags:XYZ</code> for tags on the translation</li>   <li><code>unverified:{true|false}</code> for verification status</li>   <li><code>excluded:{true|false}</code> for exclusion status</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Sort criteria. Can be one of: key_name, created_at, updated_at.
	Sort string `json:"sort,omitempty"`
	// Order direction. Can be one of: asc, desc.
	Order string `json:"order,omitempty"`
}

TranslationsIncludeParameters struct for TranslationsIncludeParameters

type TranslationsListOpts

type TranslationsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
	Sort          optional.String `json:"sort,omitempty"`
	Order         optional.String `json:"order,omitempty"`
	Q             optional.String `json:"q,omitempty"`
}

TranslationsListOpts Optional parameters for the method 'TranslationsList'

type TranslationsReviewCollectionOpts added in v1.0.19

type TranslationsReviewCollectionOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationsReviewCollectionOpts Optional parameters for the method 'TranslationsReviewCollection'

type TranslationsReviewParameters

type TranslationsReviewParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul>   <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>tags:XYZ</code> for tags on the translation</li>   <li><code>unverified:{true|false}</code> for verification status</li>   <li><code>excluded:{true|false}</code> for exclusion status</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
}

TranslationsReviewParameters struct for TranslationsReviewParameters

type TranslationsSearchOpts

type TranslationsSearchOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

TranslationsSearchOpts Optional parameters for the method 'TranslationsSearch'

type TranslationsSearchParameters

type TranslationsSearchParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Sort criteria. Can be one of: key_name, created_at, updated_at.
	Sort string `json:"sort,omitempty"`
	// Order direction. Can be one of: asc, desc.
	Order string `json:"order,omitempty"`
	// Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul>   <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>tags:XYZ</code> for tags on the translation</li>   <li><code>unverified:{true|false}</code> for verification status</li>   <li><code>excluded:{true|false}</code> for exclusion status</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
}

TranslationsSearchParameters struct for TranslationsSearchParameters

type TranslationsUnverifyCollectionOpts added in v1.0.19

type TranslationsUnverifyCollectionOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationsUnverifyCollectionOpts Optional parameters for the method 'TranslationsUnverifyCollection'

type TranslationsUnverifyParameters

type TranslationsUnverifyParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul>   <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>tags:XYZ</code> for tags on the translation</li>   <li><code>unverified:{true|false}</code> for verification status</li>   <li><code>excluded:{true|false}</code> for exclusion status</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Sort criteria. Can be one of: key_name, created_at, updated_at.
	Sort string `json:"sort,omitempty"`
	// Order direction. Can be one of: asc, desc.
	Order string `json:"order,omitempty"`
}

TranslationsUnverifyParameters struct for TranslationsUnverifyParameters

type TranslationsVerifyCollectionOpts added in v1.0.19

type TranslationsVerifyCollectionOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

TranslationsVerifyCollectionOpts Optional parameters for the method 'TranslationsVerifyCollection'

type TranslationsVerifyParameters

type TranslationsVerifyParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// Specify a query to find translations by content (including wildcards).<br><br> The following qualifiers are supported in the query:<br> <ul>   <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li>   <li><code>tags:XYZ</code> for tags on the translation</li>   <li><code>unverified:{true|false}</code> for verification status</li>   <li><code>excluded:{true|false}</code> for exclusion status</li>   <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> </ul> Find more examples <a href=\"#overview--usage-examples\">here</a>.
	Q string `json:"q,omitempty"`
	// Sort criteria. Can be one of: key_name, created_at, updated_at.
	Sort string `json:"sort,omitempty"`
	// Order direction. Can be one of: asc, desc.
	Order string `json:"order,omitempty"`
}

TranslationsVerifyParameters struct for TranslationsVerifyParameters

type Upload

type Upload struct {
	Id        string        `json:"id,omitempty"`
	Filename  string        `json:"filename,omitempty"`
	Format    string        `json:"format,omitempty"`
	State     string        `json:"state,omitempty"`
	Tag       string        `json:"tag,omitempty"`
	Summary   UploadSummary `json:"summary,omitempty"`
	CreatedAt time.Time     `json:"created_at,omitempty"`
	UpdatedAt time.Time     `json:"updated_at,omitempty"`
}

Upload struct for Upload

type UploadCreateOpts

type UploadCreateOpts struct {
	XPhraseAppOTP      optional.String    `json:"X-PhraseApp-OTP,omitempty"`
	Branch             optional.String    `json:"branch,omitempty"`
	File               optional.Interface `json:"file,omitempty"`
	FileFormat         optional.String    `json:"file_format,omitempty"`
	LocaleId           optional.String    `json:"locale_id,omitempty"`
	Tags               optional.String    `json:"tags,omitempty"`
	UpdateTranslations optional.Bool      `json:"update_translations,omitempty"`
	UpdateDescriptions optional.Bool      `json:"update_descriptions,omitempty"`
	ConvertEmoji       optional.Bool      `json:"convert_emoji,omitempty"`
	SkipUploadTags     optional.Bool      `json:"skip_upload_tags,omitempty"`
	SkipUnverification optional.Bool      `json:"skip_unverification,omitempty"`
	FileEncoding       optional.String    `json:"file_encoding,omitempty"`
	LocaleMapping      optional.Interface `json:"locale_mapping,omitempty"`
	FormatOptions      optional.Interface `json:"format_options,omitempty"`
	Autotranslate      optional.Bool      `json:"autotranslate,omitempty"`
	MarkReviewed       optional.Bool      `json:"mark_reviewed,omitempty"`
}

UploadCreateOpts Optional parameters for the method 'UploadCreate'

type UploadCreateParameters

type UploadCreateParameters struct {
	// specify the branch to use
	Branch string `json:"branch,omitempty"`
	// File to be imported
	File *os.File `json:"file,omitempty"`
	// File format. Auto-detected when possible and not specified.
	FileFormat string `json:"file_format,omitempty"`
	// Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id.
	LocaleId string `json:"locale_id,omitempty"`
	// List of tags separated by comma to be associated with the new keys contained in the upload.
	Tags string `json:"tags,omitempty"`
	// Indicates whether existing translations should be updated with the file content.
	UpdateTranslations *bool `json:"update_translations,omitempty"`
	// Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
	UpdateDescriptions *bool `json:"update_descriptions,omitempty"`
	// This option is obsolete. Providing the option will cause a bad request error.
	ConvertEmoji *bool `json:"convert_emoji,omitempty"`
	// Indicates whether the upload should not create upload tags.
	SkipUploadTags *bool `json:"skip_upload_tags,omitempty"`
	// Indicates whether the upload should unverify updated translations.
	SkipUnverification *bool `json:"skip_unverification,omitempty"`
	// Enforces a specific encoding on the file contents. Valid options are \"UTF-8\", \"UTF-16\" and \"ISO-8859-1\".
	FileEncoding string `json:"file_encoding,omitempty"`
	// Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
	LocaleMapping map[string]interface{} `json:"locale_mapping,omitempty"`
	// Additional options available for specific formats. See our format guide for complete list.
	FormatOptions map[string]interface{} `json:"format_options,omitempty"`
	// If set, translations for the uploaded language will be fetched automatically.
	Autotranslate *bool `json:"autotranslate,omitempty"`
	// Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow (currently beta) is enabled for the project.
	MarkReviewed *bool `json:"mark_reviewed,omitempty"`
}

UploadCreateParameters struct for UploadCreateParameters

type UploadShowOpts

type UploadShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

UploadShowOpts Optional parameters for the method 'UploadShow'

type UploadSummary

type UploadSummary struct {
	LocalesCreated             int32 `json:"locales_created,omitempty"`
	TranslationKeysCreated     int32 `json:"translation_keys_created,omitempty"`
	TranslationKeysUpdated     int32 `json:"translation_keys_updated,omitempty"`
	TranslationKeysUnmentioned int32 `json:"translation_keys_unmentioned,omitempty"`
	TranslationsCreated        int32 `json:"translations_created,omitempty"`
	TranslationsUpdated        int32 `json:"translations_updated,omitempty"`
	TagsCreated                int32 `json:"tags_created,omitempty"`
	TranslationKeysIgnored     int32 `json:"translation_keys_ignored,omitempty"`
}

UploadSummary struct for UploadSummary

type UploadsApiService

type UploadsApiService service

UploadsApiService UploadsApi service

func (*UploadsApiService) UploadCreate

func (a *UploadsApiService) UploadCreate(ctx _context.Context, projectId string, localVarOptionals *UploadCreateOpts) (Upload, *APIResponse, error)

UploadCreate Upload a new file Upload a new language file. Creates necessary resources in your project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *UploadCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use
  • @param "File" (optional.Interface of *os.File) - File to be imported
  • @param "FileFormat" (optional.String) - File format. Auto-detected when possible and not specified.
  • @param "LocaleId" (optional.String) - Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id.
  • @param "Tags" (optional.String) - List of tags separated by comma to be associated with the new keys contained in the upload.
  • @param "UpdateTranslations" (optional.Bool) - Indicates whether existing translations should be updated with the file content.
  • @param "UpdateDescriptions" (optional.Bool) - Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
  • @param "ConvertEmoji" (optional.Bool) - This option is obsolete. Providing the option will cause a bad request error.
  • @param "SkipUploadTags" (optional.Bool) - Indicates whether the upload should not create upload tags.
  • @param "SkipUnverification" (optional.Bool) - Indicates whether the upload should unverify updated translations.
  • @param "FileEncoding" (optional.String) - Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\".
  • @param "LocaleMapping" (optional.Interface of map[string]interface{}) - Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
  • @param "FormatOptions" (optional.Interface of map[string]interface{}) - Additional options available for specific formats. See our format guide for complete list.
  • @param "Autotranslate" (optional.Bool) - If set, translations for the uploaded language will be fetched automatically.
  • @param "MarkReviewed" (optional.Bool) - Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow (currently beta) is enabled for the project.

@return Upload

func (*UploadsApiService) UploadShow

func (a *UploadsApiService) UploadShow(ctx _context.Context, projectId string, id string, localVarOptionals *UploadShowOpts) (Upload, *APIResponse, error)

UploadShow View upload details View details and summary for a single upload.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *UploadShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return Upload

func (*UploadsApiService) UploadsList

func (a *UploadsApiService) UploadsList(ctx _context.Context, projectId string, localVarOptionals *UploadsListOpts) ([]Upload, *APIResponse, error)

UploadsList List uploads List all uploads for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *UploadsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []Upload

type UploadsListOpts

type UploadsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

UploadsListOpts Optional parameters for the method 'UploadsList'

type User

type User struct {
	Id        string    `json:"id,omitempty"`
	Username  string    `json:"username,omitempty"`
	Name      string    `json:"name,omitempty"`
	Email     string    `json:"email,omitempty"`
	Position  string    `json:"position,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

User struct for User

type UserPreview

type UserPreview struct {
	Id       string `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
	Name     string `json:"name,omitempty"`
}

UserPreview struct for UserPreview

type UsersApiService

type UsersApiService service

UsersApiService UsersApi service

func (*UsersApiService) ShowUser

func (a *UsersApiService) ShowUser(ctx _context.Context, localVarOptionals *ShowUserOpts) (CurrentUser, *APIResponse, error)

ShowUser Show current User Show details for current User.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *ShowUserOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return CurrentUser

type Variable added in v1.0.19

type Variable struct {
	Name      string    `json:"name,omitempty"`
	Value     string    `json:"value,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

Variable struct for Variable

type VariableCreateOpts added in v1.0.19

type VariableCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

VariableCreateOpts Optional parameters for the method 'VariableCreate'

type VariableCreateParameters added in v1.0.19

type VariableCreateParameters struct {
	// Name of the variable
	Name string `json:"name,omitempty"`
	// Value of the variable
	Value string `json:"value,omitempty"`
}

VariableCreateParameters struct for VariableCreateParameters

type VariableDeleteOpts added in v1.0.19

type VariableDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

VariableDeleteOpts Optional parameters for the method 'VariableDelete'

type VariableShowOpts added in v1.0.19

type VariableShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

VariableShowOpts Optional parameters for the method 'VariableShow'

type VariableUpdateOpts added in v1.0.19

type VariableUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

VariableUpdateOpts Optional parameters for the method 'VariableUpdate'

type VariableUpdateParameters added in v1.0.19

type VariableUpdateParameters struct {
	// Name of the variable
	Name string `json:"name,omitempty"`
	// Value of the variable
	Value string `json:"value,omitempty"`
}

VariableUpdateParameters struct for VariableUpdateParameters

type VariablesApiService added in v1.0.19

type VariablesApiService service

VariablesApiService VariablesApi service

func (*VariablesApiService) VariableCreate added in v1.0.19

func (a *VariablesApiService) VariableCreate(ctx _context.Context, projectId string, variableCreateParameters VariableCreateParameters, localVarOptionals *VariableCreateOpts) (Variable, *APIResponse, error)

VariableCreate Create a variable Create a new variable.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param variableCreateParameters
  • @param optional nil or *VariableCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Variable

func (*VariablesApiService) VariableDelete added in v1.0.19

func (a *VariablesApiService) VariableDelete(ctx _context.Context, projectId string, name string, localVarOptionals *VariableDeleteOpts) ([]byte, *APIResponse, error)

VariableDelete Delete a variable Delete an existing variable.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *VariableDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*VariablesApiService) VariableShow added in v1.0.19

func (a *VariablesApiService) VariableShow(ctx _context.Context, projectId string, name string, localVarOptionals *VariableShowOpts) (Variable, *APIResponse, error)

VariableShow Get a single variable Get details on a single variable for a given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param optional nil or *VariableShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Variable

func (*VariablesApiService) VariableUpdate added in v1.0.19

func (a *VariablesApiService) VariableUpdate(ctx _context.Context, projectId string, name string, variableUpdateParameters VariableUpdateParameters, localVarOptionals *VariableUpdateOpts) (Variable, *APIResponse, error)

VariableUpdate Update a variable Update an existing variable.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param name name
  • @param variableUpdateParameters
  • @param optional nil or *VariableUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Variable

func (*VariablesApiService) VariablesList added in v1.0.19

func (a *VariablesApiService) VariablesList(ctx _context.Context, projectId string, localVarOptionals *VariablesListOpts) ([]Variable, *APIResponse, error)

VariablesList List variables List all variables for the current project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *VariablesListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Variable

type VariablesListOpts added in v1.0.19

type VariablesListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

VariablesListOpts Optional parameters for the method 'VariablesList'

type VersionShowOpts

type VersionShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

VersionShowOpts Optional parameters for the method 'VersionShow'

type VersionsHistoryApiService

type VersionsHistoryApiService service

VersionsHistoryApiService VersionsHistoryApi service

func (*VersionsHistoryApiService) VersionShow

func (a *VersionsHistoryApiService) VersionShow(ctx _context.Context, projectId string, translationId string, id string, localVarOptionals *VersionShowOpts) (TranslationVersionWithUser, *APIResponse, error)

VersionShow Get a single version Get details on a single version.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationId Translation ID
  • @param id ID
  • @param optional nil or *VersionShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Branch" (optional.String) - specify the branch to use

@return TranslationVersionWithUser

func (*VersionsHistoryApiService) VersionsList

func (a *VersionsHistoryApiService) VersionsList(ctx _context.Context, projectId string, translationId string, localVarOptionals *VersionsListOpts) ([]TranslationVersion, *APIResponse, error)

VersionsList List all versions List all versions for the given translation.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param translationId Translation ID
  • @param optional nil or *VersionsListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default
  • @param "Branch" (optional.String) - specify the branch to use

@return []TranslationVersion

type VersionsListOpts

type VersionsListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
	Branch        optional.String `json:"branch,omitempty"`
}

VersionsListOpts Optional parameters for the method 'VersionsList'

type Webhook

type Webhook struct {
	Id              string    `json:"id,omitempty"`
	CallbackUrl     string    `json:"callback_url,omitempty"`
	Description     string    `json:"description,omitempty"`
	Events          []string  `json:"events,omitempty"`
	Active          *bool     `json:"active,omitempty"`
	IncludeBranches *bool     `json:"include_branches,omitempty"`
	CreatedAt       time.Time `json:"created_at,omitempty"`
	UpdatedAt       time.Time `json:"updated_at,omitempty"`
}

Webhook struct for Webhook

type WebhookCreateOpts

type WebhookCreateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

WebhookCreateOpts Optional parameters for the method 'WebhookCreate'

type WebhookCreateParameters

type WebhookCreateParameters struct {
	// Callback URL to send requests to
	CallbackUrl string `json:"callback_url,omitempty"`
	// Webhook secret used to calculate signature. If empty, the default project secret will be used.
	Secret string `json:"secret,omitempty"`
	// Webhook description
	Description string `json:"description,omitempty"`
	// List of event names to trigger the webhook (separated by comma)
	Events string `json:"events,omitempty"`
	// Whether webhook is active or inactive
	Active *bool `json:"active,omitempty"`
	// If enabled, webhook will also be triggered for events from branches of the project specified.
	IncludeBranches *bool `json:"include_branches,omitempty"`
}

WebhookCreateParameters struct for WebhookCreateParameters

type WebhookDeleteOpts

type WebhookDeleteOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

WebhookDeleteOpts Optional parameters for the method 'WebhookDelete'

type WebhookShowOpts

type WebhookShowOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

WebhookShowOpts Optional parameters for the method 'WebhookShow'

type WebhookTestOpts

type WebhookTestOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

WebhookTestOpts Optional parameters for the method 'WebhookTest'

type WebhookUpdateOpts

type WebhookUpdateOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
}

WebhookUpdateOpts Optional parameters for the method 'WebhookUpdate'

type WebhookUpdateParameters

type WebhookUpdateParameters struct {
	// Callback URL to send requests to
	CallbackUrl string `json:"callback_url,omitempty"`
	// Webhook secret used to calculate signature. If empty, the default project secret will be used.
	Secret string `json:"secret,omitempty"`
	// Webhook description
	Description string `json:"description,omitempty"`
	// List of event names to trigger the webhook (separated by comma)
	Events string `json:"events,omitempty"`
	// Whether webhook is active or inactive
	Active *bool `json:"active,omitempty"`
	// If enabled, webhook will also be triggered for events from branches of the project specified.
	IncludeBranches *bool `json:"include_branches,omitempty"`
}

WebhookUpdateParameters struct for WebhookUpdateParameters

type WebhooksApiService

type WebhooksApiService service

WebhooksApiService WebhooksApi service

func (*WebhooksApiService) WebhookCreate

func (a *WebhooksApiService) WebhookCreate(ctx _context.Context, projectId string, webhookCreateParameters WebhookCreateParameters, localVarOptionals *WebhookCreateOpts) (Webhook, *APIResponse, error)

WebhookCreate Create a webhook Create a new webhook.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param webhookCreateParameters
  • @param optional nil or *WebhookCreateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Webhook

func (*WebhooksApiService) WebhookDelete

func (a *WebhooksApiService) WebhookDelete(ctx _context.Context, projectId string, id string, localVarOptionals *WebhookDeleteOpts) ([]byte, *APIResponse, error)

WebhookDelete Delete a webhook Delete an existing webhook.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *WebhookDeleteOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*WebhooksApiService) WebhookShow

func (a *WebhooksApiService) WebhookShow(ctx _context.Context, projectId string, id string, localVarOptionals *WebhookShowOpts) (Webhook, *APIResponse, error)

WebhookShow Get a single webhook Get details on a single webhook.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *WebhookShowOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Webhook

func (*WebhooksApiService) WebhookTest

func (a *WebhooksApiService) WebhookTest(ctx _context.Context, projectId string, id string, localVarOptionals *WebhookTestOpts) ([]byte, *APIResponse, error)

WebhookTest Test a webhook Perform a test request for a webhook.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param optional nil or *WebhookTestOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

func (*WebhooksApiService) WebhookUpdate

func (a *WebhooksApiService) WebhookUpdate(ctx _context.Context, projectId string, id string, webhookUpdateParameters WebhookUpdateParameters, localVarOptionals *WebhookUpdateOpts) (Webhook, *APIResponse, error)

WebhookUpdate Update a webhook Update an existing webhook.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param id ID
  • @param webhookUpdateParameters
  • @param optional nil or *WebhookUpdateOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)

@return Webhook

func (*WebhooksApiService) WebhooksList

func (a *WebhooksApiService) WebhooksList(ctx _context.Context, projectId string, localVarOptionals *WebhooksListOpts) ([]Webhook, *APIResponse, error)

WebhooksList List webhooks List all webhooks for the given project.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param projectId Project ID
  • @param optional nil or *WebhooksListOpts - Optional Parameters:
  • @param "XPhraseAppOTP" (optional.String) - Two-Factor-Authentication token (optional)
  • @param "Page" (optional.Int32) - Page number
  • @param "PerPage" (optional.Int32) - allows you to specify a page size up to 100 items, 25 by default

@return []Webhook

type WebhooksListOpts

type WebhooksListOpts struct {
	XPhraseAppOTP optional.String `json:"X-PhraseApp-OTP,omitempty"`
	Page          optional.Int32  `json:"page,omitempty"`
	PerPage       optional.Int32  `json:"per_page,omitempty"`
}

WebhooksListOpts Optional parameters for the method 'WebhooksList'

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL