phraseapp

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2018 License: MIT Imports: 20 Imported by: 1

Documentation

Overview

Package phraseapp is a library for easier usage of the PhraseApp API

Index

Constants

View Source
const (
	RevisionDocs      = "f4f82ef6536bb47049b766b4b5b0748a4df05383"
	RevisionGenerator = "HEAD/2018-10-22T141421/stefan"
)

Variables

View Source
var ClientVersion string = "DEV"

Functions

func ConvertToStringMap

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

func GetUserAgent

func GetUserAgent() string

func IsErrNotFound

func IsErrNotFound(err error) bool

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 Account

type Account struct {
	Company   string     `json:"company"`
	CreatedAt *time.Time `json:"created_at"`
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	UpdatedAt *time.Time `json:"updated_at"`
}

type AccountDetails

type AccountDetails struct {
	Account

	Slug string `json:"slug"`
}

type AffectedCount

type AffectedCount struct {
	RecordsAffected int64 `json:"records_affected"`
}

type AffectedResources

type AffectedResources struct {
	RecordsAffected int64 `json:"records_affected"`
}

type Authorization

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

type AuthorizationParams

type AuthorizationParams struct {
	ExpiresAt **time.Time `json:"expires_at,omitempty"  cli:"opt --expires-at"`
	Note      *string     `json:"note,omitempty"  cli:"opt --note"`
	Scopes    []string    `json:"scopes,omitempty"  cli:"opt --scopes"`
}

func (*AuthorizationParams) ApplyValuesFromMap

