Skip to content

Latest commit

 

History

History
423 lines (241 loc) · 12.2 KB

CommentsApi.md

File metadata and controls

423 lines (241 loc) · 12.2 KB

\CommentsApi

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

Method HTTP request Description
CommentCreate Post /projects/{project_id}/keys/{key_id}/comments Create a comment
CommentDelete Delete /projects/{project_id}/keys/{key_id}/comments/{id} Delete a comment
CommentMarkCheck Get /projects/{project_id}/keys/{key_id}/comments/{id}/read Check if comment is read
CommentMarkRead Patch /projects/{project_id}/keys/{key_id}/comments/{id}/read Mark a comment as read
CommentMarkUnread Delete /projects/{project_id}/keys/{key_id}/comments/{id}/read Mark a comment as unread
CommentShow Get /projects/{project_id}/keys/{key_id}/comments/{id} Get a single comment
CommentUpdate Patch /projects/{project_id}/keys/{key_id}/comments/{id} Update a comment
CommentsList Get /projects/{project_id}/keys/{key_id}/comments List comments

CommentCreate

Comment CommentCreate(ctx, projectId, keyId, commentCreateParameters, optional)

Create a comment

Create a new comment for a key.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
commentCreateParameters CommentCreateParameters
optional *CommentCreateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentCreateOpts struct

Name Type Description Notes

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

Return type

Comment

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]

CommentDelete

CommentDelete(ctx, projectId, keyId, id, optional)

Delete a comment

Delete an existing comment.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
id string ID
optional *CommentDeleteOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentDeleteOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | branch | optional.String| specify the branch to use |

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]

CommentMarkCheck

CommentMarkCheck(ctx, projectId, keyId, id, optional)

Check if comment is read

Check if comment was marked as read. Returns 204 if read, 404 if unread.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
id string ID
optional *CommentMarkCheckOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentMarkCheckOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | branch | optional.String| specify the branch to use |

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]

CommentMarkRead

CommentMarkRead(ctx, projectId, keyId, id, commentMarkReadParameters, optional)

Mark a comment as read

Mark a comment as read.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
id string ID
commentMarkReadParameters CommentMarkReadParameters
optional *CommentMarkReadOpts optional parameters nil if no parameters

Optional Parameters

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

CommentMarkUnread

CommentMarkUnread(ctx, projectId, keyId, id, optional)

Mark a comment as unread

Mark a comment as unread.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
id string ID
optional *CommentMarkUnreadOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentMarkUnreadOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | branch | optional.String| specify the branch to use |

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]

CommentShow

Comment CommentShow(ctx, projectId, keyId, id, optional)

Get a single comment

Get details on a single comment.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
id string ID
optional *CommentShowOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentShowOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | branch | optional.String| specify the branch to use |

Return type

Comment

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]

CommentUpdate

Comment CommentUpdate(ctx, projectId, keyId, id, commentUpdateParameters, optional)

Update a comment

Update an existing comment.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
id string ID
commentUpdateParameters CommentUpdateParameters
optional *CommentUpdateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentUpdateOpts struct

Name Type Description Notes

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

Return type

Comment

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]

CommentsList

[]Comment CommentsList(ctx, projectId, keyId, commentsListParameters, optional)

List comments

List all comments for a key.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
keyId string Translation Key ID
commentsListParameters CommentsListParameters
optional *CommentsListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CommentsListOpts 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 | branch | optional.String| specify the branch to use | query | optional.String| Search query for comment messages | localeIds | optional.Interface of []string| Search comments by their assigned locales | filters | optional.Interface of []string| Specify the filter for the comments | order | optional.String| Order direction. Can be one of: asc, desc. |

Return type

[]Comment

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]