Skip to content

Latest commit

 

History

History
243 lines (139 loc) · 6.98 KB

ProjectsApi.md

File metadata and controls

243 lines (139 loc) · 6.98 KB

\ProjectsApi

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

Method HTTP request Description
ProjectCreate Post /projects Create a project
ProjectDelete Delete /projects/{id} Delete a project
ProjectShow Get /projects/{id} Get a single project
ProjectUpdate Patch /projects/{id} Update a project
ProjectsList Get /projects List projects

ProjectCreate

ProjectDetails ProjectCreate(ctx, projectCreateParameters, optional)

Create a project

Create a new project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectCreateParameters ProjectCreateParameters
optional *ProjectCreateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ProjectCreateOpts struct

Name Type Description Notes

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

Return type

ProjectDetails

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]

ProjectDelete

ProjectDelete(ctx, id, optional)

Delete a project

Delete an existing project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID
optional *ProjectDeleteOpts optional parameters nil if no parameters

Optional Parameters

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

ProjectShow

ProjectDetails ProjectShow(ctx, id, optional)

Get a single project

Get details on a single project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID
optional *ProjectShowOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ProjectShowOpts struct

Name Type Description Notes

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

Return type

ProjectDetails

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]

ProjectUpdate

ProjectDetails ProjectUpdate(ctx, id, projectUpdateParameters, optional)

Update a project

Update an existing project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string ID
projectUpdateParameters ProjectUpdateParameters
optional *ProjectUpdateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ProjectUpdateOpts struct

Name Type Description Notes

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

Return type

ProjectDetails

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]

ProjectsList

[]Project ProjectsList(ctx, optional)

List projects

List all projects the current user has access to.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *ProjectsListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ProjectsListOpts 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
accountId optional.String Filter by Account ID
sortBy optional.String Sort projects. Valid options are "name_asc", "name_desc", "updated_at_asc", "updated_at_desc", "space_asc" and "space_desc".
filters optional.Interface of []string Filter projects. Valid options are ["favorites"].

Return type

[]Project

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]