Skip to content

Latest commit

 

History

History
240 lines (136 loc) · 7 KB

AuthorizationsApi.md

File metadata and controls

240 lines (136 loc) · 7 KB

\AuthorizationsApi

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

Method HTTP request Description
AuthorizationCreate Post /authorizations Create an authorization
AuthorizationDelete Delete /authorizations/{id} Delete an authorization
AuthorizationShow Get /authorizations/{id} Get a single authorization
AuthorizationUpdate Patch /authorizations/{id} Update an authorization
AuthorizationsList Get /authorizations List authorizations

AuthorizationCreate

AuthorizationWithToken AuthorizationCreate(ctx, authorizationCreateParameters, optional)

Create an authorization

Create a new authorization.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a AuthorizationCreateOpts struct

Name Type Description Notes

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

Return type

AuthorizationWithToken

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]

AuthorizationDelete

AuthorizationDelete(ctx, id, optional)

Delete an authorization

Delete an existing authorization. API calls using that token will stop working.

Required Parameters

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

Optional Parameters

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

AuthorizationShow

Authorization AuthorizationShow(ctx, id, optional)

Get a single authorization

Get details on a single authorization.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a AuthorizationShowOpts struct

Name Type Description Notes

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

Return type

Authorization

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]

AuthorizationUpdate

Authorization AuthorizationUpdate(ctx, id, authorizationUpdateParameters, optional)

Update an authorization

Update an existing authorization.

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a AuthorizationUpdateOpts struct

Name Type Description Notes

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

Return type

Authorization

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]

AuthorizationsList

[]Authorization AuthorizationsList(ctx, optional)

List authorizations

List all your authorizations.

Required Parameters

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

Optional Parameters

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

[]Authorization

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]