func (params *AuthorizationParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type AuthorizationWithToken

type AuthorizationWithToken struct {
	Authorization

	Token string `json:"token"`
}

type BitbucketSync

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

type BitbucketSyncExportResponse

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

type BitbucketSyncParams

type BitbucketSyncParams struct {
	AccountID *string `json:"account_id,omitempty"  cli:"opt --account-id"`
}

func (*BitbucketSyncParams) ApplyValuesFromMap

func (params *BitbucketSyncParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type BlacklistedKey

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

type BlacklistedKeyParams

type BlacklistedKeyParams struct {
	Name *string `json:"name,omitempty"  cli:"opt --name"`
}

func (*BlacklistedKeyParams) ApplyValuesFromMap

func (params *BlacklistedKeyParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Branch

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

type BranchMergeParams

type BranchMergeParams struct {
	Strategy *string `json:"strategy,omitempty"  cli:"opt --strategy"`
}

func (*BranchMergeParams) ApplyValuesFromMap

func (params *BranchMergeParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type BranchParams

type BranchParams struct {
	Name *string `json:"name,omitempty"  cli:"opt --name"`
}

func (*BranchParams) ApplyValuesFromMap

func (params *BranchParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CacheConfig

type CacheConfig struct {
	CacheDir     string
	CacheSizeMax int64 // size in bytes
}

CacheConfig contains the configuration for caching api requests on disk

type Client

type Client struct {
	http.Client
	Credentials Credentials
	// contains filtered or unexported fields
}

Client is a generic PhraseApp client. It manages a connection to the PhraseApp API

func NewClient

func NewClient(credentials Credentials, debug bool) (*Client, error)

NewClient initializes a new client. Uses PHRASEAPP_HOST and PHRASEAPP_ACCESS_TOKEN environment variables for host and access token with specified in environment.

func (*Client) AccountShow

func (client *Client) AccountShow(id string) (*AccountDetails, error)

Get details on a single account.

func (*Client) AccountsList

func (client *Client) AccountsList(page, perPage int) ([]*Account, error)

List all accounts the current user has access to.

func (*Client) AuthorizationCreate

func (client *Client) AuthorizationCreate(params *AuthorizationParams) (*AuthorizationWithToken, error)

Create a new authorization.

func (*Client) AuthorizationDelete

func (client *Client) AuthorizationDelete(id string) error

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

func (*Client) AuthorizationShow

func (client *Client) AuthorizationShow(id string) (*Authorization, error)

Get details on a single authorization.

func (*Client) AuthorizationUpdate

func (client *Client) AuthorizationUpdate(id string, params *AuthorizationParams) (*Authorization, error)

Update an existing authorization.

func (*Client) AuthorizationsList

func (client *Client) AuthorizationsList(page, perPage int) ([]*Authorization, error)

List all your authorizations.

func (*Client) BitbucketSyncExport

func (client *Client) BitbucketSyncExport(id string, params *BitbucketSyncParams) (*BitbucketSyncExportResponse, error)

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

func (*Client) BitbucketSyncImport

func (client *Client) BitbucketSyncImport(id string, params *BitbucketSyncParams) error

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

func (*Client) BitbucketSyncsList

func (client *Client) BitbucketSyncsList(page, perPage int, params *BitbucketSyncParams) ([]*BitbucketSync, error)

List all Bitbucket repositories for which synchronisation with PhraseApp is activated.

func (*Client) BlacklistedKeyCreate

func (client *Client) BlacklistedKeyCreate(project_id string, params *BlacklistedKeyParams) (*BlacklistedKey, error)

Create a new rule for blacklisting keys.

func (*Client) BlacklistedKeyDelete

func (client *Client) BlacklistedKeyDelete(project_id, id string) error

Delete an existing rule for blacklisting keys.

func (*Client) BlacklistedKeyShow

func (client *Client) BlacklistedKeyShow(project_id, id string) (*BlacklistedKey, error)

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

func (*Client) BlacklistedKeyUpdate

func (client *Client) BlacklistedKeyUpdate(project_id, id string, params *BlacklistedKeyParams) (*BlacklistedKey, error)

Update an existing rule for blacklisting keys.

func (*Client) BlacklistedKeysList

func (client *Client) BlacklistedKeysList(project_id string, page, perPage int) ([]*BlacklistedKey, error)

List all rules for blacklisting keys for the given project.

func (*Client) BranchCreate

func (client *Client) BranchCreate(project_id string, params *BranchParams) (*Branch, error)

Create a new branch.

func (*Client) BranchDelete

func (client *Client) BranchDelete(project_id, id string) error

Delete an existing branch.

func (*Client) BranchMerge

func (client *Client) BranchMerge(project_id, id string, params *BranchMergeParams) error

Merge an existing branch.

func (*Client) BranchShow

func (client *Client) BranchShow(project_id, id string) (*Branch, error)

Get details on a single branch for a given project.

func (*Client) BranchUpdate

func (client *Client) BranchUpdate(project_id, id string, params *BranchParams) (*Branch, error)

Update an existing branch.

func (*Client) BranchesList

func (client *Client) BranchesList(project_id string, page, perPage int) ([]*Branch, error)

List all branches the of the current project.

func (*Client) CommentCreate

func (client *Client) CommentCreate(project_id, key_id string, params *CommentParams) (*Comment, error)

Create a new comment for a key.

func (*Client) CommentDelete

func (client *Client) CommentDelete(project_id, key_id, id string, params *CommentDeleteParams) error

Delete an existing comment.

func (*Client) CommentMarkCheck

func (client *Client) CommentMarkCheck(project_id, key_id, id string, params *CommentMarkCheckParams) error

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

func (*Client) CommentMarkRead

func (client *Client) CommentMarkRead(project_id, key_id, id string, params *CommentMarkReadParams) error

Mark a comment as read.

func (*Client) CommentMarkUnread

func (client *Client) CommentMarkUnread(project_id, key_id, id string, params *CommentMarkUnreadParams) error

Mark a comment as unread.

func (*Client) CommentShow

func (client *Client) CommentShow(project_id, key_id, id string, params *CommentShowParams) (*Comment, error)

Get details on a single comment.

func (*Client) CommentUpdate

func (client *Client) CommentUpdate(project_id, key_id, id string, params *CommentParams) (*Comment, error)

Update an existing comment.

func (*Client) CommentsList

func (client *Client) CommentsList(project_id, key_id string, page, perPage int, params *CommentsListParams) ([]*Comment, error)

List all comments for a key.

func (*Client) DisableCaching

func (client *Client) DisableCaching()

DisableCaching for API requests

func (*Client) EnableCaching

func (client *Client) EnableCaching(config CacheConfig) error

EnableCaching for API requests on disk via etags

func (*Client) FormatsList

func (client *Client) FormatsList(page, perPage int) ([]*Format, error)

Get a handy list of all localization file formats supported in PhraseApp.

func (*Client) GlossariesList

func (client *Client) GlossariesList(account_id string, page, perPage int) ([]*Glossary, error)

List all glossaries the current user has access to.

func (*Client) GlossaryCreate

func (client *Client) GlossaryCreate(account_id string, params *GlossaryParams) (*Glossary, error)

Create a new glossary.

func (*Client) GlossaryDelete

func (client *Client) GlossaryDelete(account_id, id string) error

Delete an existing glossary.

func (*Client) GlossaryShow

func (client *Client) GlossaryShow(account_id, id string) (*Glossary, error)

Get details on a single glossary.

func (*Client) GlossaryTermCreate

func (client *Client) GlossaryTermCreate(account_id, glossary_id string, params *GlossaryTermParams) (*GlossaryTerm, error)

Create a new glossary term.

func (*Client) GlossaryTermDelete

func (client *Client) GlossaryTermDelete(account_id, glossary_id, id string) error

Delete an existing glossary term.

func (*Client) GlossaryTermShow

func (client *Client) GlossaryTermShow(account_id, glossary_id, id string) (*GlossaryTerm, error)

Get details on a single glossary term.

func (*Client) GlossaryTermTranslationCreate

func (client *Client) GlossaryTermTranslationCreate(account_id, glossary_id, term_id string, params *GlossaryTermTranslationParams) (*GlossaryTermTranslation, error)

Create a new glossary term translation.

func (*Client) GlossaryTermTranslationDelete

func (client *Client) GlossaryTermTranslationDelete(account_id, glossary_id, term_id, id string) error

Delete an existing glossary term translation.

func (*Client) GlossaryTermTranslationUpdate

func (client *Client) GlossaryTermTranslationUpdate(account_id, glossary_id, term_id, id string, params *GlossaryTermTranslationParams) (*GlossaryTermTranslation, error)

Update an existing glossary term translation.

func (*Client) GlossaryTermUpdate

func (client *Client) GlossaryTermUpdate(account_id, glossary_id, id string, params *GlossaryTermParams) (*GlossaryTerm, error)

Update an existing glossary term.

func (*Client) GlossaryTermsList

func (client *Client) GlossaryTermsList(account_id, glossary_id string, page, perPage int) ([]*GlossaryTerm, error)

List all glossary terms the current user has access to.

func (*Client) GlossaryUpdate

func (client *Client) GlossaryUpdate(account_id, id string, params *GlossaryParams) (*Glossary, error)

Update an existing glossary.

func (*Client) InvitationCreate

func (client *Client) InvitationCreate(account_id string, params *InvitationCreateParams) (*Invitation, error)

Invite a person to an account. Developers and translators need <code>project_ids</code> and <code>locale_ids</code> assigned to access them. Access token scope must include <code>team.manage</code>.

func (*Client) InvitationDelete

func (client *Client) InvitationDelete(account_id, id string) error

Delete an existing invitation (must not be accepted yet). Access token scope must include <code>team.manage</code>.

func (*Client) InvitationResend

func (client *Client) InvitationResend(account_id, id string) (*Invitation, error)

Resend the invitation email (must not be accepted yet). Access token scope must include <code>team.manage</code>.

func (*Client) InvitationShow

func (client *Client) InvitationShow(account_id, id string) (*Invitation, error)

Get details on a single invitation. Access token scope must include <code>team.manage</code>.

func (*Client) InvitationUpdate

func (client *Client) InvitationUpdate(account_id, id string, params *InvitationUpdateParams) (*Invitation, error)

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

func (*Client) InvitationsList

func (client *Client) InvitationsList(account_id string, page, perPage int) ([]*Invitation, error)

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 <code>team.manage</code>.

func (*Client) JobComplete

func (client *Client) JobComplete(project_id, id string, params *JobCompleteParams) (*JobDetails, error)

Mark a job as completed.

func (*Client) JobCreate

func (client *Client) JobCreate(project_id string, params *JobParams) (*JobDetails, error)

Create a new job.

func (*Client) JobDelete

func (client *Client) JobDelete(project_id, id string, params *JobDeleteParams) error

Delete an existing job.

func (*Client) JobKeysCreate

func (client *Client) JobKeysCreate(project_id, id string, params *JobKeysCreateParams) (*JobDetails, error)

Add multiple keys to a existing job.

func (*Client) JobKeysDelete

func (client *Client) JobKeysDelete(project_id, id string, params *JobKeysDeleteParams) error

Remove multiple keys from existing job.

func (*Client) JobLocaleComplete

func (client *Client) JobLocaleComplete(project_id, job_id, id string, params *JobLocaleCompleteParams) (*JobLocale, error)

Mark a job locale as completed.

func (*Client) JobLocaleDelete

func (client *Client) JobLocaleDelete(project_id, job_id, id string, params *JobLocaleDeleteParams) error

Delete an existing job locale.

func (*Client) JobLocaleReopen

func (client *Client) JobLocaleReopen(project_id, job_id, id string, params *JobLocaleReopenParams) (*JobLocale, error)

Mark a job locale as uncompleted.

func (*Client) JobLocaleShow

func (client *Client) JobLocaleShow(project_id, job_id, id string, params *JobLocaleShowParams) (*JobLocale, error)

Get a single job locale for a given job.

func (*Client) JobLocaleUpdate

func (client *Client) JobLocaleUpdate(project_id, job_id, id string, params *JobLocaleParams) (*JobLocale, error)

Update an existing job locale.

func (*Client) JobLocalesCreate

func (client *Client) JobLocalesCreate(project_id, job_id string, params *JobLocaleParams) (*JobLocale, error)

Create a new job locale.

func (*Client) JobLocalesList

func (client *Client) JobLocalesList(project_id, job_id string, page, perPage int, params *JobLocalesListParams) ([]*JobLocale, error)

List all job locales for a given job.

func (*Client) JobReopen

func (client *Client) JobReopen(project_id, id string, params *JobReopenParams) (*JobDetails, error)

Mark a job as uncompleted.

func (*Client) JobShow

func (client *Client) JobShow(project_id, id string, params *JobShowParams) (*JobDetails, error)

Get details on a single job for a given project.

func (*Client) JobStart

func (client *Client) JobStart(project_id, id string, params *JobStartParams) (*JobDetails, error)

Starts an existing job in state draft.

func (*Client) JobUpdate

func (client *Client) JobUpdate(project_id, id string, params *JobUpdateParams) (*JobDetails, error)

Update an existing job.

func (*Client) JobsList

func (client *Client) JobsList(project_id string, page, perPage int, params *JobsListParams) ([]*Job, error)

List all jobs for the given project.

func (*Client) KeyCreate

func (client *Client) KeyCreate(project_id string, params *TranslationKeyParams) (*TranslationKeyDetails, error)

Create a new key.

func (*Client) KeyDelete

func (client *Client) KeyDelete(project_id, id string, params *KeyDeleteParams) error

Delete an existing key.

func (*Client) KeyShow

func (client *Client) KeyShow(project_id, id string, params *KeyShowParams) (*TranslationKeyDetails, error)

Get details on a single key for a given project.

func (*Client) KeyUpdate

func (client *Client) KeyUpdate(project_id, id string, params *TranslationKeyParams) (*TranslationKeyDetails, error)

Update an existing key.

func (*Client) KeysDelete

func (client *Client) KeysDelete(project_id string, params *KeysDeleteParams) (*AffectedResources, error)

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.

func (*Client) KeysList

func (client *Client) KeysList(project_id string, page, perPage int, params *KeysListParams) ([]*TranslationKey, error)

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

func (*Client) KeysSearch

func (client *Client) KeysSearch(project_id string, page, perPage int, params *KeysSearchParams) ([]*TranslationKey, error)

Search keys for the given project matching query.

func (*Client) KeysTag

func (client *Client) KeysTag(project_id string, params *KeysTagParams) (*AffectedResources, error)

Tags all keys matching query. Same constraints as list.

func (*Client) KeysUntag

func (client *Client) KeysUntag(project_id string, params *KeysUntagParams) (*AffectedResources, error)

Removes specified tags from keys matching query.

func (*Client) LocaleCreate

func (client *Client) LocaleCreate(project_id string, params *LocaleParams) (*LocaleDetails, error)

Create a new locale.

func (*Client) LocaleDelete

func (client *Client) LocaleDelete(project_id, id string, params *LocaleDeleteParams) error

Delete an existing locale.

func (*Client) LocaleDownload

func (client *Client) LocaleDownload(project_id, id string, params *LocaleDownloadParams) ([]byte, error)

Download a locale in a specific file format.

func (*Client) LocaleShow

func (client *Client) LocaleShow(project_id, id string, params *LocaleShowParams) (*LocaleDetails, error)

Get details on a single locale for a given project.

func (*Client) LocaleUpdate

func (client *Client) LocaleUpdate(project_id, id string, params *LocaleParams) (*LocaleDetails, error)

Update an existing locale.

func (*Client) LocalesList

func (client *Client) LocalesList(project_id string, page, perPage int, params *LocalesListParams) ([]*Locale, error)

List all locales for the given project.

func (*Client) MemberDelete

func (client *Client) MemberDelete(account_id, id string) error

Remove a user from the account. The user will be removed from the account but not deleted from PhraseApp. Access token scope must include <code>team.manage</code>.

func (*Client) MemberShow

func (client *Client) MemberShow(account_id, id string) (*Member, error)

Get details on a single user in the account. Access token scope must include <code>team.manage</code>.

func (*Client) MemberUpdate

func (client *Client) MemberUpdate(account_id, id string, params *MemberUpdateParams) (*Member, error)

Update user permissions in the account. Developers and translators need <code>project_ids</code> and <code>locale_ids</code> assigned to access them. Access token scope must include <code>team.manage</code>.

func (*Client) MembersList

func (client *Client) MembersList(account_id string, page, perPage int) ([]*Member, error)

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 <code>team.manage</code>.

func (*Client) OrderConfirm

func (client *Client) OrderConfirm(project_id, id string, params *OrderConfirmParams) (*TranslationOrder, error)

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

func (*Client) OrderCreate

func (client *Client) OrderCreate(project_id string, params *TranslationOrderParams) (*TranslationOrder, error)

Create a new order. Access token scope must include <code>orders.create</code>.

func (*Client) OrderDelete

func (client *Client) OrderDelete(project_id, id string, params *OrderDeleteParams) error

Cancel an existing order. Must not yet be confirmed.

func (*Client) OrderShow

func (client *Client) OrderShow(project_id, id string, params *OrderShowParams) (*TranslationOrder, error)

Get details on a single order.

func (*Client) OrdersList

func (client *Client) OrdersList(project_id string, page, perPage int, params *OrdersListParams) ([]*TranslationOrder, error)

List all orders for the given project.

func (*Client) ProjectCreate

func (client *Client) ProjectCreate(params *ProjectParams) (*ProjectDetails, error)

Create a new project.

func (*Client) ProjectDelete

func (client *Client) ProjectDelete(id string) error

Delete an existing project.

func (*Client) ProjectShow

func (client *Client) ProjectShow(id string) (*ProjectDetails, error)

Get details on a single project.

func (*Client) ProjectUpdate

func (client *Client) ProjectUpdate(id string, params *ProjectParams) (*ProjectDetails, error)

Update an existing project.

func (*Client) ProjectsList

func (client *Client) ProjectsList(page, perPage int) ([]*Project, error)

List all projects the current user has access to.

func (*Client) ShowUser

func (client *Client) ShowUser() (*User, error)

Show details for current User.

func (*Client) StyleguideCreate

func (client *Client) StyleguideCreate(project_id string, params *StyleguideParams) (*StyleguideDetails, error)

Create a new style guide.

func (*Client) StyleguideDelete

func (client *Client) StyleguideDelete(project_id, id string) error

Delete an existing style guide.

func (*Client) StyleguideShow

func (client *Client) StyleguideShow(project_id, id string) (*StyleguideDetails, error)

Get details on a single style guide.

func (*Client) StyleguideUpdate

func (client *Client) StyleguideUpdate(project_id, id string, params *StyleguideParams) (*StyleguideDetails, error)

Update an existing style guide.

func (*Client) StyleguidesList

func (client *Client) StyleguidesList(project_id string, page, perPage int) ([]*Styleguide, error)

List all styleguides for the given project.

func (*Client) TagCreate

func (client *Client) TagCreate(project_id string, params *TagParams) (*TagWithStats, error)

Create a new tag.

func (*Client) TagDelete

func (client *Client) TagDelete(project_id, name string, params *TagDeleteParams) error

Delete an existing tag.

func (*Client) TagShow

func (client *Client) TagShow(project_id, name string, params *TagShowParams) (*TagWithStats, error)

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

func (*Client) TagsList

func (client *Client) TagsList(project_id string, page, perPage int, params *TagsListParams) ([]*Tag, error)

List all tags for the given project.

func (*Client) TranslationCreate

func (client *Client) TranslationCreate(project_id string, params *TranslationParams) (*TranslationDetails, error)

Create a translation.

func (*Client) TranslationShow

func (client *Client) TranslationShow(project_id, id string, params *TranslationShowParams) (*TranslationDetails, error)

Get details on a single translation.

func (*Client) TranslationUpdate

func (client *Client) TranslationUpdate(project_id, id string, params *TranslationUpdateParams) (*TranslationDetails, error)

Update an existing translation.

func (*Client) TranslationsByKey

func (client *Client) TranslationsByKey(project_id, key_id string, page, perPage int, params *TranslationsByKeyParams) ([]*Translation, error)

List translations for a specific key.

func (*Client) TranslationsByLocale

func (client *Client) TranslationsByLocale(project_id, locale_id string, page, perPage int, params *TranslationsByLocaleParams) ([]*Translation, error)

List translations for a specific locale. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.

func (*Client) TranslationsExclude

func (client *Client) TranslationsExclude(project_id string, params *TranslationsExcludeParams) (*AffectedCount, error)

Exclude translations matching query from locale export.

func (*Client) TranslationsInclude

func (client *Client) TranslationsInclude(project_id string, params *TranslationsIncludeParams) (*AffectedCount, error)

Include translations matching query in locale export.

func (*Client) TranslationsList

func (client *Client) TranslationsList(project_id string, page, perPage int, params *TranslationsListParams) ([]*Translation, error)

List translations for the given project. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.

func (*Client) TranslationsSearch

func (client *Client) TranslationsSearch(project_id string, page, perPage int, params *TranslationsSearchParams) ([]*Translation, error)

List translations for the given project if you exceed GET request limitations on translations list. If you want to download all translations for one locale we recommend to use the <code>locales#download</code> endpoint.

func (*Client) TranslationsUnverify

func (client *Client) TranslationsUnverify(project_id string, params *TranslationsUnverifyParams) (*AffectedCount, error)

Mark translations matching query as unverified.

func (*Client) TranslationsVerify

func (client *Client) TranslationsVerify(project_id string, params *TranslationsVerifyParams) (*AffectedCount, error)

Verify translations matching query.

func (*Client) UploadCreate

func (client *Client) UploadCreate(project_id string, params *UploadParams) (*Upload, error)

Upload a new language file. Creates necessary resources in your project.

func (*Client) UploadShow

func (client *Client) UploadShow(project_id, id string, params *UploadShowParams) (*Upload, error)

View details and summary for a single upload.

func (*Client) UploadsList

func (client *Client) UploadsList(project_id string, page, perPage int, params *UploadsListParams) ([]*Upload, error)

List all uploads for the given project.

func (*Client) VersionShow

func (client *Client) VersionShow(project_id, translation_id, id string, params *VersionShowParams) (*TranslationVersionWithUser, error)

Get details on a single version.

func (*Client) VersionsList

func (client *Client) VersionsList(project_id, translation_id string, page, perPage int, params *VersionsListParams) ([]*TranslationVersion, error)

List all versions for the given translation.

func (*Client) WebhookCreate

func (client *Client) WebhookCreate(project_id string, params *WebhookParams) (*Webhook, error)

Create a new webhook.

func (*Client) WebhookDelete

func (client *Client) WebhookDelete(project_id, id string) error

Delete an existing webhook.

func (*Client) WebhookShow

func (client *Client) WebhookShow(project_id, id string) (*Webhook, error)

Get details on a single webhook.

func (*Client) WebhookTest

func (client *Client) WebhookTest(project_id, id string) error

Perform a test request for a webhook.

func (*Client) WebhookUpdate

func (client *Client) WebhookUpdate(project_id, id string, params *WebhookParams) (*Webhook, error)

Update an existing webhook.

func (*Client) WebhooksList

func (client *Client) WebhooksList(project_id string, page, perPage int) ([]*Webhook, error)

List all webhooks for the given project.

type Comment

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

type CommentDeleteParams

type CommentDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*CommentDeleteParams) ApplyValuesFromMap

func (params *CommentDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CommentMarkCheckParams

type CommentMarkCheckParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*CommentMarkCheckParams) ApplyValuesFromMap

func (params *CommentMarkCheckParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CommentMarkReadParams

type CommentMarkReadParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*CommentMarkReadParams) ApplyValuesFromMap

func (params *CommentMarkReadParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CommentMarkUnreadParams

type CommentMarkUnreadParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*CommentMarkUnreadParams) ApplyValuesFromMap

func (params *CommentMarkUnreadParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CommentParams

type CommentParams struct {
	Branch  *string `json:"branch,omitempty"  cli:"opt --branch"`
	Message *string `json:"message,omitempty"  cli:"opt --message"`
}

func (*CommentParams) ApplyValuesFromMap

func (params *CommentParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CommentShowParams

type CommentShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*CommentShowParams) ApplyValuesFromMap

func (params *CommentShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type CommentsListParams

type CommentsListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*CommentsListParams) ApplyValuesFromMap

func (params *CommentsListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Config

type Config struct {
	Credentials
	Debug bool `cli:"opt --verbose -v desc='Verbose output'"`

	Page    *int
	PerPage *int

	DefaultProjectID  string
	DefaultFileFormat string

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

	Targets []byte
	Sources []byte
}

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

func ReadConfig

func ReadConfig() (*Config, error)

ReadConfig reads a .phraseapp.yml config file

func (*Config) UnmarshalYAML

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

type Credentials

type Credentials struct {
	Username string `cli:"opt --username -u desc='username used for authentication'"`
	Token    string `cli:"opt --access-token -t desc='access token used for authentication'"`
	TFA      bool   `cli:"opt --tfa desc='use Two-Factor Authentication'"`
	Host     string `cli:"opt --host desc='Host to send Request to'"`
}

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

type ErrNotFound

type ErrNotFound struct {
	Message string
}

ErrNotFound represents an error for requests of non existing resources

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

type ErrorResponse

type ErrorResponse struct {
	Message string
}

func (*ErrorResponse) Error

func (err *ErrorResponse) Error() string

type Format

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

type Glossary

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

type GlossaryParams

type GlossaryParams struct {
	Name       *string `json:"name,omitempty"  cli:"opt --name"`
	ProjectIDs *string `json:"project_ids,omitempty"  cli:"opt --project-ids"`
}

func (*GlossaryParams) ApplyValuesFromMap

func (params *GlossaryParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type GlossaryTerm

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

type GlossaryTermParams

type GlossaryTermParams struct {
	CaseSensitive *bool   `json:"case_sensitive,omitempty"  cli:"opt --case-sensitive"`
	Description   *string `json:"description,omitempty"  cli:"opt --description"`
	Term          *string `json:"term,omitempty"  cli:"opt --term"`
	Translatable  *bool   `json:"translatable,omitempty"  cli:"opt --translatable"`
}

func (*GlossaryTermParams) ApplyValuesFromMap

func (params *GlossaryTermParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type GlossaryTermTranslation

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

type GlossaryTermTranslationParams

type GlossaryTermTranslationParams struct {
	Content    *string `json:"content,omitempty"  cli:"opt --content"`
	LocaleCode *string `json:"locale_code,omitempty"  cli:"opt --locale-code"`
}

func (*GlossaryTermTranslationParams) ApplyValuesFromMap

func (params *GlossaryTermTranslationParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Invitation

type Invitation struct {
	AcceptedAt  *time.Time        `json:"accepted_at"`
	CreatedAt   *time.Time        `json:"created_at"`
	Email       string            `json:"email"`
	ID          string            `json:"id"`
	Locales     []*LocalePreview  `json:"locales"`
	Permissions map[string]string `json:"permissions"`
	Projects    []*ProjectShort   `json:"projects"`
	Role        string            `json:"role"`
	State       string            `json:"state"`
	UpdatedAt   *time.Time        `json:"updated_at"`
}

type InvitationCreateParams

type InvitationCreateParams struct {
	Email       *string           `json:"email,omitempty"  cli:"opt --email"`
	LocaleIDs   *string           `json:"locale_ids,omitempty"  cli:"opt --locale-ids"`
	Permissions map[string]string `json:"permissions,omitempty"  cli:"opt --permissions"`
	ProjectIDs  *string           `json:"project_ids,omitempty"  cli:"opt --project-ids"`
	Role        *string           `json:"role,omitempty"  cli:"opt --role"`
}

func (*InvitationCreateParams) ApplyValuesFromMap

func (params *InvitationCreateParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type InvitationUpdateParams

type InvitationUpdateParams struct {
	LocaleIDs   *string           `json:"locale_ids,omitempty"  cli:"opt --locale-ids"`
	Permissions map[string]string `json:"permissions,omitempty"  cli:"opt --permissions"`
	ProjectIDs  *string           `json:"project_ids,omitempty"  cli:"opt --project-ids"`
	Role        *string           `json:"role,omitempty"  cli:"opt --role"`
}

func (*InvitationUpdateParams) ApplyValuesFromMap

func (params *InvitationUpdateParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Job

type Job struct {
	Briefing  string     `json:"briefing"`
	CreatedAt *time.Time `json:"created_at"`
	DueDate   *time.Time `json:"due_date"`
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	State     string     `json:"state"`
	UpdatedAt *time.Time `json:"updated_at"`
}

type JobCompleteParams

type JobCompleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobCompleteParams) ApplyValuesFromMap

func (params *JobCompleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobDeleteParams

type JobDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobDeleteParams) ApplyValuesFromMap

func (params *JobDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobDetails

type JobDetails struct {
	Job

	JobTagName string           `json:"job_tag_name"`
	Keys       []*KeyPreview    `json:"keys"`
	Locales    []*LocalePreview `json:"locales"`
	Owner      *UserPreview     `json:"owner"`
}

type JobKeysCreateParams

type JobKeysCreateParams struct {
	Branch            *string  `json:"branch,omitempty"  cli:"opt --branch"`
	TranslationKeyIDs []string `json:"translation_key_ids,omitempty"  cli:"opt --translation-key-ids"`
}

func (*JobKeysCreateParams) ApplyValuesFromMap

func (params *JobKeysCreateParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobKeysDeleteParams

type JobKeysDeleteParams struct {
	Branch            *string  `json:"branch,omitempty"  cli:"opt --branch"`
	TranslationKeyIDs []string `json:"translation_key_ids,omitempty"  cli:"opt --translation-key-ids"`
}

func (*JobKeysDeleteParams) ApplyValuesFromMap

func (params *JobKeysDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobLocale

type JobLocale struct {
	ID     string         `json:"id"`
	Job    *JobPreview    `json:"job"`
	Locale *LocalePreview `json:"locale"`
	Users  []*UserPreview `json:"users"`
}

type JobLocaleCompleteParams

type JobLocaleCompleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobLocaleCompleteParams) ApplyValuesFromMap

func (params *JobLocaleCompleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobLocaleDeleteParams

type JobLocaleDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobLocaleDeleteParams) ApplyValuesFromMap

func (params *JobLocaleDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobLocaleParams

type JobLocaleParams struct {
	Branch   *string  `json:"branch,omitempty"  cli:"opt --branch"`
	LocaleID *string  `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	UserIDs  []string `json:"user_ids,omitempty"  cli:"opt --user-ids"`
}

func (*JobLocaleParams) ApplyValuesFromMap

func (params *JobLocaleParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobLocaleReopenParams

type JobLocaleReopenParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobLocaleReopenParams) ApplyValuesFromMap

func (params *JobLocaleReopenParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobLocaleShowParams

type JobLocaleShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobLocaleShowParams) ApplyValuesFromMap

func (params *JobLocaleShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobLocalesListParams

type JobLocalesListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobLocalesListParams) ApplyValuesFromMap

func (params *JobLocalesListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobParams

type JobParams struct {
	Branch            *string     `json:"branch,omitempty"  cli:"opt --branch"`
	Briefing          *string     `json:"briefing,omitempty"  cli:"opt --briefing"`
	DueDate           **time.Time `json:"due_date,omitempty"  cli:"opt --due-date"`
	Name              *string     `json:"name,omitempty"  cli:"opt --name"`
	Tags              []string    `json:"tags,omitempty"  cli:"opt --tags"`
	TranslationKeyIDs []string    `json:"translation_key_ids,omitempty"  cli:"opt --translation-key-ids"`
}

func (*JobParams) ApplyValuesFromMap

func (params *JobParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobPreview

type JobPreview struct {
	ID    string `json:"id"`
	Name  string `json:"name"`
	State string `json:"state"`
}

type JobReopenParams

type JobReopenParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobReopenParams) ApplyValuesFromMap

func (params *JobReopenParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobShowParams

type JobShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobShowParams) ApplyValuesFromMap

func (params *JobShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobStartParams

type JobStartParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*JobStartParams) ApplyValuesFromMap

func (params *JobStartParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobUpdateParams

type JobUpdateParams struct {
	Branch   *string     `json:"branch,omitempty"  cli:"opt --branch"`
	Briefing *string     `json:"briefing,omitempty"  cli:"opt --briefing"`
	DueDate  **time.Time `json:"due_date,omitempty"  cli:"opt --due-date"`
	Name     *string     `json:"name,omitempty"  cli:"opt --name"`
}

func (*JobUpdateParams) ApplyValuesFromMap

func (params *JobUpdateParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type JobsListParams

type JobsListParams struct {
	AssignedTo *string `json:"assigned_to,omitempty"  cli:"opt --assigned-to"`
	Branch     *string `json:"branch,omitempty"  cli:"opt --branch"`
	OwnedBy    *string `json:"owned_by,omitempty"  cli:"opt --owned-by"`
	State      *string `json:"state,omitempty"  cli:"opt --state"`
}

func (*JobsListParams) ApplyValuesFromMap

func (params *JobsListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeyDeleteParams

type KeyDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*KeyDeleteParams) ApplyValuesFromMap

func (params *KeyDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeyPreview

type KeyPreview struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Plural bool   `json:"plural"`
}

type KeyShowParams

type KeyShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*KeyShowParams) ApplyValuesFromMap

func (params *KeyShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeysDeleteParams

type KeysDeleteParams struct {
	Branch   *string `json:"branch,omitempty"  cli:"opt --branch"`
	LocaleID *string `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	Q        *string `json:"q,omitempty"  cli:"opt --query -q"`
}

func (*KeysDeleteParams) ApplyValuesFromMap

func (params *KeysDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeysListParams

type KeysListParams struct {
	Branch   *string `json:"branch,omitempty"  cli:"opt --branch"`
	LocaleID *string `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	Order    *string `json:"order,omitempty"  cli:"opt --order"`
	Q        *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort     *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*KeysListParams) ApplyValuesFromMap

func (params *KeysListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeysSearchParams

type KeysSearchParams struct {
	Branch   *string `json:"branch,omitempty"  cli:"opt --branch"`
	LocaleID *string `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	Order    *string `json:"order,omitempty"  cli:"opt --order"`
	Q        *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort     *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*KeysSearchParams) ApplyValuesFromMap

func (params *KeysSearchParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeysTagParams

type KeysTagParams struct {
	Branch   *string `json:"branch,omitempty"  cli:"opt --branch"`
	LocaleID *string `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	Q        *string `json:"q,omitempty"  cli:"opt --query -q"`
	Tags     *string `json:"tags,omitempty"  cli:"opt --tags"`
}

func (*KeysTagParams) ApplyValuesFromMap

func (params *KeysTagParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type KeysUntagParams

type KeysUntagParams struct {
	Branch   *string `json:"branch,omitempty"  cli:"opt --branch"`
	LocaleID *string `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	Q        *string `json:"q,omitempty"  cli:"opt --query -q"`
	Tags     *string `json:"tags,omitempty"  cli:"opt --tags"`
}

func (*KeysUntagParams) ApplyValuesFromMap

func (params *KeysUntagParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Locale

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

type LocaleDeleteParams

type LocaleDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*LocaleDeleteParams) ApplyValuesFromMap

func (params *LocaleDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type LocaleDetails

type LocaleDetails struct {
	Locale

	Statistics *LocaleStatistics `json:"statistics"`
}

type LocaleDownloadParams

type LocaleDownloadParams struct {
	Branch                        *string           `json:"branch,omitempty"  cli:"opt --branch"`
	ConvertEmoji                  *bool             `json:"convert_emoji,omitempty"  cli:"opt --convert-emoji"`
	Encoding                      *string           `json:"encoding,omitempty"  cli:"opt --encoding"`
	FallbackLocaleID              *string           `json:"fallback_locale_id,omitempty"  cli:"opt --fallback-locale-id"`
	FileFormat                    *string           `json:"file_format,omitempty"  cli:"opt --file-format"`
	FormatOptions                 map[string]string `json:"format_options,omitempty"  cli:"opt --format-options"`
	IncludeEmptyTranslations      *bool             `json:"include_empty_translations,omitempty"  cli:"opt --include-empty-translations"`
	IncludeTranslatedKeys         *bool             `json:"include_translated_keys,omitempty"  cli:"opt --include-translated-keys"`
	IncludeUnverifiedTranslations *bool             `json:"include_unverified_translations,omitempty"  cli:"opt --include-unverified-translations"`
	KeepNotranslateTags           *bool             `json:"keep_notranslate_tags,omitempty"  cli:"opt --keep-notranslate-tags"`
	SkipUnverifiedTranslations    *bool             `json:"skip_unverified_translations,omitempty"  cli:"opt --skip-unverified-translations"`
	Tag                           *string           `json:"tag,omitempty"  cli:"opt --tag"`
	Tags                          *string           `json:"tags,omitempty"  cli:"opt --tags"`
}

func (*LocaleDownloadParams) ApplyValuesFromMap

func (params *LocaleDownloadParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type LocaleParams

type LocaleParams struct {
	Autotranslate               *bool   `json:"autotranslate,omitempty"  cli:"opt --autotranslate"`
	Branch                      *string `json:"branch,omitempty"  cli:"opt --branch"`
	Code                        *string `json:"code,omitempty"  cli:"opt --code"`
	Default                     *bool   `json:"default,omitempty"  cli:"opt --default"`
	Main                        *bool   `json:"main,omitempty"  cli:"opt --main"`
	Name                        *string `json:"name,omitempty"  cli:"opt --name"`
	Rtl                         *bool   `json:"rtl,omitempty"  cli:"opt --rtl"`
	SourceLocaleID              *string `json:"source_locale_id,omitempty"  cli:"opt --source-locale-id"`
	UnverifyNewTranslations     *bool   `json:"unverify_new_translations,omitempty"  cli:"opt --unverify-new-translations"`
	UnverifyUpdatedTranslations *bool   `json:"unverify_updated_translations,omitempty"  cli:"opt --unverify-updated-translations"`
}

func (*LocaleParams) ApplyValuesFromMap

func (params *LocaleParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type LocalePreview

type LocalePreview struct {
	Code string `json:"code"`
	ID   string `json:"id"`
	Name string `json:"name"`
}

type LocaleShowParams

type LocaleShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*LocaleShowParams) ApplyValuesFromMap

func (params *LocaleShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type LocaleStatistics

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

type LocalesListParams

type LocalesListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*LocalesListParams) ApplyValuesFromMap

func (params *LocalesListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Member

type Member struct {
	Email    string            `json:"email"`
	ID       string            `json:"id"`
	Projects []*ProjectLocales `json:"projects"`
	Role     string            `json:"role"`
	Username string            `json:"username"`
}

type MemberUpdateParams

type MemberUpdateParams struct {
	LocaleIDs   *string           `json:"locale_ids,omitempty"  cli:"opt --locale-ids"`
	Permissions map[string]string `json:"permissions,omitempty"  cli:"opt --permissions"`
	ProjectIDs  *string           `json:"project_ids,omitempty"  cli:"opt --project-ids"`
	Role        *string           `json:"role,omitempty"  cli:"opt --role"`
}

func (*MemberUpdateParams) ApplyValuesFromMap

func (params *MemberUpdateParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type OrderConfirmParams

type OrderConfirmParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*OrderConfirmParams) ApplyValuesFromMap

func (params *OrderConfirmParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type OrderDeleteParams

type OrderDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*OrderDeleteParams) ApplyValuesFromMap

func (params *OrderDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type OrderShowParams

type OrderShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*OrderShowParams) ApplyValuesFromMap

func (params *OrderShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type OrdersListParams

type OrdersListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*OrdersListParams) ApplyValuesFromMap

func (params *OrdersListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Project

type Project struct {
	Account         *Account   `json:"account"`
	CreatedAt       *time.Time `json:"created_at"`
	ID              string     `json:"id"`
	MainFormat      string     `json:"main_format"`
	Name            string     `json:"name"`
	ProjectImageUrl string     `json:"project_image_url"`
	UpdatedAt       *time.Time `json:"updated_at"`
}

type ProjectDetails

type ProjectDetails struct {
	Project

	SharesTranslationMemory bool   `json:"shares_translation_memory"`
	Slug                    string `json:"slug"`
}

type ProjectLocales

type ProjectLocales struct {
	ProjectShort

	Locales []*LocalePreview `json:"locales"`
}

type ProjectParams

type ProjectParams struct {
	AccountID               *string `json:"account_id,omitempty"  cli:"opt --account-id"`
	MainFormat              *string `json:"main_format,omitempty"  cli:"opt --main-format"`
	Name                    *string `json:"name,omitempty"  cli:"opt --name"`
	ProjectImage            *string `json:"project_image,omitempty"  cli:"opt --project-image"`
	RemoveProjectImage      *bool   `json:"remove_project_image,omitempty"  cli:"opt --remove-project-image"`
	SharesTranslationMemory *bool   `json:"shares_translation_memory,omitempty"  cli:"opt --shares-translation-memory"`
}

func (*ProjectParams) ApplyValuesFromMap

func (params *ProjectParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type ProjectShort

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

type RateLimitingError

type RateLimitingError struct {
	Limit           int
	Remaining       int
	Reset           time.Time
	TooManyRequests bool
}

RateLimitingError is returned when hitting the API rate limit

func NewRateLimitError

func NewRateLimitError(resp *http.Response) (*RateLimitingError, error)

func (*RateLimitingError) Error

func (rle *RateLimitingError) Error() string

type StatisticsListItem

type StatisticsListItem struct {
	Locale     *LocalePreview `json:"locale"`
	Statistics StatisticsType `json:"statistics"`
}

type StatisticsType

type StatisticsType struct {
	KeysTotalCount              int64 `json:"keys_total_count"`
	KeysUntranslatedCount       int64 `json:"keys_untranslated_count"`
	TranslationsCompletedCount  int64 `json:"translations_completed_count"`
	TranslationsUnverifiedCount int64 `json:"translations_unverified_count"`
}

type Styleguide

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

type StyleguideDetails

type StyleguideDetails struct {
	Styleguide

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

type StyleguideParams

type StyleguideParams struct {
	Audience           *string `json:"audience,omitempty"  cli:"opt --audience"`
	Business           *string `json:"business,omitempty"  cli:"opt --business"`
	CompanyBranding    *string `json:"company_branding,omitempty"  cli:"opt --company-branding"`
	Formatting         *string `json:"formatting,omitempty"  cli:"opt --formatting"`
	GlossaryTerms      *string `json:"glossary_terms,omitempty"  cli:"opt --glossary-terms"`
	GrammarConsistency *string `json:"grammar_consistency,omitempty"  cli:"opt --grammar-consistency"`
	GrammaticalPerson  *string `json:"grammatical_person,omitempty"  cli:"opt --grammatical-person"`
	LiteralTranslation *string `json:"literal_translation,omitempty"  cli:"opt --literal-translation"`
	OverallTone        *string `json:"overall_tone,omitempty"  cli:"opt --overall-tone"`
	Samples            *string `json:"samples,omitempty"  cli:"opt --samples"`
	TargetAudience     *string `json:"target_audience,omitempty"  cli:"opt --target-audience"`
	Title              *string `json:"title,omitempty"  cli:"opt --title"`
	VocabularyType     *string `json:"vocabulary_type,omitempty"  cli:"opt --vocabulary-type"`
}

func (*StyleguideParams) ApplyValuesFromMap

func (params *StyleguideParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type StyleguidePreview

type StyleguidePreview struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

type SummaryType

type SummaryType struct {
	LocalesCreated         int64 `json:"locales_created"`
	TagsCreated            int64 `json:"tags_created"`
	TranslationKeysCreated int64 `json:"translation_keys_created"`
	TranslationsCreated    int64 `json:"translations_created"`
	TranslationsUpdated    int64 `json:"translations_updated"`
}

type Tag

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

type TagDeleteParams

type TagDeleteParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*TagDeleteParams) ApplyValuesFromMap

func (params *TagDeleteParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TagParams

type TagParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Name   *string `json:"name,omitempty"  cli:"opt --name"`
}

func (*TagParams) ApplyValuesFromMap

func (params *TagParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TagShowParams

type TagShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*TagShowParams) ApplyValuesFromMap

func (params *TagShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TagWithStats

type TagWithStats struct {
	Tag

	Statistics []*StatisticsListItem `json:"statistics"`
}

type TagsListParams

type TagsListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*TagsListParams) ApplyValuesFromMap

func (params *TagsListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Translation

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

type TranslationDetails

type TranslationDetails struct {
	Translation

	User      *UserPreview `json:"user"`
	WordCount int64        `json:"word_count"`
}

type TranslationKey

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

type TranslationKeyDetails

type TranslationKeyDetails struct {
	TranslationKey

	CommentsCount        int64        `json:"comments_count"`
	Creator              *UserPreview `json:"creator"`
	FormatValueType      string       `json:"format_value_type"`
	MaxCharactersAllowed int64        `json:"max_characters_allowed"`
	NamePlural           string       `json:"name_plural"`
	OriginalFile         string       `json:"original_file"`
	ScreenshotUrl        string       `json:"screenshot_url"`
	Unformatted          bool         `json:"unformatted"`
	XmlSpacePreserve     bool         `json:"xml_space_preserve"`
}

type TranslationKeyParams

type TranslationKeyParams struct {
	Branch                *string `json:"branch,omitempty"  cli:"opt --branch"`
	DataType              *string `json:"data_type,omitempty"  cli:"opt --data-type"`
	Description           *string `json:"description,omitempty"  cli:"opt --description"`
	LocalizedFormatKey    *string `json:"localized_format_key,omitempty"  cli:"opt --localized-format-key"`
	LocalizedFormatString *string `json:"localized_format_string,omitempty"  cli:"opt --localized-format-string"`
	MaxCharactersAllowed  *int64  `json:"max_characters_allowed,omitempty"  cli:"opt --max-characters-allowed"`
	Name                  *string `json:"name,omitempty"  cli:"opt --name"`
	NamePlural            *string `json:"name_plural,omitempty"  cli:"opt --name-plural"`
	OriginalFile          *string `json:"original_file,omitempty"  cli:"opt --original-file"`
	Plural                *bool   `json:"plural,omitempty"  cli:"opt --plural"`
	RemoveScreenshot      *bool   `json:"remove_screenshot,omitempty"  cli:"opt --remove-screenshot"`
	Screenshot            *string `json:"screenshot,omitempty"  cli:"opt --screenshot"`
	Tags                  *string `json:"tags,omitempty"  cli:"opt --tags"`
	Unformatted           *bool   `json:"unformatted,omitempty"  cli:"opt --unformatted"`
	XmlSpacePreserve      *bool   `json:"xml_space_preserve,omitempty"  cli:"opt --xml-space-preserve"`
}

func (*TranslationKeyParams) ApplyValuesFromMap

func (params *TranslationKeyParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationOrder

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

type TranslationOrderParams

type TranslationOrderParams struct {
	Branch                           *string  `json:"branch,omitempty"  cli:"opt --branch"`
	Category                         *string  `json:"category,omitempty"  cli:"opt --category"`
	IncludeUntranslatedKeys          *bool    `json:"include_untranslated_keys,omitempty"  cli:"opt --include-untranslated-keys"`
	IncludeUnverifiedTranslations    *bool    `json:"include_unverified_translations,omitempty"  cli:"opt --include-unverified-translations"`
	Lsp                              *string  `json:"lsp,omitempty"  cli:"opt --lsp"`
	Message                          *string  `json:"message,omitempty"  cli:"opt --message"`
	Priority                         *bool    `json:"priority,omitempty"  cli:"opt --priority"`
	Quality                          *bool    `json:"quality,omitempty"  cli:"opt --quality"`
	SourceLocaleID                   *string  `json:"source_locale_id,omitempty"  cli:"opt --source-locale-id"`
	StyleguideID                     *string  `json:"styleguide_id,omitempty"  cli:"opt --styleguide-id"`
	Tag                              *string  `json:"tag,omitempty"  cli:"opt --tag"`
	TargetLocaleIDs                  []string `json:"target_locale_ids,omitempty"  cli:"opt --target-locale-ids"`
	TranslationType                  *string  `json:"translation_type,omitempty"  cli:"opt --translation-type"`
	UnverifyTranslationsUponDelivery *bool    `json:"unverify_translations_upon_delivery,omitempty"  cli:"opt --unverify-translations-upon-delivery"`
}

func (*TranslationOrderParams) ApplyValuesFromMap

func (params *TranslationOrderParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationParams

type TranslationParams struct {
	Branch       *string `json:"branch,omitempty"  cli:"opt --branch"`
	Content      *string `json:"content,omitempty"  cli:"opt --content"`
	Excluded     *bool   `json:"excluded,omitempty"  cli:"opt --excluded"`
	KeyID        *string `json:"key_id,omitempty"  cli:"opt --key-id"`
	LocaleID     *string `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	PluralSuffix *string `json:"plural_suffix,omitempty"  cli:"opt --plural-suffix"`
	Unverified   *bool   `json:"unverified,omitempty"  cli:"opt --unverified"`
}

func (*TranslationParams) ApplyValuesFromMap

func (params *TranslationParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationShowParams

type TranslationShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*TranslationShowParams) ApplyValuesFromMap

func (params *TranslationShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationUpdateParams

type TranslationUpdateParams struct {
	Branch       *string `json:"branch,omitempty"  cli:"opt --branch"`
	Content      *string `json:"content,omitempty"  cli:"opt --content"`
	Excluded     *bool   `json:"excluded,omitempty"  cli:"opt --excluded"`
	PluralSuffix *string `json:"plural_suffix,omitempty"  cli:"opt --plural-suffix"`
	Unverified   *bool   `json:"unverified,omitempty"  cli:"opt --unverified"`
}

func (*TranslationUpdateParams) ApplyValuesFromMap

func (params *TranslationUpdateParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationVersion

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

type TranslationVersionWithUser

type TranslationVersionWithUser struct {
	TranslationVersion

	User *UserPreview `json:"user"`
}

type TranslationsByKeyParams

type TranslationsByKeyParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsByKeyParams) ApplyValuesFromMap

func (params *TranslationsByKeyParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsByLocaleParams

type TranslationsByLocaleParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsByLocaleParams) ApplyValuesFromMap

func (params *TranslationsByLocaleParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsExcludeParams

type TranslationsExcludeParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsExcludeParams) ApplyValuesFromMap

func (params *TranslationsExcludeParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsIncludeParams

type TranslationsIncludeParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsIncludeParams) ApplyValuesFromMap

func (params *TranslationsIncludeParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsListParams

type TranslationsListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsListParams) ApplyValuesFromMap

func (params *TranslationsListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsSearchParams

type TranslationsSearchParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsSearchParams) ApplyValuesFromMap

func (params *TranslationsSearchParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsUnverifyParams

type TranslationsUnverifyParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsUnverifyParams) ApplyValuesFromMap

func (params *TranslationsUnverifyParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type TranslationsVerifyParams

type TranslationsVerifyParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
	Order  *string `json:"order,omitempty"  cli:"opt --order"`
	Q      *string `json:"q,omitempty"  cli:"opt --query -q"`
	Sort   *string `json:"sort,omitempty"  cli:"opt --sort"`
}

func (*TranslationsVerifyParams) ApplyValuesFromMap

func (params *TranslationsVerifyParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Upload

type Upload struct {
	CreatedAt *time.Time  `json:"created_at"`
	Filename  string      `json:"filename"`
	Format    string      `json:"format"`
	ID        string      `json:"id"`
	State     string      `json:"state"`
	Summary   SummaryType `json:"summary"`
	UpdatedAt *time.Time  `json:"updated_at"`
}

type UploadParams

type UploadParams struct {
	Autotranslate      *bool             `json:"autotranslate,omitempty"  cli:"opt --autotranslate"`
	Branch             *string           `json:"branch,omitempty"  cli:"opt --branch"`
	ConvertEmoji       *bool             `json:"convert_emoji,omitempty"  cli:"opt --convert-emoji"`
	File               *string           `json:"file,omitempty"  cli:"opt --file"`
	FileEncoding       *string           `json:"file_encoding,omitempty"  cli:"opt --file-encoding"`
	FileFormat         *string           `json:"file_format,omitempty"  cli:"opt --file-format"`
	FormatOptions      map[string]string `json:"format_options,omitempty"  cli:"opt --format-options"`
	LocaleID           *string           `json:"locale_id,omitempty"  cli:"opt --locale-id"`
	LocaleMapping      map[string]string `json:"locale_mapping,omitempty"  cli:"opt --locale-mapping"`
	SkipUnverification *bool             `json:"skip_unverification,omitempty"  cli:"opt --skip-unverification"`
	SkipUploadTags     *bool             `json:"skip_upload_tags,omitempty"  cli:"opt --skip-upload-tags"`
	Tags               *string           `json:"tags,omitempty"  cli:"opt --tags"`
	UpdateDescriptions *bool             `json:"update_descriptions,omitempty"  cli:"opt --update-descriptions"`
	UpdateTranslations *bool             `json:"update_translations,omitempty"  cli:"opt --update-translations"`
}

func (*UploadParams) ApplyValuesFromMap

func (params *UploadParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type UploadShowParams

type UploadShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*UploadShowParams) ApplyValuesFromMap

func (params *UploadShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type UploadsListParams

type UploadsListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*UploadsListParams) ApplyValuesFromMap

func (params *UploadsListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type User

type User struct {
	CreatedAt *time.Time `json:"created_at"`
	Email     string     `json:"email"`
	ID        string     `json:"id"`
	Name      string     `json:"name"`
	Position  string     `json:"position"`
	UpdatedAt *time.Time `json:"updated_at"`
	Username  string     `json:"username"`
}

type UserPreview

type UserPreview struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Username string `json:"username"`
}

type ValidationErrorMessage

type ValidationErrorMessage struct {
	Resource string
	Field    string
	Message  string
}

ValidationErrorMessage represents an error for a failed validation of content

func (*ValidationErrorMessage) String

func (msg *ValidationErrorMessage) String() string

type ValidationErrorResponse

type ValidationErrorResponse struct {
	ErrorResponse

	Errors []ValidationErrorMessage
}

ValidationErrorResponse represents the response for a failed validation of content

func (*ValidationErrorResponse) Error

func (err *ValidationErrorResponse) Error() string

type VersionShowParams

type VersionShowParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*VersionShowParams) ApplyValuesFromMap

func (params *VersionShowParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type VersionsListParams

type VersionsListParams struct {
	Branch *string `json:"branch,omitempty"  cli:"opt --branch"`
}

func (*VersionsListParams) ApplyValuesFromMap

func (params *VersionsListParams) ApplyValuesFromMap(defaults map[string]interface{}) error

type Webhook

type Webhook struct {
	Active      bool       `json:"active"`
	CallbackUrl string     `json:"callback_url"`
	CreatedAt   *time.Time `json:"created_at"`
	Description string     `json:"description"`
	Events      []string   `json:"events"`
	ID          string     `json:"id"`
	UpdatedAt   *time.Time `json:"updated_at"`
}

type WebhookParams

type WebhookParams struct {
	Active      *bool   `json:"active,omitempty"  cli:"opt --active"`
	CallbackUrl *string `json:"callback_url,omitempty"  cli:"opt --callback-url"`
	Description *string `json:"description,omitempty"  cli:"opt --description"`
	Events      *string `json:"events,omitempty"  cli:"opt --events"`
}

func (*WebhookParams) ApplyValuesFromMap

func (params *WebhookParams) ApplyValuesFromMap(defaults map[string]interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL