All URIs are relative to https://api.phrase.com/v2
Method | HTTP request | Description |
---|---|---|
VariableCreate | Post /projects/{project_id}/variables | Create a variable |
VariableDelete | Delete /projects/{project_id}/variables/{name} | Delete a variable |
VariableShow | Get /projects/{project_id}/variables/{name} | Get a single variable |
VariableUpdate | Patch /projects/{project_id}/variables/{name} | Update a variable |
VariablesList | Get /projects/{project_id}/variables | List variables |
Variable VariableCreate(ctx, projectId, variableCreateParameters, optional)
Create a variable
Create a new variable.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectId | string | Project ID | |
variableCreateParameters | VariableCreateParameters | ||
optional | *VariableCreateOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a VariableCreateOpts struct
Name | Type | Description | Notes |
---|
xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableDelete(ctx, projectId, name, optional)
Delete a variable
Delete an existing variable.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectId | string | Project ID | |
name | string | name | |
optional | *VariableDeleteOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a VariableDeleteOpts struct
Name | Type | Description | Notes |
---|
xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Variable VariableShow(ctx, projectId, name, optional)
Get a single variable
Get details on a single variable for a given project.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectId | string | Project ID | |
name | string | name | |
optional | *VariableShowOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a VariableShowOpts struct
Name | Type | Description | Notes |
---|
xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Variable VariableUpdate(ctx, projectId, name, variableUpdateParameters, optional)
Update a variable
Update an existing variable.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectId | string | Project ID | |
name | string | name | |
variableUpdateParameters | VariableUpdateParameters | ||
optional | *VariableUpdateOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a VariableUpdateOpts struct
Name | Type | Description | Notes |
---|
xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Variable VariablesList(ctx, projectId, optional)
List variables
List all variables for the current project.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectId | string | Project ID | |
optional | *VariablesListOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a VariablesListOpts struct
Name | Type | Description | Notes |
---|
xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | page | optional.Int32| Page number | perPage | optional.Int32| Limit on the number of objects to be returned, between 1 and 100. 25 by default |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]