Documentation ¶
Index ¶
- Constants
- type BaseResource
- type Client
- func (c Client) CreateResource(newResource UploadResourceRequest) (*Response, error)
- func (c Client) DownloadTranslations(slug string) (map[string]string, error)
- func (c Client) Languages() ([]Language, error)
- func (c Client) ListResources() ([]Resource, error)
- func (c *Client) RateLimit(t time.Duration, requests int)
- func (c Client) SourceLanguage() (string, error)
- func (c Client) UpdateResourceContent(slug, content string) (*Response, error)
- func (c Client) UploadTranslationFile(slug, langCode, content string) (*Response, error)
- func (c Client) ValidateConfiguration() error
- type Language
- type Project
- type Resource
- type Response
- type UploadResourceRequest
Constants ¶
View Source
const ApiUrl = "https://www.transifex.com/api/2"
View Source
const KeyValueJson = "KEYVALUEJSON"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseResource ¶
type Client ¶
type Client struct { Project Project // contains filtered or unexported fields }
func (Client) CreateResource ¶
func (c Client) CreateResource(newResource UploadResourceRequest) (*Response, error)
func (Client) DownloadTranslations ¶
func (Client) ListResources ¶
func (Client) SourceLanguage ¶
func (Client) UpdateResourceContent ¶
func (Client) UploadTranslationFile ¶
func (Client) ValidateConfiguration ¶
type Resource ¶
type Resource struct { BaseResource SourceLanguage string `json:"source_language_code"` }
type Response ¶
type Response struct { Added int `json:"strings_added"` Updated int `json:"strings_updated"` Deleted int `json:"strings_delete"` }
func (*Response) UnmarshalJSON ¶
type UploadResourceRequest ¶
type UploadResourceRequest struct { BaseResource Content string `json:"content"` Accept_translations string `json:"accept_translations"` }
Click to show internal directories.
Click to hide internal directories.