Skip to content

Latest commit

 

History

History
250 lines (141 loc) · 6.98 KB

VariablesApi.md

File metadata and controls

250 lines (141 loc) · 6.98 KB

\VariablesApi

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

VariableCreate

Variable VariableCreate(ctx, projectId, variableCreateParameters, optional)

Create a variable

Create a new variable.

Required Parameters

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

Optional parameters are passed through a pointer to a VariableCreateOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

Variable

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VariableDelete

VariableDelete(ctx, projectId, name, optional)

Delete a variable

Delete an existing variable.

Required Parameters

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

Optional parameters are passed through a pointer to a VariableDeleteOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

(empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VariableShow

Variable VariableShow(ctx, projectId, name, optional)

Get a single variable

Get details on a single variable for a given project.

Required Parameters

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

Optional parameters are passed through a pointer to a VariableShowOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

Variable

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VariableUpdate

Variable VariableUpdate(ctx, projectId, name, variableUpdateParameters, optional)

Update a variable

Update an existing variable.

Required Parameters

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

Optional parameters are passed through a pointer to a VariableUpdateOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

Variable

Authorization

Basic, Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VariablesList

[]Variable VariablesList(ctx, projectId, optional)

List variables

List all variables for the current project.

Required Parameters

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

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 |

Return type

[]Variable

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]