The resourceString mixin is responsible for retrieving and updating specific
source strings that belong to a given resource.
- Source:
- Source:
Methods
(inner) project(project_slug)
Retrieve the details of a specific project
Parameters:
Name | Type | Description |
---|---|---|
project_slug |
string | The projects slug |
- Source:
Example
txApi.projectRead('test_project').then(function(data) {})
(inner) projectCreate(form)
Create a new project
Parameters:
Name | Type | Description |
---|---|---|
form |
object | An object containing the projects definition |
- Source:
Example
txApi.projectCreate({
name: 'autotest',
slug: 'autotest',
private: true,
description: 'this is an automated test',
source_language_code: 'af'
})
(inner) projectDelete(project_slug)
Delete an existing project
Parameters:
Name | Type | Description |
---|---|---|
project_slug |
string | The projects slug |
- Source:
Example
txApi.projectDelete('testproject')
(inner) projects()
Retrieve the projects that the user participates or owns.
- Source:
Example
txApi.projects().then(function(data) {})
(inner) projectUpdate(project_slug, form)
Update an existing project
Parameters:
Name | Type | Description |
---|---|---|
project_slug |
string | The projects slug |
form |
object | An object containing the projects update |
- Source:
Example
txApi.projectUpdate('testproject', {
description: 'this is an updated description',
})
(inner) resourceString(project_slug, resource_slug, source_string)
Retrieve the details of a specific source string
Parameters:
Name | Type | Description |
---|---|---|
project_slug |
string | The projects slug |
resource_slug |
string | The resource slug |
source_string |
string | The source string |
- Source:
Example
txApi.resourceStringRead('autotest', 'resourcetest', 'hello world')
(inner) resourceStringUpdate(project_slug, resource_slug, source_string, form)
Update an existing source string
Parameters:
Name | Type | Description |
---|---|---|
project_slug |
string | The projects slug |
resource_slug |
string | The resource slug |
source_string |
string | The source string |
form |
object | An object containing the source string's update |
- Source:
Example
txApi.resourceStringUpdate('autotest', 'resourcetest', 'hello world', {
comment: 'This is a comment'
})