Skip to content

Latest commit

 

History

History
400 lines (226 loc) · 11.1 KB

SpacesApi.md

File metadata and controls

400 lines (226 loc) · 11.1 KB

\SpacesApi

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

Method HTTP request Description
SpaceCreate Post /accounts/{account_id}/spaces Create a Space
SpaceDelete Delete /accounts/{account_id}/spaces/{id} Delete Space
SpaceShow Get /accounts/{account_id}/spaces/{id} Get Space
SpaceUpdate Patch /accounts/{account_id}/spaces/{id} Update Space
SpacesList Get /accounts/{account_id}/spaces List Spaces
SpacesProjectsCreate Post /accounts/{account_id}/spaces/{space_id}/projects Add Project to Space
SpacesProjectsDelete Delete /accounts/{account_id}/spaces/{space_id}/projects/{id} Remove Project from Space
SpacesProjectsList Get /accounts/{account_id}/spaces/{space_id}/projects List Projects in Space

SpaceCreate

Space SpaceCreate(ctx, accountId, spaceCreateParameters, optional)

Create a Space

Create a new Space.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountId string Account ID
spaceCreateParameters SpaceCreateParameters
optional *SpaceCreateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a SpaceCreateOpts struct

Name Type Description Notes

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

Return type

Space

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]

SpaceDelete

SpaceDelete(ctx, accountId, id, optional)

Delete Space

Delete the specified Space.

Required Parameters

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

Optional Parameters

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

SpaceShow

Space SpaceShow(ctx, accountId, id, optional)

Get Space

Show the specified Space.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a SpaceShowOpts struct

Name Type Description Notes

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

Return type

Space

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]

SpaceUpdate

Space SpaceUpdate(ctx, accountId, id, spaceUpdateParameters, optional)

Update Space

Update the specified Space.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a SpaceUpdateOpts struct

Name Type Description Notes

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

Return type

Space

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]

SpacesList

[]Space SpacesList(ctx, accountId, optional)

List Spaces

List all Spaces for the given account.

Required Parameters

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

Optional Parameters

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

[]Space

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]

SpacesProjectsCreate

SpacesProjectsCreate(ctx, accountId, spaceId, spacesProjectsCreateParameters, optional)

Add Project to Space

Adds an existing project to the space.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountId string Account ID
spaceId string Space ID
spacesProjectsCreateParameters SpacesProjectsCreateParameters
optional *SpacesProjectsCreateOpts optional parameters nil if no parameters

Optional Parameters

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

SpacesProjectsDelete

SpacesProjectsDelete(ctx, accountId, spaceId, id, optional)

Remove Project from Space

Removes a specified project from the specified space.

Required Parameters

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

Optional Parameters

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

SpacesProjectsList

[]Project SpacesProjectsList(ctx, accountId, spaceId, optional)

List Projects in Space

List all projects for the specified Space.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
accountId string Account ID
spaceId string Space ID
optional *SpacesProjectsListOpts optional parameters nil if no parameters

Optional Parameters

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

[]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]