Skip to content

Latest commit

 

History

History
348 lines (196 loc) · 9.79 KB

BranchesApi.md

File metadata and controls

348 lines (196 loc) · 9.79 KB

\BranchesApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
BranchCompare Get /projects/{project_id}/branches/{name}/compare Compare branches
BranchCreate Post /projects/{project_id}/branches Create a branch
BranchDelete Delete /projects/{project_id}/branches/{name} Delete a branch
BranchMerge Patch /projects/{project_id}/branches/{name}/merge Merge a branch
BranchShow Get /projects/{project_id}/branches/{name} Get a single branch
BranchUpdate Patch /projects/{project_id}/branches/{name} Update a branch
BranchesList Get /projects/{project_id}/branches List branches

BranchCompare

BranchCompare(ctx, projectId, name, optional)

Compare branches

Compare branch with main branch.

Note: Comparing a branch may take several minutes depending on the project size.

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 *BranchCompareOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchCompareOpts 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]

BranchCreate

Branch BranchCreate(ctx, projectId, branchCreateParameters, optional)

Create a branch

Create a new branch.

Note: Creating a new branch may take several minutes depending on the project size.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
branchCreateParameters BranchCreateParameters
optional *BranchCreateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchCreateOpts struct

Name Type Description Notes

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

Return type

Branch

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]

BranchDelete

BranchDelete(ctx, projectId, name, optional)

Delete a branch

Delete an existing branch.

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 *BranchDeleteOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchDeleteOpts 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]

BranchMerge

BranchMerge(ctx, projectId, name, branchMergeParameters, optional)

Merge a branch

Merge an existing branch.

Note: Merging a branch may take several minutes depending on diff size.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
name string name
branchMergeParameters BranchMergeParameters
optional *BranchMergeOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchMergeOpts 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: application/json
  • Accept: Not defined

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

BranchShow

Branch BranchShow(ctx, projectId, name, optional)

Get a single branch

Get details on a single branch 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 *BranchShowOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchShowOpts struct

Name Type Description Notes

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

Return type

Branch

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]

BranchUpdate

Branch BranchUpdate(ctx, projectId, name, branchUpdateParameters, optional)

Update a branch

Update an existing branch.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
name string name
branchUpdateParameters BranchUpdateParameters
optional *BranchUpdateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchUpdateOpts struct

Name Type Description Notes

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

Return type

Branch

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]

BranchesList

[]Branch BranchesList(ctx, projectId, optional)

List branches

List all branches the of 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 *BranchesListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a BranchesListOpts 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

[]Branch

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]